David Price

Nearly finished copex ontology gen

This diff could not be displayed because it is too large.
......@@ -3,9 +3,6 @@
# imports: file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls
# imports: file:///www.reportinghub.no/input/copex/COPEX-Properties.xls
@prefix Head: <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#> .
@prefix Model: <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#> .
@prefix Prop: <file:///www.reportinghub.no/input/copex/COPEX-Properties.xls#> .
@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#> .
......
......@@ -2,6 +2,9 @@
# imports: http://spinrdf.org/spin
# imports: http://www.reportinghub.no/input/copex/ss-import
@prefix Head: <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#> .
@prefix Model: <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#> .
@prefix Prop: <file:///www.reportinghub.no/input/copex/COPEX-Properties.xls#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
......@@ -13,7 +16,7 @@
@prefix ss-to-model: <http://www.reportinghub.no/input/copex/ss-to-model#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#COPEX-HeadingWithProperty>
Model:COPEX-HeadingWithProperty
spin:rule
[ rdf:type sp:Construct ;
sp:templates ([ sp:object owl:Restriction ;
......@@ -36,25 +39,27 @@
sp:where ([ sp:object
[ sp:varName "cname"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#blockName> ;
sp:predicate Model:blockName ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "pname"^^xsd:string
] ;
sp:predicate Model:keywordName ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "m"^^xsd:string
] ;
sp:predicate Model:manOptCon ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:ne ;
sp:arg1 [ sp:varName "cname"^^xsd:string
sp:arg1 [ rdf:type fn:lower-case ;
sp:arg1 [ sp:varName "m"^^xsd:string
]
] ;
sp:arg2 "specific product attributes"
sp:arg2 "m"
]
] [ sp:object
[ sp:varName "pname"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#keywordName> ;
sp:subject spin:_this
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object "m" ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#manOptCon> ;
sp:subject spin:_this
])
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
......@@ -95,23 +100,27 @@
sp:where ([ sp:object
[ sp:varName "cname"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#blockName> ;
sp:predicate Model:blockName ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:ne ;
sp:arg1 [ sp:varName "cname"^^xsd:string
] ;
sp:arg2 "specific product attributes"
]
] [ sp:object
[ sp:varName "pname"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#keywordName> ;
sp:predicate Model:keywordName ;
sp:subject spin:_this
] [ sp:object "m" ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#manOptCon> ;
] [ sp:object
[ sp:varName "m"^^xsd:string
] ;
sp:predicate Model:manOptCon ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:ne ;
sp:arg1 [ rdf:type fn:lower-case ;
sp:arg1 [ sp:varName "m"^^xsd:string
]
] ;
sp:arg2 "m"
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spif:buildURI ;
......@@ -131,7 +140,7 @@
])
] .
<file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#COPEX-Headings>
Head:COPEX-Headings
spin:rule
[ rdf:type sp:Construct ;
sp:templates ([ sp:object owl:Class ;
......@@ -139,11 +148,18 @@
sp:subject
[ sp:varName "class"^^xsd:string
]
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "class"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h0> ;
sp:predicate Head:h0 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -169,11 +185,18 @@
sp:subject
[ sp:varName "class"^^xsd:string
]
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "class"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h1> ;
sp:predicate Head:h1 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -199,11 +222,18 @@
sp:subject
[ sp:varName "class"^^xsd:string
]
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "class"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h2> ;
sp:predicate Head:h2 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -229,11 +259,18 @@
sp:subject
[ sp:varName "class"^^xsd:string
]
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "class"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h3> ;
sp:predicate Head:h3 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -259,11 +296,18 @@
sp:subject
[ sp:varName "class"^^xsd:string
]
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "class"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h4> ;
sp:predicate Head:h4 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -289,11 +333,18 @@
sp:subject
[ sp:varName "class"^^xsd:string
]
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "class"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h5> ;
sp:predicate Head:h5 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -320,6 +371,13 @@
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "class"^^xsd:string
] ;
sp:predicate rdfs:range ;
......@@ -344,12 +402,12 @@
]
]) ;
sp:where ([ sp:object "Heading1" ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#lEVEL> ;
sp:predicate Head:lEVEL ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h1> ;
sp:predicate Head:h1 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -361,7 +419,7 @@
] [ sp:object
[ sp:varName "hparent"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h0> ;
sp:predicate Head:h0 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -394,6 +452,16 @@
sp:variable
[ sp:varName "property"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "head"^^xsd:string
] ;
sp:arg2 " Ref"
] ;
sp:variable
[ sp:varName "label"^^xsd:string
]
])
] ;
spin:rule
......@@ -404,6 +472,13 @@
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "class"^^xsd:string
] ;
sp:predicate rdfs:range ;
......@@ -428,12 +503,12 @@
]
]) ;
sp:where ([ sp:object "Heading1" ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#lEVEL> ;
sp:predicate Head:lEVEL ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h1> ;
sp:predicate Head:h1 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -445,7 +520,7 @@
] [ sp:object
[ sp:varName "hparent"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h0> ;
sp:predicate Head:h0 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -478,6 +553,16 @@
sp:variable
[ sp:varName "property"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "head"^^xsd:string
] ;
sp:arg2 " Ref"
] ;
sp:variable
[ sp:varName "label"^^xsd:string
]
])
] ;
spin:rule
......@@ -488,6 +573,13 @@
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "class"^^xsd:string
] ;
sp:predicate rdfs:range ;
......@@ -512,12 +604,12 @@
]
]) ;
sp:where ([ sp:object "Heading2" ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#lEVEL> ;
sp:predicate Head:lEVEL ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h2> ;
sp:predicate Head:h2 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -529,7 +621,7 @@
] [ sp:object
[ sp:varName "hparent"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h1> ;
sp:predicate Head:h1 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -562,6 +654,16 @@
sp:variable
[ sp:varName "property"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "head"^^xsd:string
] ;
sp:arg2 " Ref"
] ;
sp:variable
[ sp:varName "label"^^xsd:string
]
])
] ;
spin:rule
......@@ -572,6 +674,13 @@
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "class"^^xsd:string
] ;
sp:predicate rdfs:range ;
......@@ -596,12 +705,12 @@
]
]) ;
sp:where ([ sp:object "Heading3" ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#lEVEL> ;
sp:predicate Head:lEVEL ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h3> ;
sp:predicate Head:h3 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -613,7 +722,7 @@
] [ sp:object
[ sp:varName "hparent"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h2> ;
sp:predicate Head:h2 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -646,6 +755,16 @@
sp:variable
[ sp:varName "property"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "head"^^xsd:string
] ;
sp:arg2 " Ref"
] ;
sp:variable
[ sp:varName "label"^^xsd:string
]
])
] ;
spin:rule
......@@ -656,6 +775,13 @@
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "class"^^xsd:string
] ;
sp:predicate rdfs:range ;
......@@ -680,12 +806,12 @@
]
]) ;
sp:where ([ sp:object "Heading4" ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#lEVEL> ;
sp:predicate Head:lEVEL ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h4> ;
sp:predicate Head:h4 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -697,7 +823,7 @@
] [ sp:object
[ sp:varName "hparent"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h3> ;
sp:predicate Head:h3 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -730,6 +856,16 @@
sp:variable
[ sp:varName "property"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "head"^^xsd:string
] ;
sp:arg2 " Ref"
] ;
sp:variable
[ sp:varName "label"^^xsd:string
]
])
] ;
spin:rule
......@@ -740,6 +876,13 @@
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "class"^^xsd:string
] ;
sp:predicate rdfs:range ;
......@@ -764,12 +907,12 @@
]
]) ;
sp:where ([ sp:object "Heading5" ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#lEVEL> ;
sp:predicate Head:lEVEL ;
sp:subject spin:_this
] [ sp:object
[ sp:varName "head"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h5> ;
sp:predicate Head:h5 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -781,7 +924,7 @@
] [ sp:object
[ sp:varName "hparent"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-HeadingsList.xls#h4> ;
sp:predicate Head:h4 ;
sp:subject spin:_this
] [ rdf:type sp:Filter ;
sp:expression
......@@ -814,10 +957,20 @@
sp:variable
[ sp:varName "property"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 [ sp:varName "head"^^xsd:string
] ;
sp:arg2 " Ref"
] ;
sp:variable
[ sp:varName "label"^^xsd:string
]
])
] .
<file:///www.reportinghub.no/input/copex/COPEX-Properties.xls#COPEX-Properties>
Prop:COPEX-Properties
spin:rule
[ rdf:type sp:Construct ;
sp:templates ([ sp:object rdf:Property ;
......@@ -860,17 +1013,24 @@
sp:subject
[ sp:varName "property"^^xsd:string
]
] [ sp:object
[ sp:varName "label"^^xsd:string
] ;
sp:predicate rdfs:label ;
sp:subject
[ sp:varName "property"^^xsd:string
]
]) ;
sp:where ([ sp:object
[ sp:varName "name"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-Properties.xls#keywordName> ;
sp:predicate Prop:keywordName ;
sp:subject spin:_this
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "datatype"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-Properties.xls#datatype> ;
sp:predicate Prop:datatype ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
......@@ -887,7 +1047,7 @@
sp:elements ([ sp:object
[ sp:varName "default"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-Properties.xls#defaultValue> ;
sp:predicate Prop:defaultValue ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
......@@ -904,7 +1064,7 @@
sp:elements ([ sp:object
[ sp:varName "unittype"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-Properties.xls#unitType> ;
sp:predicate Prop:unitType ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
......@@ -921,7 +1081,7 @@
sp:elements ([ sp:object
[ sp:varName "minval"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-Properties.xls#min> ;
sp:predicate Prop:min ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
......@@ -938,7 +1098,7 @@
sp:elements ([ sp:object
[ sp:varName "maxval"^^xsd:string
] ;
sp:predicate <file:///www.reportinghub.no/input/copex/COPEX-Properties.xls#max> ;
sp:predicate Prop:max ;
sp:subject spin:_this
] [ rdf:type sp:Bind ;
sp:expression
......@@ -959,6 +1119,16 @@
sp:variable
[ sp:varName "property"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type fn:concat ;
sp:arg1 "has " ;
sp:arg2 [ sp:varName "name"^^xsd:string
]
] ;
sp:variable
[ sp:varName "label"^^xsd:string
]
])
] .
......
......@@ -9,6 +9,9 @@
@prefix visual: <http://topbraid.org/visual#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#COPEX-HeadingWithProperty>
forms:keyProperties (rdfs:label rdfs:comment <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#blockName> <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#keywordName> <file:///www.reportinghub.no/input/copex/COPEX-HeadingWithProperty.xls#level>) .
[] rdf:type inference:Configuration ;
composite:child
[ rdf:type <http://spinrdf.org/spin#TopSPIN> ;
......