Introduced metaclass for report types, simplified autocomplete code
Showing
4 changed files
with
16 additions
and
29 deletions
This diff is collapsed. Click to expand it.
1 | -<ui:group | ||
2 | - let:type="{= ui:param('type', rdfs:Class) }" | ||
3 | - let:prefix="{= ui:param('term') }"> | ||
4 | - [ | ||
5 | - <ui:forEach ui:resultSet="{# | ||
6 | - SELECT ?resource ?label | ||
7 | - WHERE { | ||
8 | - (?type ?prefix) ui:autoComplete (?resource ?label) . | ||
9 | - } | ||
10 | - }" ui:indexVar="index"> | ||
11 | - <ui:if ui:condition="{= ?index > 0 }">,</ui:if> | ||
12 | - { | ||
13 | - "label" : "{= ?label }", | ||
14 | - "resource" : "{= ui:encodeNode(?resource) }", | ||
15 | - "value" : "{= ?label }" | ||
16 | - } | ||
17 | - </ui:forEach> | ||
18 | - ] | ||
19 | -</ui:group> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -140,7 +140,7 @@ log:reportType | ... | @@ -140,7 +140,7 @@ log:reportType |
140 | rdf:type owl:ObjectProperty ; | 140 | rdf:type owl:ObjectProperty ; |
141 | rdfs:domain log:ReportEvent ; | 141 | rdfs:domain log:ReportEvent ; |
142 | rdfs:label "report type"^^xsd:string ; | 142 | rdfs:label "report type"^^xsd:string ; |
143 | - rdfs:range rdfs:Class . | 143 | + rdfs:range <http://www.reportinghub.no/system/schema/reporting#ReportClass> . |
144 | 144 | ||
145 | log:url | 145 | log:url |
146 | rdf:type owl:DatatypeProperty ; | 146 | rdf:type owl:DatatypeProperty ; | ... | ... |
... | @@ -21,7 +21,7 @@ sioc:id | ... | @@ -21,7 +21,7 @@ sioc:id |
21 | owl:versionInfo "0.2.0"^^xsd:string . | 21 | owl:versionInfo "0.2.0"^^xsd:string . |
22 | 22 | ||
23 | report:AbstractDR | 23 | report:AbstractDR |
24 | - rdf:type owl:Class ; | 24 | + rdf:type report:ReportClass ; |
25 | rdfs:comment "Abstract base class for various types of daily reports."^^xsd:string ; | 25 | rdfs:comment "Abstract base class for various types of daily reports."^^xsd:string ; |
26 | rdfs:label "Daily report"^^xsd:string ; | 26 | rdfs:label "Daily report"^^xsd:string ; |
27 | rdfs:subClassOf foaf:Document ; | 27 | rdfs:subClassOf foaf:Document ; |
... | @@ -57,12 +57,12 @@ report:AbstractDR | ... | @@ -57,12 +57,12 @@ report:AbstractDR |
57 | ] . | 57 | ] . |
58 | 58 | ||
59 | report:AbstractMPR | 59 | report:AbstractMPR |
60 | - rdf:type owl:Class ; | 60 | + rdf:type report:ReportClass ; |
61 | rdfs:label "Abstract MPR"^^xsd:string ; | 61 | rdfs:label "Abstract MPR"^^xsd:string ; |
62 | rdfs:subClassOf foaf:Document . | 62 | rdfs:subClassOf foaf:Document . |
63 | 63 | ||
64 | report:DDR | 64 | report:DDR |
65 | - rdf:type owl:Class ; | 65 | + rdf:type report:ReportClass ; |
66 | rdfs:comment "The metadata about a Daily Drilling Report."^^xsd:string ; | 66 | rdfs:comment "The metadata about a Daily Drilling Report."^^xsd:string ; |
67 | rdfs:label "DDR"^^xsd:string ; | 67 | rdfs:label "DDR"^^xsd:string ; |
68 | rdfs:subClassOf report:AbstractDR ; | 68 | rdfs:subClassOf report:AbstractDR ; |
... | @@ -78,7 +78,7 @@ report:DDR | ... | @@ -78,7 +78,7 @@ report:DDR |
78 | ] . | 78 | ] . |
79 | 79 | ||
80 | report:DPR | 80 | report:DPR |
81 | - rdf:type owl:Class ; | 81 | + rdf:type report:ReportClass ; |
82 | rdfs:comment "The metadata about a Daily Production Report."^^xsd:string ; | 82 | rdfs:comment "The metadata about a Daily Production Report."^^xsd:string ; |
83 | rdfs:label "DPR"^^xsd:string ; | 83 | rdfs:label "DPR"^^xsd:string ; |
84 | rdfs:subClassOf report:AbstractDR ; | 84 | rdfs:subClassOf report:AbstractDR ; |
... | @@ -98,22 +98,22 @@ report:HTMLFormat | ... | @@ -98,22 +98,22 @@ report:HTMLFormat |
98 | rdfs:label "HTMLFormat"^^xsd:string . | 98 | rdfs:label "HTMLFormat"^^xsd:string . |
99 | 99 | ||
100 | report:MPRD | 100 | report:MPRD |
101 | - rdf:type owl:Class ; | 101 | + rdf:type report:ReportClass ; |
102 | rdfs:label "MPRD"^^xsd:string ; | 102 | rdfs:label "MPRD"^^xsd:string ; |
103 | rdfs:subClassOf report:AbstractMPR . | 103 | rdfs:subClassOf report:AbstractMPR . |
104 | 104 | ||
105 | report:MPRG | 105 | report:MPRG |
106 | - rdf:type owl:Class ; | 106 | + rdf:type report:ReportClass ; |
107 | rdfs:label "MPRG"^^xsd:string ; | 107 | rdfs:label "MPRG"^^xsd:string ; |
108 | rdfs:subClassOf report:AbstractMPR . | 108 | rdfs:subClassOf report:AbstractMPR . |
109 | 109 | ||
110 | report:MPRP | 110 | report:MPRP |
111 | - rdf:type owl:Class ; | 111 | + rdf:type report:ReportClass ; |
112 | rdfs:label "MPRP"^^xsd:string ; | 112 | rdfs:label "MPRP"^^xsd:string ; |
113 | rdfs:subClassOf report:AbstractMPR . | 113 | rdfs:subClassOf report:AbstractMPR . |
114 | 114 | ||
115 | report:NPTR | 115 | report:NPTR |
116 | - rdf:type owl:Class ; | 116 | + rdf:type report:ReportClass ; |
117 | rdfs:comment "Metadata about a Non-Productive Time Report."^^xsd:string ; | 117 | rdfs:comment "Metadata about a Non-Productive Time Report."^^xsd:string ; |
118 | rdfs:label "NPTR"^^xsd:string ; | 118 | rdfs:label "NPTR"^^xsd:string ; |
119 | rdfs:subClassOf foaf:Document . | 119 | rdfs:subClassOf foaf:Document . |
... | @@ -122,8 +122,14 @@ report:PDFFormat | ... | @@ -122,8 +122,14 @@ report:PDFFormat |
122 | rdf:type report:Format ; | 122 | rdf:type report:Format ; |
123 | rdfs:label "PDFFormat"^^xsd:string . | 123 | rdfs:label "PDFFormat"^^xsd:string . |
124 | 124 | ||
125 | +report:ReportClass | ||
126 | + rdf:type rdfs:Class ; | ||
127 | + rdfs:comment "Metaclass for the various report types."^^xsd:string ; | ||
128 | + rdfs:label "Report class"^^xsd:string ; | ||
129 | + rdfs:subClassOf owl:Class . | ||
130 | + | ||
125 | report:WDR | 131 | report:WDR |
126 | - rdf:type owl:Class ; | 132 | + rdf:type report:ReportClass ; |
127 | rdfs:comment "Metadata about a Weekly Drilling Report"^^xsd:string ; | 133 | rdfs:comment "Metadata about a Weekly Drilling Report"^^xsd:string ; |
128 | rdfs:label "WDR"^^xsd:string ; | 134 | rdfs:label "WDR"^^xsd:string ; |
129 | rdfs:subClassOf foaf:Document . | 135 | rdfs:subClassOf foaf:Document . | ... | ... |
-
Please register or login to post a comment