David Price

Upgrade Flow InOut for NPD Facility

This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
@prefix tables: <http://topbraid.org/tables#> .
<file:///www.reportinghub.no/test/flow_facts/data/flow-fact-updated.tsv.semtables>
a <http://www.w3.org/2002/07/owl#Ontology> ;
tables:imports <http://www.reportinghub.no/test/flow_facts/data/flow-facts-ss-schema2> ;
<http://www.w3.org/2002/07/owl#imports>
<http://topbraid.org/tables> .
# baseURI: http://www.reportinghub.no/test/flow_facts/data/flow-facts-ss-schema2
# imports: http://topbraid.org/tables
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ss: <http://www.reportinghub.no/test/flow_facts/data/flow-facts-ss-schema2#> .
@prefix tables: <http://topbraid.org/tables#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/test/flow_facts/data/flow-facts-ss-schema2>
rdf:type owl:Ontology ;
owl:imports <http://topbraid.org/tables> .
ss:FieldNPDName
rdf:type owl:DatatypeProperty ;
rdfs:domain ss:flow-fact ;
rdfs:label "[FieldNPDName]" ;
rdfs:range xsd:string ;
tables:columnIndex "0"^^xsd:int .
ss:fieldNPDID
rdf:type owl:DatatypeProperty ;
rdfs:domain ss:flow-fact ;
rdfs:label "FieldNPDID" ;
rdfs:range xsd:string ;
tables:columnIndex "1"^^xsd:int .
ss:flow-fact
rdf:type owl:Class ;
rdfs:label "flow-fact-updated" ;
tables:sheetIndex "0"^^xsd:int .
ss:flowInOutFacilityName
rdf:type owl:DatatypeProperty ;
rdfs:domain ss:flow-fact ;
rdfs:label "FlowInOutFacilityName" ;
rdfs:range xsd:string ;
tables:columnIndex "2"^^xsd:int .
ss:flowInOutFacilityNameSystem
rdf:type owl:DatatypeProperty ;
rdfs:domain ss:flow-fact ;
rdfs:label "FlowInOutFacilityNameSystem" ;
rdfs:range xsd:string ;
tables:columnIndex "3"^^xsd:int .
ss:flowKind
rdf:type owl:DatatypeProperty ;
rdfs:domain ss:flow-fact ;
rdfs:label "FlowKind" ;
rdfs:range xsd:string ;
tables:columnIndex "6"^^xsd:int .
ss:flowName
rdf:type owl:DatatypeProperty ;
rdfs:domain ss:flow-fact ;
rdfs:label "FlowName" ;
rdfs:range xsd:string ;
tables:columnIndex "5"^^xsd:int .
ss:flowQualifier
rdf:type owl:DatatypeProperty ;
rdfs:domain ss:flow-fact ;
rdfs:label "FlowQualifier" ;
rdfs:range xsd:string ;
tables:columnIndex "7"^^xsd:int .
ss:flowUID
rdf:type owl:DatatypeProperty ;
rdfs:domain ss:flow-fact ;
rdfs:label "FlowUID" ;
rdfs:range xsd:string ;
tables:columnIndex "4"^^xsd:int .
# baseURI: null
@prefix composite: <http://www.topbraid.org/2007/05/composite.owl#> .
@prefix forms: <http://www.topbraid.org/2007/01/forms.owl#> .
@prefix inference: <http://www.topbraid.org/2007/06/inference.owl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix visual: <http://topbraid.org/visual#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<http://www.reportinghub.no/test/flow_facts/data/flow-facts-ss-schema2#flow-fact>
forms:keyProperties (rdfs:label rdfs:comment <http://www.reportinghub.no/test/flow_facts/data/flow-facts-ss-schema2#flowInOutFacilityName> <http://www.reportinghub.no/test/flow_facts/data/flow-facts-ss-schema2#flowInOutFacilityNameSystem>) .
[] rdf:type inference:Configuration ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
<http://spinrdf.org/spin#topSPINOptions>
"singlePass" ;
composite:index "0"^^xsd:int
] .
DRAFT 2
SELECT ?FieldNPDName ?FieldNPDID ?FlowUID ?FlowName ?FlowKind ?FlowQualifier
SELECT ?FieldNPDName ?FieldNPDID ?FlowInOutFacilityName ?FlowInOutFacilityNameSystem ?FlowUID ?FlowName ?FlowKind ?FlowQualifier
WHERE {
?obj_productvolume rdf:type mpr:Obj_productVolume .
?obj_productvolume mpr:facilityRef ?cs_productvolumefacility .
......@@ -8,10 +6,14 @@ WHERE {
?obj_productvolume mpr:installationRef ?facilityidentifierstruct .
?facilityidentifierstruct rdf:type mpr:FacilityIdentifierStruct .
?facilityidentifierstruct mpr:namingSystem "NPD"^^<http://www.epim.no/schemas/mprml/1#NameStringDatatype> .
?facilityidentifierstruct mpr:namingSystem "NPD" .
?facilityidentifierstruct mpr:uidRefValue ?FieldNPDID .
?facilityidentifierstruct dtype:value ?FieldNPDName .
?cs_productvolumefacility mpr:nameRef ?cs_productvolumefacilityname.
?cs_productvolumefacilityname mpr:namingSystem ?FlowInOutFacilityNameSystem .
?cs_productvolumefacilityname dtype:value ?FlowInOutFacilityName .
?cs_productvolumefacility mpr:flowRef ?cs_productvolumeflow .
?cs_productvolumeflow rdf:type mpr:Cs_productVolumeFlow .
......@@ -24,37 +26,4 @@ WHERE {
?cs_productvolumeflow mpr:name ?FlowName .
?cs_productvolumeflow mpr:uid ?FlowUID .
}
DRAFT1
SELECT ?FieldNPDName ?FieldNPDID ?FlowUID ?FlowName ?FlowKind ?FlowQualifier
WHERE {
?obj_productvolume rdf:type mpr:Obj_productVolume .
?obj_productvolume mpr:facilityRef ?cs_productvolumefacility .
?cs_productvolumefacility rdf:type mpr:Cs_productVolumeFacility .
?obj_productvolume mpr:installationRef ?facilityidentifierstruct .
?facilityidentifierstruct rdf:type mpr:FacilityIdentifierStruct .
?facilityidentifierstruct mpr:namingSystem "NPD"^^<http://www.epim.no/schemas/mprml/1#NameStringDatatype> .
?facilityidentifierstruct mpr:uidRefValue ?FieldNPDID .
?facilityidentifierstruct dtype:value ?FieldNPDName .
?cs_productvolumefacility mpr:flowRef ?cs_productvolumeflow .
?cs_productvolumeflow rdf:type mpr:Cs_productVolumeFlow .
?cs_productvolumeflow mpr:kindRef ?reportingflow .
?reportingflow rdf:type mpr:ReportingFlow .
?reportingflow dtype:value ?FlowKind .
?cs_productvolumeflow mpr:qualifierRef ?qualifier .
?qualifier rdf:type mpr:FlowQualifier .
?qualifier dtype:value ?FlowQualifier .
?cs_productvolumeflow mpr:name ?FlowName .
?cs_productvolumeflow mpr:uid ?FlowUID .
}
\ No newline at end of file
......