Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve namespace declaration parsing #688

Open
dgarijo opened this issue Apr 4, 2024 · 0 comments
Open

Improve namespace declaration parsing #688

dgarijo opened this issue Apr 4, 2024 · 0 comments

Comments

@dgarijo
Copy link
Owner

dgarijo commented Apr 4, 2024

As shown in https://stackoverflow.com/questions/65480889/extracting-ontology-namespaces-prefixes-with-owl-api, there is a native method to retrieve all namespaces.

The method public void loadNamespaceDeclarations(OWLOntology o) in Configuration.java loads the namespaces into a hashmap. However, this is a little redundant, since the following already returns all ns:

Map<String, String> map = format.asPrefixOWLDocumentFormat().getPrefixName2PrefixMap();

Should take the existing map and modify the preferrednsPrefix, instead of re-parsing everything again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant