Skip to content

Commit

Permalink
pipetees now handled
Browse files Browse the repository at this point in the history
  • Loading branch information
henriettelienrebnor committed Sep 23, 2024
1 parent 8c065fe commit 2d74472
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 40 deletions.
7 changes: 7 additions & 0 deletions henriteste/PipingComponentBlock.map.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
] .
2 changes: 1 addition & 1 deletion henriteste/PipingComponentTerminal.map.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
38 changes: 0 additions & 38 deletions henriteste/PipingNetworkSegment.map.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
]
] .
11 changes: 10 additions & 1 deletion henriteste/sparql_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 .
}
```

0 comments on commit 2d74472

Please sign in to comment.