问题
In Jena there are some default ontologies like RDF, FOAF...
So we can add property to resource like:
resource.addProperty(FOAF.name, person.getMFirstName());
But I need another ontology that does not exist in Jena like SIOC, pimo that I have the URI for.
How can I do this?
回答1:
Jena has a tool for generating Java classes that contain the constants from ontologies and RDF schemas: schemagen
来源:https://stackoverflow.com/questions/5979747/how-to-add-vocabulary-in-jena