Skip to content

Commit

Permalink
Merge pull request #346 from International-Data-Spaces-Association/do…
Browse files Browse the repository at this point in the history
…cument-version-mapping

Document version mapping 3.1.0 -> 4.0.0
  • Loading branch information
JohannesLipp authored Jun 23, 2021
2 parents ecc415e + a71e79f commit 856cfd4
Show file tree
Hide file tree
Showing 5 changed files with 352 additions and 0 deletions.
34 changes: 34 additions & 0 deletions version_mapping/3.1.0-4.0.0/blacklist-shapes-400.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ids: <https://w3id.org/idsa/core/> .
@prefix idsm: <https://w3id.org/idsa/metamodel/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix shapes: <https://github.com/International-Data-Spaces-Association/InformationModel/tree/master/testing> .

shapes:
a owl:Ontology ;
sh:declare [
sh:prefix "rdf" ;
sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ;
] ;

sh:declare [
sh:prefix "ids" ;
sh:namespace "https://w3id.org/idsa/core/"^^xsd:anyURI ;
] .


shapes:HostShape
a sh:NodeShape ;
sh:targetClass ids:Host ;

sh:not [
a sh:PropertyShape ;
sh:path ids:protocol ;
sh:class ids:Protocol ;
sh:severity sh:Warning ;
sh:message "<https://raw.githubusercontent.com/IndustrialDataSpace/InformationModel/master/testing/taxonomies/Host.ttl> (HostShape): The property ids:protocol was removed in v4.0.0 and should not be used anymore."@en ;
] ;
.
124 changes: 124 additions & 0 deletions version_mapping/3.1.0-4.0.0/example-instance-from-310.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{

"@context" : {

"ids" : "https://w3id.org/idsa/core/",

"idsc" : "https://w3id.org/idsa/code/"

},

"@type" : "ids:BaseConnector",

"@id" : "http://echo.ids.isst.fraunhofer.de/",

"ids:inboundModelVersion" : [ "3.1.0" ],

"ids:outboundModelVersion" : "3.1.0",

"ids:securityProfile" : {

"@id" : "idsc:BASE_CONNECTOR_SECURITY_PROFILE"

},

"ids:catalog" : {

"@type" : "ids:Catalog",

"@id" : "https://w3id.org/idsa/autogen/catalog/26d09db6-3686-48db-b6f3-6ff5d530dff1",

"ids:offer" : [ {

"@type" : "ids:Resource",

"@id" : "https://w3id.org/idsa/autogen/resource/6e5cb489-31be-495b-9a8f-2068e34768c7",

"ids:description" : [ {

"@value" : "Echo Service for the IDS-LAB.",

"@language" : "en"

} ],

"ids:title" : [ {

"@value" : "Echo Service",

"@language" : "en"

} ],

"ids:resourceEndpoint" : [ {

"@type" : "ids:InteractiveEndpoint",

"@id" : "https://w3id.org/idsa/autogen/interactiveEndpoint/ebbb6e33-516b-4cf4-91ab-55dac3568902",

"ids:path" : "https://echo.ids.isst.fraunhofer.de/echo",

"ids:endpointHost" : {

"@type" : "ids:Host",

"@id" : "http://echo.ids.isst.fraunhofer.de/",

"ids:protocol" : {

"@id" : "idsc:HTTP"

},

"ids:accessUrl" : {

"@id" : "https://echo.ids.isst.fraunhofer.de/echo"

}

},

"ids:endpointOperationBinding" : {

"@type" : "ids:OperationBinding",

"@id" : "https://w3id.org/idsa/autogen/operationBinding/27cd307c-f7bb-47f6-8d8f-839bb50c8a3d",

"ids:apiDocument" : {

"@type" : "ids:Resource",

"@id" : "https://echo.ids.isst.fraunhofer.de/OpenApiDocumentForEchoService"

},

"ids:boundOperation" : {

"@type" : "ids:ConsumeContentOperation",

"@id" : "https://echo.ids.isst.fraunhofer.de/EchoOperation"

}

}

} ]

} ]

},

"ids:maintainer" : {

"@id" : "https://www.isst.fraunhofer.de/"

},

"ids:curator" : {

"@id" : "https://www.isst.fraunhofer.de/"

}

}

30 changes: 30 additions & 0 deletions version_mapping/3.1.0-4.0.0/example-instance-from-310.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@prefix ids: <https://w3id.org/idsa/core/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://echo.ids.isst.fraunhofer.de/>
a <https://w3id.org/idsa/core/BaseConnector>, <https://w3id.org/idsa/core/Host> ;
ids:catalog <https://w3id.org/idsa/autogen/catalog/26d09db6-3686-48db-b6f3-6ff5d530dff1> ;
ids:accessUrl <https://echo.ids.isst.fraunhofer.de/echo> ;
ids:protocol <https://w3id.org/idsa/code/HTTP> ;
ids:curator <https://www.isst.fraunhofer.de/> ;
ids:inboundModelVersion "3.1.0"^^xsd:string ;
ids:maintainer <https://www.isst.fraunhofer.de/> ;
ids:outboundModelVersion "3.1.0"^^xsd:string ;
ids:securityProfile <https://w3id.org/idsa/code/BASE_CONNECTOR_SECURITY_PROFILE> .

<https://w3id.org/idsa/autogen/catalog/26d09db6-3686-48db-b6f3-6ff5d530dff1>
a ids:Catalog ;
ids:offer <https://w3id.org/idsa/autogen/resource/6e5cb489-31be-495b-9a8f-2068e34768c7> .

