Commit 997da52
Jena 6 ont-api (#316)
* Migrate vocabularies to Jena ontapi; add ontology characterization tests
- Bump client dependency to 4.3.1-SNAPSHOT (pulls jena-ontapi transitively via Core)
- Migrate 19 vocabularies off the deprecated-for-removal org.apache.jena.ontology API to org.apache.jena.ontapi (OntModelFactory/OntSpecification), with a top-of-class static JenaSystem.init() guard (ontapi NPEs if a vocab class is the first Jena touch)
- Add characterization tests pinning current ontology behavior so the migration can be proven to retain it: imports closure + RDFS materialization, dual-key cache (addDocumentModel), SPARQL-first resolution (OntologyModelGetter), vocab triples
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Phase D: dissolve DataManager + migrate ontology pipeline to ontapi
Completes the dissolution in LinkedDataHub (0 [removal] warnings, was ~90):
- DataManagerImpl -> SameSiteSourceResolver (RDFSourceResolver subclass, same-site restriction)
- OntologyModelGetter -> OntologyRepository (SPARQL-first PrefixGraphRepository subclass)
- DataManagerFactory -> SourceResolverFactory (provides request-scoped RDFSourceResolver)
- Application: per-app OntModelSpec/OntDocumentManager -> per-app OntologyRepository; global repository + resolver; remove PrefixMapper/LocationMapper/OntDocumentManager wiring
- OntologyFilter/ClearOntology: ontapi OntModelFactory.createModel with OWL2_DL_MEM_RDFS_INF + materialize into OWL2_DL_MEM cached in the repository; dual-key import-closure caching preserved
- request ontology property Optional<Ontology> -> Optional<OntModel> (ontapi) across OntologyFactory + ~8 consumers (.getOntModel() dropped)
- Validator, ProxyRequestFilter, ValidatingModelProvider, Install/UninstallPackage: DataManager/OntModelSpec cache ops -> repository
- characterization tests adapted to new API (OntologyRepositoryTest, OntologyFilterTest); 69 tests green
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fix OntologyFilter: flatten owl:imports closure manually, not via ontapi union-graph repository
OntModelFactory.createModel(graph, spec, repository) registers graphs in an OntUnionGraphRepository keyed by ontology ID, which collided with the same graph already in our flat PrefixGraphRepository cache (OntJenaException: 'Another graph with name <...#> is already in the hierarchy', thrown at runtime on the first /ns request).
Replace it with explicit owl:imports closure traversal (loadClosure) that unions the base + imports into one graph, runs RDFS inference over that, and materializes — so createModel is only ever called WITHOUT a repository (no union-hierarchy registration). Encapsulates the duplicated OntologyFilter/ClearOntology load logic into OntologyFilter.loadOntology. OntologyImportsCharacterizationTest now exercises loadOntology and asserts the materialized closure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fix empty constructed response: use OWL1_FULL_MEM so rdfs:Class is recognized
GET /ns?forClass=...#Item returned an empty graph: dh:Item is declared 'a rdfs:Class' (dh.ttl), and the ontapi OWL2_DL_MEM profile I'd used does not recognize rdfs:Class as an OntClass, so Namespace's getOntClass(uri) returned null and no SPIN constructor ran. Legacy OntModelSpec.OWL_MEM is OWL 1 Full (recognizes rdfs:Class); the correct ontapi mapping is OWL1_FULL_MEM, not OWL2_DL_MEM. Applied across OntologyFilter pipeline + all vocab holders. OntologyImportsCharacterizationTest now guards getOntClass(rdfs:Class) != null.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Use twirl 1.2.0-SNAPSHOT; drop redundant SPIN personality registration
twirl 1.2.0 re-bases the constraint model onto its own SPIN personality, so the ontapi ontology model can be passed straight to SPINConstraints.check; LDH no longer needs to register SPIN into the global personality.
- twirl 1.1.0 -> 1.2.0-SNAPSHOT
- Remove SP.init(BuiltinPersonalities.model) from Application (Web-Client Constructor reads sp:text directly; nothing else needed the global registration)
- Add SPINConstraintValidationTest: guards the Validator path and the raw-ontapi-via-twirl-rebase path
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: re-run against deployed twirl/core snapshots
* ci: re-run against deployed twirl/core snapshots
* Normalize ontologies to owl:Class; use OWL2_FULL_MEM profile
The document/LDT/ACL ontology classes were declared bare rdfs:Class, which no OWL2 ontapi profile recognizes as an OntClass — forcing OWL1_FULL_MEM (which in turn bans named individuals, breaking SD). Declare them owl:Class (dual with rdfs:Class) and switch all OntSpecification usages from OWL1_FULL_MEM to OWL2_FULL_MEM, so getOntClass/forClass works and named individuals are allowed.
- dh.ttl/ldt.ttl/lacl.ttl: class declarations now 'a rdfs:Class, owl:Class'
- vocab holders + OntologyFilter + ConstructForClass: OWL1_FULL_MEM -> OWL2_FULL_MEM
- remove dead 'import com.atomgraph.client.locator.PrefixMapper' (deleted in Web-Client)
- OntologyImportsCharacterizationTest: assert owl:Class (not rdfs:Class) is recognized
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Add debug output to add-property-constraint and GET-proxied-ontology-ns tests
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Removed debug output
* Tests for RDFS ontology imports
* Promote rdfs:Class to owl:Class during ontology materialization
OWL2 profiles do not recognise bare rdfs:Class as OntClass, so third-party
vocab terms declared only as rdfs:Class (e.g. sp:Describe in sp.ttl) were
invisible to getOntClass() lookups, returning empty forClass constructor responses.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Repoint PrefixGraphRepository import to Web-Client; replace deprecated Model.write with RDFWriter
- Update imports to com.atomgraph.client.util.jena.PrefixGraphRepository (moved out of Core):
Application, OntologyFilter, OntologyRepository, SourceResolverFactory, SameSiteSourceResolver + tests
- XSLTWriterBase: use RDFWriter instead of deprecated Model.write, keeping plain RDF/XML
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* SNAPSHOT bump
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1bff739 commit 997da52
51 files changed
Lines changed: 1264 additions & 828 deletions
File tree
- http-tests/document-hierarchy
- src
- main
- java/com/atomgraph
- linkeddatahub
- resource
- admin
- pkg
- server
- event
- factory
- filter/request
- io
- model/impl
- util
- vocabulary
- writer
- factory
- impl
- server
- io
- util
- vocabulary
- resources/com/atomgraph/linkeddatahub
- app/admin
- test/java/com/atomgraph/linkeddatahub
- server
- filter/request
- util
- vocabulary
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
Lines changed: 68 additions & 87 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
| 144 | + | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
Lines changed: 6 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | | - | |
| 22 | + | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | | - | |
| 33 | + | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
| 83 | + | |
| 84 | + | |
87 | 85 | | |
88 | 86 | | |
89 | | - | |
| 87 | + | |
90 | 88 | | |
91 | 89 | | |
92 | 90 | | |
| |||
116 | 114 | | |
117 | 115 | | |
118 | 116 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 117 | + | |
132 | 118 | | |
133 | 119 | | |
134 | 120 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
Lines changed: 10 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | | - | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
| |||
88 | 86 | | |
89 | 87 | | |
90 | 88 | | |
91 | | - | |
92 | 89 | | |
93 | 90 | | |
94 | 91 | | |
| |||
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
108 | | - | |
109 | 105 | | |
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
113 | | - | |
114 | 109 | | |
115 | 110 | | |
116 | 111 | | |
| |||
242 | 237 | | |
243 | 238 | | |
244 | 239 | | |
245 | | - | |
246 | | - | |
| 240 | + | |
| 241 | + | |
247 | 242 | | |
248 | | - | |
249 | | - | |
250 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
251 | 246 | | |
252 | 247 | | |
253 | 248 | | |
| |||
284 | 279 | | |
285 | 280 | | |
286 | 281 | | |
287 | | - | |
288 | | - | |
| 282 | + | |
| 283 | + | |
289 | 284 | | |
290 | | - | |
291 | | - | |
292 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
293 | 288 | | |
294 | 289 | | |
295 | 290 | | |
| |||
522 | 517 | | |
523 | 518 | | |
524 | 519 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | 520 | | |
535 | 521 | | |
536 | 522 | | |
| |||
0 commit comments