diff --git a/henriteste/PipingComponentBlock.map.ttl b/henriteste/PipingComponentBlock.map.ttl index 6203fa7..77f6704 100644 --- a/henriteste/PipingComponentBlock.map.ttl +++ b/henriteste/PipingComponentBlock.map.ttl @@ -34,4 +34,11 @@ rr:template "https://assetid.equinor.com/plantx#{concat(@ID, '_output')}"; rr:termType rr:IRI ] + ] ; + rr:predicateObjectMap [ + rr:predicate imf:partOf; + rr:objectMap [ + rr:template "https://assetid.equinor.com/plantx#{../@ID}"; + rr:termType rr:IRI + ] ] . \ No newline at end of file diff --git a/henriteste/PipingComponentTerminal.map.ttl b/henriteste/PipingComponentTerminal.map.ttl index 6e170e4..83656f4 100644 --- a/henriteste/PipingComponentTerminal.map.ttl +++ b/henriteste/PipingComponentTerminal.map.ttl @@ -62,7 +62,7 @@ rr:objectMap [ rr:template """https://assetid.equinor.com/plantx#{ if(following-sibling::PipingComponent[1]/@ID) then - concat(following-sibling::PipingComponent[1]/@ID, '_connector') + concat(@ID, '_connector') else if(../Connection/@ToID) then concat(../Connection/@ToID, '_connector') else() diff --git a/henriteste/PipingNetworkSegment.map.ttl b/henriteste/PipingNetworkSegment.map.ttl index 60dcbda..6e2025d 100644 --- a/henriteste/PipingNetworkSegment.map.ttl +++ b/henriteste/PipingNetworkSegment.map.ttl @@ -66,42 +66,4 @@ rr:objectMap [ rr:template "https://assetid.equinor.com/plantx#{concat(@ToID, '_connector')}" ] - ] . - -:PipingComponentFromConnectorMap a rr:TriplesMap; - rml:logicalSource [ - rml:source "pandid.xml"; - rml:referenceFormulation ql:XPath; - rml:iterator "//PipingNetworkSegment" - ]; - rr:subjectMap [ - rr:template "https://assetid.equinor.com/plantx#{Connection[not(contains(@FromID, 'Nozzle'))]/@FromID}"; - rr:termType rr:IRI; - rr:class imf:Block - ] ; - rr:predicateObjectMap [ - rr:predicate imf:connectedThrough; - rr:termType rr:IRI; - rr:objectMap[ - rr:template "https://assetid.equinor.com/plantx#{@ID}" - ] - ] . - -:PipingComponentToConnectorMap a rr:TriplesMap; - rml:logicalSource [ - rml:source "pandid.xml"; - rml:referenceFormulation ql:XPath; - rml:iterator "//PipingNetworkSegment" - ]; - rr:subjectMap [ - rr:template "https://assetid.equinor.com/plantx#{Connection[not(contains(@ToID, 'Nozzle'))]/@ToID}"; - rr:termType rr:IRI; - rr:class imf:Block - ] ; - rr:predicateObjectMap [ - rr:predicate imf:connectedThrough; - rr:termType rr:IRI; - rr:objectMap[ - rr:template "https://assetid.equinor.com/plantx#{@ID}" - ] ] . \ No newline at end of file diff --git a/henriteste/sparql_tests.md b/henriteste/sparql_tests.md index 2093577..455421e 100644 --- a/henriteste/sparql_tests.md +++ b/henriteste/sparql_tests.md @@ -6,7 +6,7 @@ ## Noaka DEXPI to IMF RDF All dexpi piping components are modeled as blocks in IMF. Each piping component block has two terminals, one input and one output terminal. Each terminal is connected to another terminal with the help of a connector. -All dexpi equipment are modeled as blocks im IMF. The dexpi nozzles on the equipment is modeled as terminals. A dexpi nozzle is connected to a dexpi piping network segments, these piping network segments has been modeled as imf connectors. +All dexpi equipment are modeled as blocks in IMF. The dexpi nozzles on the equipment is modeled as terminals. A dexpi nozzle is connected to dexpi piping network segments, these piping network segments has been modeled as imf connectors. ### Connecting piping components to nozzles `asset:PipingNetworkSegment-4` connects two equipment blocks togehter; @@ -88,3 +88,12 @@ INSERT DATA { Hence, we need to create these triples in the RML mappings. ### Connecting piping components from different piping network segments + +```SPARQL +SELECT * +WHERE { + ?block imf:connectedThrough ?connector . + VALUES ?segment { asset:PipingNetworkSegment-9 asset:PipingNetworkSegment-8 asset:PipingNetworkSegment-7 } + ?block imf:partOf ?segment . +} +``` \ No newline at end of file