> I can not get the default namespace of a OntModel, the OntModel was got from
> TDB with fuseki, and the code is below,
> DatasetAccessor du = DatasetAccessorFactory.createHTTP(serviceREST);
> Model o = du.getModel();
> OntModel om = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM, o);
> System.out.println( om.getNsPrefixURI(""));
>
> in addition, I can only get four prefixmappings with om.getNsPrefixMap(),
> which are {rdfs=http://www.w3.org/2000/01/rdf-schema#,
> xsd=http://www.w3.org/2001/XMLSchema#, owl=http://www.w3.org/2002/07/owl#,
> rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#}. But there are ten prefixes
> in the model actually.
What do you mean by "actually"?
The prefix mappings of a model are those that come from prefix
declarations in the loaded model, ie xml namespace declarations
in RDF/XML or @prefix declarations in Turtle, or prefixes that have
been added by calls in your code.
If the original data didn't define prefixes, they won't be in your model
either.
Chris
--
"The wizard seemed quite willing when I talked to him." /Howl's Moving Castle/
Epimorphics Ltd, http://www.epimorphics.com
Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT
Epimorphics Ltd. is a limited company registered in England (number 7016688)