blazegraph / database

Blazegraph High Performance Graph Database
GNU General Public License v2.0
871 stars 170 forks source link

How to hook a vocabulary class for defining new geospatial datatypes? #189

Closed lisha992610 closed 3 years ago

lisha992610 commented 3 years ago

Hello, I am new to blazegraph and would like to create some new geospatial datatypes for geospatial querying.

I am starting the database with 'blazegraph.jar' directly and if running with 'RWStore.properties' file, the configuration of the database can be modified.

I understand the example regarding customizing geospatial datatypes within 'RWStore.properties' file, but there is not much about how to do the step "hook a vocabulary class that defines your datatype URI as vocabulary item". and the documentation about specifying a Vocabulary class is unclear for me. Could you advise me how I should do it correctly with some example?

The docu has provided an example of [customized vocabulary class with some java classes] (https://github.com/blazegraph/database/wiki/InlineIVs#example-custom-vocabulary), but since I work with blazegraph.jar directly, Is there a more simple way to specify a vocabulary class and hook it, then just define the new geospatial datatype in RWStore.properties?

Thank you for any help.

beebs-systap commented 3 years ago

Java doesn’t obey the classpath when it’s run as an executable jar. Instead run the NanoSparqlServer directly such as https://github.com/blazegraph/database/wiki/NanoSparqlServer#command-line-using-jetty.

java -cp your-vocab-jar.jar:blazegraph.jar -server com.bigdata.rdf.sail.webapp.NanoSparqlServer