Skip to content

Commit

Permalink
Merge pull request #11 from equinor/story/175071-clickable-dexpi
Browse files Browse the repository at this point in the history
Clickable dexpi
  • Loading branch information
eoye authored Sep 4, 2024
2 parents bc94a7e + 91435c4 commit 1f6f121
Show file tree
Hide file tree
Showing 19 changed files with 723 additions and 39 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ client/.idea
client/Boundaries/Dexpi2Svg/test.svg
rml/C03V04.trig
www/C03V04.svg
client/Boundaries/Dexpi2Svg/bin
client/Boundaries/Dexpi2Svg/obj
client/Boundaries/Boundaries/bin
client/Boundaries/Boundaries/obj
client/Boundaries/TestBoundaries/obj
client/Boundaries/TestBoundaries/bin
7 changes: 7 additions & 0 deletions datalog/interactive_boundary.datalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
prefix data: <https://assetid.equinor.com/plantx/document/12345#>

data:insideBoundary [?new_node] :-
data:insideBoundary [?node],
imf:connectedTo [?node, ?new_node],
dexpi:PipingOrEquipment [?new_node],
NOT data:boundary [?node].
2 changes: 2 additions & 0 deletions owl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The imf ontology is downloaded [here](https://ns.imfid.org/20240531/).
The ontology must be downloaded into this folder and named imf-ontology.owl.ttl
5 changes: 2 additions & 3 deletions rdfox/boundaries.rdfox
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix schema: <http://schema.org/>
prefix commonlib: <https://commonlib.equinor.com/Library/>
prefix dexpi: <https://rdf.equinor.com/dexpi#>
prefix asset: <https://assetid.equinor.comm/plantx#>
prefix asset: <https://assetid.equinor.com/plantx#>
prefix dbo: <http://dbpedia.org/ontology/>
prefix dexpi: <https://rdf.equinor.com/dexpi#>
prefix imf: <http://ns.imfid.org/imf#>
prefix data: <https://assetid.equinor.com/plantx/document/12345#>


import > asset:axioms ../owl/dexpi.ttl
import > asset:axioms ../owl/imf-ontology.owl.ttl
importaxioms asset:axioms
import > schema:shacl ../shacl/imf-dexpi.shacl.ttl
commitproc set commit-procedure.sparql

set endpoint.access-control-allow-origin *
endpoint start
1 change: 1 addition & 0 deletions rdfox/connected.rdfox
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ boundaries.rdfox
import ../datalog/surrounding.datalog
import +p "../rml/pandid.trig"

set access-control-allow-origin *
endpoint start

set output out
Expand Down
3 changes: 1 addition & 2 deletions rdfox/dexpi.rdfox
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
boundaries.rdfox

import ../datalog/boundary.datalog
import ../datalog/interactive_boundary.datalog
import +p "../rml/pandid.trig"

endpoint start

set output out
select * where {?s a data:insideBoundaryX}
2 changes: 2 additions & 0 deletions rdfox/endpoint.params
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Enable cors
access-control-allow-origin *
2 changes: 1 addition & 1 deletion rml/attributes-map.rml.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@prefix schema: <http://schema.org/> .
@prefix commonlib: <https://commonlib.equinor.com/Library/> .
@prefix dexpi: <https://rdf.equinor.com/dexpi#> .
@prefix asset: <https://assetid.equinor.comm/plantx#> .
@prefix asset: <https://assetid.equinor.com/plantx#> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix imf: <http://ns.imfid.org/imf#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
Expand Down
2 changes: 1 addition & 1 deletion rml/connection-points.map.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@prefix schema: <http://schema.org/> .
@prefix commonlib: <https://commonlib.equinor.com/Library/> .
@prefix dexpi: <https://rdf.equinor.com/dexpi#> .
@prefix asset: <https://assetid.equinor.comm/plantx#> .
@prefix asset: <https://assetid.equinor.com/plantx#> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix imf: <http://ns.imfid.org/imf#> .

Expand Down
2 changes: 1 addition & 1 deletion rml/element-map.rml.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@prefix schema: <http://schema.org/> .
@prefix commonlib: <https://commonlib.equinor.com/Library/> .
@prefix dexpi: <https://rdf.equinor.com/dexpi#> .
@prefix asset: <https://assetid.equinor.comm/plantx#> .
@prefix asset: <https://assetid.equinor.com/plantx#> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix imf: <http://ns.imfid.org/imf#> .

Expand Down
2 changes: 1 addition & 1 deletion rml/equipment-map.rml..ttl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@prefix schema: <http://schema.org/> .
@prefix commonlib: <https://commonlib.equinor.com/Library/> .
@prefix dexpi: <https://rdf.equinor.com/dexpi#> .
@prefix asset: <https://assetid.equinor.comm/plantx#> .
@prefix asset: <https://assetid.equinor.com/plantx#> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix imf: <http://ns.imfid.org/imf#> .

Expand Down
2 changes: 1 addition & 1 deletion rml/nozzlemap.rml..ttl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@prefix schema: <http://schema.org/> .
@prefix commonlib: <https://commonlib.equinor.com/Library/> .
@prefix dexpi: <https://rdf.equinor.com/dexpi#> .
@prefix asset: <https://assetid.equinor.comm/plantx#> .
@prefix asset: <https://assetid.equinor.com/plantx#> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix imf: <http://ns.imfid.org/imf#> .

Expand Down
2 changes: 1 addition & 1 deletion rml/piping-network-component-map.rml..ttl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@prefix schema: <http://schema.org/> .
@prefix commonlib: <https://commonlib.equinor.com/Library/> .
@prefix dexpi: <https://rdf.equinor.com/dexpi#> .
@prefix asset: <https://assetid.equinor.comm/plantx#> .
@prefix asset: <https://assetid.equinor.com/plantx#> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix imf: <http://ns.imfid.org/imf#> .

Expand Down
2 changes: 1 addition & 1 deletion rml/piping-network-segment-map.rml.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@prefix schema: <http://schema.org/> .
@prefix commonlib: <https://commonlib.equinor.com/Library/> .
@prefix dexpi: <https://rdf.equinor.com/dexpi#> .
@prefix asset: <https://assetid.equinor.comm/plantx#> .
@prefix asset: <https://assetid.equinor.com/plantx#> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix imf: <http://ns.imfid.org/imf#> .

Expand Down
7 changes: 7 additions & 0 deletions www/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Select boundary in browser
1) Run the dexpi.rdfox script, the documentation for this script is found [here](../rdfox/README.md)
2) Open the dexpi.html file in a browser
3) Select the boundary points and an internal component
- Right click to select or deselect the internal component
- Left click to select or deselect boundary nodes
4) Hit enter to query RDFox for the boundary - the output of the query can be found in the logs.
Loading

0 comments on commit 1f6f121

Please sign in to comment.