confusions between .rdf and .owl extensions with Jena -


jena cannot process owl format files, used protégé create ontology, saved rdf/xml, file ended .owl. following code read ontology using owl-full language.

ontmodel model = modelfactory.createontologymodel(ontmodelspec.owl_mem); model.read(fileinputstream, null); // read(fileinputstream, "rdf/xml") 

shouldn't use rdfs somewhere?

protege meant work owl, that's why have .owl extension file. nonethless, if saved "rdf/xml" in protege, generates valid rdf document should able open tools capable of processing plain rdf (like jena). small hack replace .owl .rdf extension.

what suggest understand issue:

  • open .owl file text editor. should see rdf/xml inside.

  • validate content of file in order see content serialised in rdf. can instance use online tool http://www.w3.org/rdf/validator/ that.

  • if don't rdf/xml format, can convert turtle, tool such http://www.rdfabout.com/demo/validator/ instance (i think jena provides methods too).

  • save triples in file .rdf extension, should readable rdf tools now.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -