From 5d75ea46638a178d9469ec0deee3862fe429af75 Mon Sep 17 00:00:00 2001 From: Philipp Hochmann Date: Fri, 13 May 2022 14:45:26 +0200 Subject: [PATCH 1/7] Update Changelog, Ontology.ttl, Shacl.ttl for Version 4.2.0 --- CHANGELOG.md | 19 ++++++++-- Ontology.ttl | 97 ++++++++++++++++++++++++++-------------------------- Shacl.ttl | 54 ++++++++++++++--------------- 3 files changed, 93 insertions(+), 77 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 609019d6..0e6eca03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [4.2.0] 2021-09-30 -Pre-release version 4.2.0 of the IDS Information Model +## [4.2.0] 2022-05-13 +Version 4.2.0 of the IDS Information Model ### Added * Class `ids:PaymentModality` and property `ids:paymentModality` to document pricing modalities (free/ fixed price/ negotiation basis). Property is directly attached to the `ids:Resource`. +* Class `ids:IdsProtocolSpecification` and property `ids:apiSpecification` to describe `ids:Endpoint`s with their supported protocols +* New individuals of `ids:Action`: `ADD`, `DIVIDE`, `HASH`, `INCREMENT_COUNTER`, `MULTIPLY`, `REPLACE`, `SHUFFLE` +* New individuals of `ids:Frequency`: `TWO_TIMES_A_DAY`, `EVERY_THREE_HOURS`, `BIHOURLY`, `HOURLY`, `EVERY_30_MINUTES`, `EVERY_15_MINUTES`, `EVERY_10_MINUTES`, `EVERY_5_MINUTES`, `EVERY_1_MINUTE` +* New individuals of `ids:IdsProtocolSpecification`: `IDS-REST`, `IDS-CP`, `QUERY`, `MULTIPART` +* New individuals of `ids:LeftOperand`: `DATE_TIME`, `HASH_ALGORITHM`, `JSON_PATH`, `XPATH`, `REPLACE_WITH`, `OPERAND`, `ROLE`, `RECIPIENT`, `TARGET_POLICY`, `ARTIFACT_STATE`, `SYSTEM_DEVICE`, `APPLICATION`, `CONNECTOR`, `LOG_LEVEL`, `NOTIFICATION_LEVEL` +* New individuals of `ids:CustomMediaType`: `OTHER_MEDIATYPE` * Title (`ids:title`) and description (`ids:description`) properties for `ids:Representation`. * Shapes for AppResources +* Class UsageControlComponent and Shape + +### Changed + +* `ids:Representation` is now subclass of `ids:Described` giving instances a title- and description label. + +### Removed + +* Remove `ids:magicNumber` from `ids:MediaType` ## [4.1.0] 2021-05-26 Version 4.1.0 of the IDS Information Model diff --git a/Ontology.ttl b/Ontology.ttl index 9a0b0700..4d452cb6 100644 --- a/Ontology.ttl +++ b/Ontology.ttl @@ -38,7 +38,7 @@ ids: ; dct:publisher ids:IDSA ; dct:created "2017-09-26"^^xsd:date ; - dct:modified "2021-10-07"^^xsd:date ; + dct:modified "2022-05-13"^^xsd:date ; owl:versionInfo "4.2.0" ; owl:versionIRI ; vann:preferredNamespaceUri "https://w3id.org/idsa/core/" ; @@ -103,7 +103,7 @@ _:AnnaKasprzik a dct:Agent, foaf:Person ; foaf:name "Maarten Kollenstart" ; . a dct:Agent, foaf:Person ; - foaf:name "Johannes Theissen-Lipp" ; + foaf:name "Johannes Lipp" ; . a dct:Agent, foaf:Person ; foaf:name "Lina Molinas Comet" ; @@ -111,88 +111,89 @@ _:AnnaKasprzik a dct:Agent, foaf:Person ; # ---------------------------- # Imports of class files ids: - owl:imports ; - owl:imports ; - owl:imports ; owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; owl:imports ; owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; owl:imports ; owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; . diff --git a/Shacl.ttl b/Shacl.ttl index 8f127d84..cb8ced7f 100644 --- a/Shacl.ttl +++ b/Shacl.ttl @@ -30,9 +30,9 @@ shapes: ; dct:publisher ids:IDSA ; dct:created "2019-10-14"^^xsd:date ; - dct:modified "2021-06-17"^^xsd:date ; - owl:versionInfo "4.1.0" ; - owl:versionIRI ; + dct:modified "2022-05-13"^^xsd:date ; + owl:versionInfo "4.2.0" ; + owl:versionIRI ; vann:preferredNamespaceUri "https://github.com/International-Data-Spaces-Association/InformationModel/tree/master/testing" ; vann:preferredNamespacePrefix "shapes" ; rdfs:seeAlso ; @@ -66,61 +66,61 @@ ids:IDSA # ---------------------------- # Imports of class files shapes: - owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; + owl:imports ; + owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; - owl:imports ; owl:imports ; + owl:imports ; . From 94d510396350105eada7400f3015b33e9922ad08 Mon Sep 17 00:00:00 2001 From: Philipp Hochmann Date: Fri, 13 May 2022 15:52:31 +0200 Subject: [PATCH 2/7] Fix missing slash --- testing/participant/BusinessIdentifierShape.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/participant/BusinessIdentifierShape.ttl b/testing/participant/BusinessIdentifierShape.ttl index 512d38a8..15a9e010 100644 --- a/testing/participant/BusinessIdentifierShape.ttl +++ b/testing/participant/BusinessIdentifierShape.ttl @@ -4,7 +4,7 @@ @prefix xsd: . @prefix ids: . @prefix sh: . -@prefix shapes: . +@prefix shapes: . shapes: a owl:Ontology ; From 5ff3a0c06fdaa8230d4a846462a3392f1e63c975 Mon Sep 17 00:00:00 2001 From: Philipp Hochmann Date: Tue, 24 May 2022 17:16:29 +0200 Subject: [PATCH 3/7] Add owl:imports support in SHACL Validator to use Ontology.ttl in root --- .../java/SHACL_Validator.java | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/examples/rdf-validation-using-shacl/java/SHACL_Validator.java b/examples/rdf-validation-using-shacl/java/SHACL_Validator.java index 5aa4e860..f5ed5598 100644 --- a/examples/rdf-validation-using-shacl/java/SHACL_Validator.java +++ b/examples/rdf-validation-using-shacl/java/SHACL_Validator.java @@ -1,5 +1,7 @@ import org.apache.jena.graph.Graph; import org.apache.jena.graph.compose.Union; +import org.apache.jena.ontology.OntModel; +import org.apache.jena.ontology.OntModelSpec; import org.apache.jena.rdf.model.Model; import org.apache.jena.riot.RDFLanguages; import org.apache.jena.riot.RDFParser; @@ -11,6 +13,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.topbraid.jenax.util.JenaUtil; + import java.io.ByteArrayInputStream; import java.io.IOException; import java.net.MalformedURLException; @@ -22,7 +25,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; - /** Represents an employee. * @author Haydar Akyürek * A simple Java application to demonstrate the usage of the Jena framework for SHACL validation. @@ -41,9 +43,13 @@ public class SHACL_Validator { **/ public static void main(String[] args) { try { - SHACL_Validator validator = new SHACL_Validator(args[0], args[1], args[2]); - validator.validateRDF(); - } catch (IOException | NullPointerException e) { + List instance_paths = Files.walk(Paths.get(args[2])) + .filter(p -> p.toString().endsWith(".jsonld")).collect(Collectors.toList()); + for (Path p : instance_paths){ + SHACL_Validator validator = new SHACL_Validator(args[0], args[1], p); + validator.validateRDF(); + } + } catch (Exception e) { e.printStackTrace(); } } @@ -55,10 +61,11 @@ public static void main(String[] args) { * @param instance_path path to the RDF instance (in JSON-LD) which ha to be validated against SHACL * @throws MalformedURLException */ - public SHACL_Validator(String ont_path, String shacl_path, String instance_path) throws MalformedURLException { + public SHACL_Validator(String ont_path, String shacl_path, Path instance_path) throws MalformedURLException { this.ont_path = format_rdf_path(ont_path); this.shacl_path = format_rdf_path(shacl_path); - this.instance_path = format_rdf_path(instance_path) ; + //this.instance_path = format_rdf_path(instance_path) ; + this.instance_path = instance_path; } /** @@ -74,8 +81,8 @@ void validateRDF() throws IOException { ValidationReport report = ShaclValidator.get().validate(shapes_graph, data_graph); if (!report.conforms()) { - logger.error("failed"); - logger.error(String.valueOf(report.getEntries())); + System.out.println(instance_path.toString() + " failed"); + System.out.println(String.valueOf(report.getEntries())); } else { System.out.println("Validation successful"); @@ -106,7 +113,8 @@ private Path format_rdf_path(String string_path) throws MalformedURLException { * @throws IOException */ public Graph readModelAndInstance() throws IOException { - Model ontologyModel = JenaUtil.createMemoryModel(); + Model model = JenaUtil.createMemoryModel(); + OntModel ontologyModel = JenaUtil.createOntologyModel(OntModelSpec.OWL_DL_MEM, model); ontologyModel.read(Files.newInputStream(this.ont_path) , null, "TTL"); Graph rdfInstanceModel = JenaUtil.createMemoryModel().getGraph(); @@ -133,14 +141,17 @@ private Shapes readSHACL() throws IOException { //Get all regular SHACL files System.out.println(this.shacl_path); Stream paths = Files.walk(this.shacl_path) - .filter(p -> p.toString().endsWith(".ttl")); + .filter(p -> p.toString().endsWith(".ttl")); List result = paths.filter(Files::isRegularFile) - .map(Path::toString) - .collect(Collectors.toList()); + .map(Path::toString) + .collect(Collectors.toList()); // generate SHACL shapes graph result.forEach(file -> shapesModel.read(file, FileUtils.langTurtle)); + + //System.out.println(shapesModel.toString()); + shapes = Shapes.parse(shapesModel); return shapes; From 1b4d832f49c00ca883e9a0f31facbd3d80dd880e Mon Sep 17 00:00:00 2001 From: Philipp Hochmann Date: Mon, 30 May 2022 16:13:33 +0200 Subject: [PATCH 4/7] Remove example failing SHACL tests --- examples/BROKER.ttl | 2 -- examples/DAT_PAYLOAD.jsonld | 11 ----------- 2 files changed, 13 deletions(-) delete mode 100644 examples/DAT_PAYLOAD.jsonld diff --git a/examples/BROKER.ttl b/examples/BROKER.ttl index df1beeae..b06d1e1b 100644 --- a/examples/BROKER.ttl +++ b/examples/BROKER.ttl @@ -1,12 +1,10 @@ @prefix ids: . @prefix idsc: . @prefix xsd: . -@prefix idsc: . @prefix part1: . @prefix conn2: . @prefix broker1: . - broker1: a ids:Broker; # General properties diff --git a/examples/DAT_PAYLOAD.jsonld b/examples/DAT_PAYLOAD.jsonld deleted file mode 100644 index c0509357..00000000 --- a/examples/DAT_PAYLOAD.jsonld +++ /dev/null @@ -1,11 +0,0 @@ -{ - "@context":"https://w3id.org/idsa/contexts/context.jsonld", - "@type":"ids:DatPayload", - "iss":"DD:CB:FD:0B:93:84:33:01:11:EB:5D:94:94:88:BE:78:7D:57:FC:4A:keyid:CB:8C:C7:B6:85:79:A8:23:A6:CB:15:AB:17:50:2F:E6:65:43:5D:E8", - "sub": "DD:CB:FD:0B:93:84:33:01:11:EB:5D:94:94:88:BE:78:7D:57:FC:4A:keyid:CB:8C:C7:B6:85:79:A8:23:A6:CB:15:AB:17:50:2F:E6:65:43:5D:E8", - "exp": 1587789961, - "iat": 1576236057, - "aud": "https://w3id.org/idsa/code/IDS_CONNECTOR_ATTRIBUTES_ALL", - "nbf": 1567703561, - "ids:referringConnector": "http://example.org/ids/connector" -} From 2bb10e7fdef1b5c3a90669179c70fdbf6f0211c8 Mon Sep 17 00:00:00 2001 From: Philipp Hochmann Date: Mon, 30 May 2022 17:02:31 +0200 Subject: [PATCH 5/7] Fix typo --- examples/TEXT_RESOURCE.jsonld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/TEXT_RESOURCE.jsonld b/examples/TEXT_RESOURCE.jsonld index 6db24f40..43cba73d 100644 --- a/examples/TEXT_RESOURCE.jsonld +++ b/examples/TEXT_RESOURCE.jsonld @@ -7,7 +7,7 @@ "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "xsd": "http://www.w3.org/2001/XMLSchema#", "time": "http://www.w3.org/2006/time#", - "odrl:" "http://www.w3.org/ns/odrl/2/", + "odrl": "http://www.w3.org/ns/odrl/2/", "dct": "http://purl.org/dc/terms/" }, "@type": "ids:TextResource", From 4ffecb88b9e39928d0dc5e7cc4e0c4db63cdc3af Mon Sep 17 00:00:00 2001 From: Philipp Hochmann Date: Wed, 1 Jun 2022 10:44:23 +0200 Subject: [PATCH 6/7] Re-create Ontology and Shacl --- Ontology.ttl | 9 ++------- Shacl.ttl | 8 ++------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Ontology.ttl b/Ontology.ttl index c65e7645..fa8fc924 100644 --- a/Ontology.ttl +++ b/Ontology.ttl @@ -38,7 +38,7 @@ ids: ; dct:publisher ids:IDSA ; dct:created "2017-09-26"^^xsd:date ; - dct:modified "2022-05-13"^^xsd:date ; + dct:modified "2022-06-01"^^xsd:date ; owl:versionInfo "4.2.0" ; owl:versionIRI ; vann:preferredNamespaceUri "https://w3id.org/idsa/core/" ; @@ -119,18 +119,15 @@ ids: owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; owl:imports ; owl:imports ; owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; owl:imports ; owl:imports ; @@ -140,7 +137,6 @@ ids: owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; owl:imports ; owl:imports ; @@ -185,7 +181,6 @@ ids: owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; owl:imports ; owl:imports ; @@ -194,7 +189,7 @@ ids: owl:imports ; owl:imports ; owl:imports ; + owl:imports ; owl:imports ; - owl:imports ; owl:imports ; . diff --git a/Shacl.ttl b/Shacl.ttl index befb584e..d3b282f0 100644 --- a/Shacl.ttl +++ b/Shacl.ttl @@ -30,7 +30,7 @@ shapes: ; dct:publisher ids:IDSA ; dct:created "2019-10-14"^^xsd:date ; - dct:modified "2022-05-13"^^xsd:date ; + dct:modified "2022-06-01"^^xsd:date ; owl:versionInfo "4.2.0" ; owl:versionIRI ; vann:preferredNamespaceUri "https://github.com/International-Data-Spaces-Association/InformationModel/tree/master/testing" ; @@ -70,12 +70,8 @@ shapes: owl:imports ; owl:imports ; owl:imports ; - owl:imports ; owl:imports ; owl:imports ; - owl:imports ; - owl:imports ; - owl:imports ; owl:imports ; owl:imports ; owl:imports ; @@ -101,7 +97,7 @@ shapes: owl:imports ; owl:imports ; owl:imports ; - owl:imports ; + owl:imports ; owl:imports ; owl:imports ; owl:imports ; From 887676a7c61868831196b5e60dab5e8466b21183 Mon Sep 17 00:00:00 2001 From: Philipp Hochmann Date: Wed, 1 Jun 2022 13:01:40 +0200 Subject: [PATCH 7/7] Update release date of v4.2.0 in CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e6eca03..3bb662db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [4.2.0] 2022-05-13 +## [4.2.0] 2022-06-01 Version 4.2.0 of the IDS Information Model ### Added