-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from equinor/story/connector-pipe-problem
Improving pipe tee terminals
- Loading branch information
Showing
15 changed files
with
10,085 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
@prefix rml: <http://semweb.mmlab.be/ns/rml#> . | ||
@prefix rr: <http://www.w3.org/ns/r2rml#> . | ||
@prefix ql: <http://semweb.mmlab.be/ns/ql#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix : <http://example.org/rules/> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix dexpi: <https://rdf.equinor.com/dexpi#> . | ||
@prefix asset: <https://assetid.equinor.com/plantx#> . | ||
@prefix imf: <http://ns.imfid.org/imf#> . | ||
|
||
:PipingComponentTerminalMap a rr:TriplesMap; | ||
rml:logicalSource [ | ||
rml:source "pandid.xml"; | ||
rml:referenceFormulation ql:XPath; | ||
rml:iterator "//PipingNetworkSegment/PipingComponent/ConnectionPoints/Node[@Type='process'] | //PipingNetworkSegment/PropertyBreak/ConnectionPoints/Node[@Type='process']" | ||
]; | ||
rr:subjectMap [ | ||
rr:template "https://assetid.equinor.com/plantx#{concat(../../@ID, '-node', count(preceding-sibling::*))}"; | ||
rr:termType rr:IRI; | ||
rr:class imf:Terminal | ||
]; | ||
|
||
rr:predicateObjectMap [ | ||
rr:predicate imf:hasConnector; | ||
rr:objectMap [ | ||
rr:template """https://assetid.equinor.com/plantx#{ | ||
if(count(preceding-sibling::*) = 1) then | ||
if(../../preceding-sibling::PipingComponent) then | ||
concat(../../preceding-sibling::PipingComponent[1]/@ID, '-node2-connector') | ||
else if(../../../Connection/@FromID) then | ||
concat(../../../Connection/@FromID, '-node', ../../../Connection/@FromNode, '-connector') | ||
else() | ||
else if(count(preceding-sibling::*) = 2) then | ||
if(../../following-sibling::PipingComponent or following-sibling::PropertyBreak) then | ||
concat(../../@ID , '-node2-connector') | ||
else if(../../../Connection/@ToID) then | ||
concat(../../../Connection/@ToID, '-node', ../../../Connection/@ToNode, '-connector') | ||
else( concat(../../@ID , '-node2-connector') ) | ||
else() | ||
}"""; | ||
rr:termType rr:IRI; | ||
] | ||
] . | ||
|
||
:PipingComponentBlockMap a rr:TriplesMap; | ||
rml:logicalSource [ | ||
rml:source "pandid.xml"; | ||
rml:referenceFormulation ql:XPath; | ||
rml:iterator "//PipingNetworkSegment/PipingComponent | //PipingNetworkSegment/PropertyBreak" | ||
]; | ||
rr:subjectMap [ | ||
rr:template "https://assetid.equinor.com/plantx#{@ID}"; | ||
rr:termType rr:IRI; | ||
rr:class dexpi:PipingComponent, imf:Block | ||
] ; | ||
rr:predicateObjectMap [ | ||
rr:predicate imf:partOf; | ||
rr:objectMap [ | ||
rr:template "https://assetid.equinor.com/plantx#{../@ID}"; | ||
rr:termType rr:IRI | ||
] | ||
] ; | ||
rr:predicateObjectMap [ | ||
rr:predicate rdfs:label ; | ||
rr:objectMap [ | ||
rml:reference "GenericAttributes/GenericAttribute[@Name='ItemTagAssignmentClass']/@Value" | ||
] | ||
] ; | ||
rr:predicateObjectMap [ | ||
rr:predicate imf:hasTerminal; | ||
rr:objectMap [ | ||
rr:parentTriplesMap :PipingComponentTerminalMap; | ||
rr:joinCondition [ | ||
rr:child "@ID"; | ||
rr:parent "../../@ID"; | ||
]; | ||
]; | ||
] . |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
@prefix rml: <http://semweb.mmlab.be/ns/rml#> . | ||
@prefix rr: <http://www.w3.org/ns/r2rml#> . | ||
@prefix ql: <http://semweb.mmlab.be/ns/ql#> . | ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | ||
@prefix : <http://example.org/rules/> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix dexpi: <https://rdf.equinor.com/dexpi#> . | ||
@prefix asset: <https://assetid.equinor.com/plantx#> . | ||
@prefix imf: <http://ns.imfid.org/imf#> . | ||
|
||
|
||
:hasNetworkSegmentConnector | ||
rr:predicate imf:hasConnector; | ||
rr:termType rr:IRI; | ||
rr:objectMap[ | ||
rr:template "https://assetid.equinor.com/plantx#{@ID}"; | ||
rr:termType rr:IRI | ||
] . | ||
|
||
|
||
:PipingComponentSegmentFromTerminalMap a rr:TriplesMap; | ||
rml:logicalSource [ | ||
rml:source "pandid.xml"; | ||
rml:referenceFormulation ql:XPath; | ||
rml:iterator "//PipingNetworkSystem/PipingNetworkSegment" | ||
]; | ||
rr:subjectMap [ | ||
rr:template """https://assetid.equinor.com/plantx#{ | ||
if(Connection/@FromID) then | ||
if ( Connection[@FromID = //Equipment/Nozzle/@ID] ) then | ||
Connection/@FromID | ||
else(concat(Connection/@FromID, '-node', Connection/@FromNode)) | ||
else () | ||
}"""; | ||
rr:termType rr:IRI; | ||
rr:class imf:Terminal | ||
] ; | ||
|
||
rr:predicateObjectMap :hasNetworkSegmentConnector ; | ||
|
||
rr:predicateObjectMap [ | ||
rr:predicate imf:hasConnector; | ||
rr:termType rr:IRI; | ||
rr:objectMap [ | ||
rr:template "https://assetid.equinor.com/plantx#{concat(Connection/@FromID, '-node' , Connection/@FromNode , '-connector')}" | ||
] | ||
] . | ||
|
||
:PipingComponentSegmentToTerminalMap 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#{ | ||
if(Connection/@ToID) then | ||
if (Connection[@ToID = //Equipment/Nozzle/@ID]) then | ||
Connection/@ToID | ||
else ( concat ( Connection/@ToID, '-node', Connection/@ToNode)) | ||
else () | ||
}"""; | ||
rr:termType rr:IRI; | ||
rr:class imf:Terminal | ||
] ; | ||
|
||
rr:predicateObjectMap :hasNetworkSegmentConnector ;¨ | ||
|
||
rr:predicateObjectMap [ | ||
rr:predicate imf:hasConnector; | ||
rr:termType rr:IRI; | ||
rr:objectMap [ | ||
rr:template "https://assetid.equinor.com/plantx#{concat(Connection/@ToID, '-node' , Connection/@ToNode , '-connector')}" | ||
] | ||
] . |
Oops, something went wrong.