On 10/01/14 08:34, Deyan Chen wrote:
hey,

About meta data (ontology document manager policy file) search path, we
can get the default search path by the following code,

OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
System.out.println(model.getDocumentManager().getMetadataSearchPath());

The output is as the follows,

file:ont-policy.rdf;file:etc/ont-policy.rdf

In jena 2.10.0, the test result is ok. But I find  jena 2.11.0 only
support "file:ont-policy.rdf". That is to say, when I place the
ont-policy.rdf into {project-directory}/etc, it can't find it. When we
perform the following code to specify it,

model.getDocumentManager().setMetadataSearchPath("file:etc/ont-policy.rdf",
true);

then it's ok.

That's useful to know. It suggests it was the change between 2.10.0 and 2.10.1 that moved src/main/resources/ont-policy.rdf from etc/ont-policy.rdf. The old LocatorClassLoader happens to skip "file:" so it loads the first found ... which is the default .. then concludes.

$ svn log src/main/resources/ont-policy.rdf
------------------------------------------------------------------------
r1455078 |    | 2013-03-11 10:01:29 +0000 (Mon, 11 Mar 2013) | 1 line

Moved OntDocumentManager default policy to src/main/resources from etc/ont-policy.rdf.

Could you reopen JENA-525 and record this please?

(JENA-525 fixed a different issue but the presenting symptoms are very similar)

        Andy


https://issues.apache.org/jira/browse/JENA-525



deyan chen
---------------------------------------------------------------------------------------------------

Confidentiality Notice: The information contained in this e-mail and any
accompanying attachment(s) is intended only for the use of the intended
recipient and may be confidential and/or privileged of Neusoft
Corporation, its subsidiaries and/or its affiliates. If any reader of
this communication is not the intended recipient, unauthorized use,
forwarding, printing,  storing, disclosure or copying is strictly
prohibited, and may be unlawful.If you have received this communication
in error,please immediately notify the sender by return e-mail, and
delete the original message and all copies from your system. Thank you.
---------------------------------------------------------------------------------------------------


Reply via email to