Holger Knublauch

Introduced metaclass for report types, simplified autocomplete code

This diff is collapsed. Click to expand it.
<ui:group
let:type="{= ui:param('type', rdfs:Class) }"
let:prefix="{= ui:param('term') }">
[
<ui:forEach ui:resultSet="{#
SELECT ?resource ?label
WHERE {
(?type ?prefix) ui:autoComplete (?resource ?label) .
}
}" ui:indexVar="index">
<ui:if ui:condition="{= ?index &gt; 0 }">,</ui:if>
{
"label" : "{= ?label }",
"resource" : "{= ui:encodeNode(?resource) }",
"value" : "{= ?label }"
}
</ui:forEach>
]
</ui:group>
\ No newline at end of file
......@@ -140,7 +140,7 @@ log:reportType
rdf:type owl:ObjectProperty ;
rdfs:domain log:ReportEvent ;
rdfs:label "report type"^^xsd:string ;
rdfs:range rdfs:Class .
rdfs:range <http://www.reportinghub.no/system/schema/reporting#ReportClass> .
log:url
rdf:type owl:DatatypeProperty ;
......
......@@ -21,7 +21,7 @@ sioc:id
owl:versionInfo "0.2.0"^^xsd:string .
report:AbstractDR
rdf:type owl:Class ;
rdf:type report:ReportClass ;
rdfs:comment "Abstract base class for various types of daily reports."^^xsd:string ;
rdfs:label "Daily report"^^xsd:string ;
rdfs:subClassOf foaf:Document ;
......@@ -57,12 +57,12 @@ report:AbstractDR
] .
report:AbstractMPR
rdf:type owl:Class ;
rdf:type report:ReportClass ;
rdfs:label "Abstract MPR"^^xsd:string ;
rdfs:subClassOf foaf:Document .
report:DDR
rdf:type owl:Class ;
rdf:type report:ReportClass ;
rdfs:comment "The metadata about a Daily Drilling Report."^^xsd:string ;
rdfs:label "DDR"^^xsd:string ;
rdfs:subClassOf report:AbstractDR ;
......@@ -78,7 +78,7 @@ report:DDR
] .
report:DPR
rdf:type owl:Class ;
rdf:type report:ReportClass ;
rdfs:comment "The metadata about a Daily Production Report."^^xsd:string ;
rdfs:label "DPR"^^xsd:string ;
rdfs:subClassOf report:AbstractDR ;
......@@ -98,22 +98,22 @@ report:HTMLFormat
rdfs:label "HTMLFormat"^^xsd:string .
report:MPRD
rdf:type owl:Class ;
rdf:type report:ReportClass ;
rdfs:label "MPRD"^^xsd:string ;
rdfs:subClassOf report:AbstractMPR .
report:MPRG
rdf:type owl:Class ;
rdf:type report:ReportClass ;
rdfs:label "MPRG"^^xsd:string ;
rdfs:subClassOf report:AbstractMPR .
report:MPRP
rdf:type owl:Class ;
rdf:type report:ReportClass ;
rdfs:label "MPRP"^^xsd:string ;
rdfs:subClassOf report:AbstractMPR .
report:NPTR
rdf:type owl:Class ;
rdf:type report:ReportClass ;
rdfs:comment "Metadata about a Non-Productive Time Report."^^xsd:string ;
rdfs:label "NPTR"^^xsd:string ;
rdfs:subClassOf foaf:Document .
......@@ -122,8 +122,14 @@ report:PDFFormat
rdf:type report:Format ;
rdfs:label "PDFFormat"^^xsd:string .
report:ReportClass
rdf:type rdfs:Class ;
rdfs:comment "Metaclass for the various report types."^^xsd:string ;
rdfs:label "Report class"^^xsd:string ;
rdfs:subClassOf owl:Class .
report:WDR
rdf:type owl:Class ;
rdf:type report:ReportClass ;
rdfs:comment "Metadata about a Weekly Drilling Report"^^xsd:string ;
rdfs:label "WDR"^^xsd:string ;
rdfs:subClassOf foaf:Document .
......