minimum geosparql example #4504
-
Dear All, I am trying to develop a minimum example in geosparql, following this documentation: https://rdf4j.org/documentation/programming/geosparql/ I have the idea, that I should be able to build the example using code, but when I tried to do it, model.add(eiffelTower, GEO.hasGeometry, coordinateset ); Could you tell me if building the model from code is possible?, or if I have to edit the model somewhere else, Best regards Luis Ramos |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I am not immediately sure why we don't have those as constants in our vocabulary classes - seems an odd oversight. I've logged a feature request: #4505. In the meantime though, it shouldn't stop you from creating these models using RDF4J. You can create all relevant IRIs yourself, for example like so: import static org.eclipse.rdf4j.model.util.Values.iri;
model.add(eiffelTower, iri(GEO.NAMESPACE, "hasGeometry"), coordinateset);
model.add(coordinateset, RDF.TYPE, iri(GEOF.NAMESPACE, "Point")); Doing them inline here for brevity but of course if you plan reusing them, you're best off creating your own reusable constants. |
Beta Was this translation helpful? Give feedback.
-
Thanks so much @abrokenjester , I edited the ontology on protégé, uploaded it, and did my basic test. |
Beta Was this translation helpful? Give feedback.
I am not immediately sure why we don't have those as constants in our vocabulary classes - seems an odd oversight. I've logged a feature request: #4505.
In the meantime though, it shouldn't stop you from creating these models using RDF4J. You can create all relevant IRIs yourself, for example like so:
Doing them inline here for brevity but of course if you plan reusing them, you're best off creating your own reusable constants.