<https://w3id.org/idsa/autogen/resource/6e5cb489-31be-495b-9a8f-2068e34768c7>
a ids:Resource ;
ids:description "Echo Service for the IDS-LAB."@en ;
ids:resourceEndpoint <https://w3id.org/idsa/autogen/staticEndpoint/ebbb6e33-516b-4cf4-91ab-55dac3568902> ;
ids:title "Echo Service"@en .

<https://w3id.org/idsa/autogen/staticEndpoint/ebbb6e33-516b-4cf4-91ab-55dac3568902>
a ids:StaticEndpoint ;
ids:endpointHost <http://echo.ids.isst.fraunhofer.de/> ;
ids:path "https://echo.ids.isst.fraunhofer.de/echo"^^xsd:string .

<https://echo.ids.isst.fraunhofer.de/OpenApiDocumentForEchoService> a ids:Resource .
160 changes: 160 additions & 0 deletions version_mapping/3.1.0-4.0.0/upgrade-shapes-310-to-400.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
@prefix dash: <http://datashapes.org/dash#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ids: <https://w3id.org/idsa/core/> .


ids:BaseConnectorUpgradeShape
a sh:NodeShape ;
sh:targetClass ids:BaseConnector ;
sh:rule [
a sh:SPARQLRule ;
sh:prefixes ids: ;
sh:construct """
prefix dash: <http://datashapes.org/dash#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix schema: <http://schema.org/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ids: <https://w3id.org/idsa/core/>
prefix idsc: <https://w3id.org/idsa/code/>
prefix idsm: <https://w3id.org/idsa/metamodel/>
CONSTRUCT {
$this ids:resourceCatalog $catalog .
idsm:VersionUpgrade ids:catalog $catalog .
}
WHERE {
OPTIONAL {$this ids:catalog $catalog .}
}
""" ;
sh:condition ids:BaseConnector ; # Rules only apply if the input matches the respective shape
] ;
.


ids:CatalogUpgradeShape1
a sh:NodeShape ;
sh:targetClass ids:Catalog ;
sh:rule [
a sh:SPARQLRule ;
sh:prefixes ids: ;
sh:construct """
prefix dash: <http://datashapes.org/dash#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix schema: <http://schema.org/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ids: <https://w3id.org/idsa/core/>
prefix idsc: <https://w3id.org/idsa/code/>
prefix idsm: <https://w3id.org/idsa/metamodel/>
CONSTRUCT {
$this rdf:type ids:ResourceCatalog .
idsm:VersionUpgrade rdf:type ids:catalog .
}
WHERE {$this rdf:type ids:catalog .}
""" ;
sh:condition ids:Catalog ; # Rules only apply if the input matches the respective shape
] ;
.

ids:CatalogUpgradeShape2
a sh:NodeShape ;
sh:targetClass ids:Catalog ;
sh:rule [
a sh:SPARQLRule ;
sh:prefixes ids: ;
sh:construct """
prefix dash: <http://datashapes.org/dash#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix schema: <http://schema.org/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ids: <https://w3id.org/idsa/core/>
prefix idsc: <https://w3id.org/idsa/code/>
prefix idsm: <https://w3id.org/idsa/metamodel/>
CONSTRUCT {
$this ids:offeredResources $offeredResources .
idsm:VersionUpgrade ids:offer $offeredResources .
}
WHERE {$this ids:offer $offeredResources .}
""" ;
sh:condition ids:Catalog ; # Rules only apply if the input matches the respective shape
] ;
.

ids:CatalogUpgradeShape3
a sh:NodeShape ;
sh:targetClass ids:Catalog ;
sh:rule [
a sh:SPARQLRule ;
sh:prefixes ids: ;
sh:construct """
prefix dash: <http://datashapes.org/dash#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix schema: <http://schema.org/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ids: <https://w3id.org/idsa/core/>
prefix idsc: <https://w3id.org/idsa/code/>
prefix idsm: <https://w3id.org/idsa/metamodel/>
CONSTRUCT {
$this ids:requestedResources $requestedResources .
idsm:VersionUpgrade ids:request $requestedResources .
}
WHERE {$this ids:request $requestedResources .}
""" ;
sh:condition ids:Catalog ; # Rules only apply if the input matches the respective shape
] ;
.



ids:ResourceUpgradeShape
a sh:NodeShape ;
sh:targetClass ids:Resource ;
sh:rule [
a sh:SPARQLRule ;
sh:prefixes ids: ;
sh:construct """
prefix dash: <http://datashapes.org/dash#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix schema: <http://schema.org/>
prefix sh: <http://www.w3.org/ns/shacl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ids: <https://w3id.org/idsa/core/>
prefix idsc: <https://w3id.org/idsa/code/>
prefix idsm: <https://w3id.org/idsa/metamodel/>
CONSTRUCT {
$this rdf:type ids:ConnectorEndpoint .
idsm:VersionUpgrade rdf:type ids:StaticEndpoint .
$staticEndpoint ids:accessUrl $accessUrl .
idsm:VersionUpgrade ids:accessUrl $accessUrl .
}
WHERE {
$this ids:resourceEndpoint $staticEndpoint .
$staticEndpoint rdf:type ids:StaticEndpoint .
OPTIONAL {
$staticEndpoint ids:endpointHost $endpointHost .
$this rdf:type ids:Host .
$this ids:accessUrl $accessUrl .
}
}
""" ;
sh:condition ids:Resource ; # Rules only apply if the input matches the respective shape
] ;
.
4 changes: 4 additions & 0 deletions version_mapping/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Upgrading Instances of the IDS Information Model to Newer Versions

This directory gives an overview of Information Model elements that changed from one version to another.
Currently, we provide details for the upgrades `3.0.0 -> 3.1.0` and `3.1.0 -> 4.0.0`. We document these upgrades in different files in the respective subdirectories.

0 comments on commit 856cfd4

Please sign in to comment.