Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 04b3d9c1 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- suppressed superfluous cast

parent 708121bf
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ public class JENAOntologyFactory extends OntologyFactory { ...@@ -59,7 +59,7 @@ public class JENAOntologyFactory extends OntologyFactory {
// If no URI can be extracted from ontology, then we use the physical URI // If no URI can be extracted from ontology, then we use the physical URI
try { try {
try { try {
onto.setURI(new URI(((Ontology)((OntModel)ontology).listOntologies().next()).getURI())); onto.setURI(new URI(((OntModel)ontology).listOntologies().next().getURI()));
} catch (NoSuchElementException nse) { } catch (NoSuchElementException nse) {
// JE: not verysafe // JE: not verysafe
onto.setURI(new URI(((OntModel)ontology).getNsPrefixURI(""))); onto.setURI(new URI(((OntModel)ontology).getNsPrefixURI("")));
...@@ -89,7 +89,7 @@ public class JENAOntologyFactory extends OntologyFactory { ...@@ -89,7 +89,7 @@ public class JENAOntologyFactory extends OntologyFactory {
// to be checked : why several ontologies in a model ??? // to be checked : why several ontologies in a model ???
// If no URI can be extracted from ontology, then we use the physical URI // If no URI can be extracted from ontology, then we use the physical URI
try { try {
onto.setURI(new URI(((Ontology)m.listOntologies().next()).getURI())); onto.setURI(new URI(m.listOntologies().next().getURI()));
} catch (NoSuchElementException nse) { } catch (NoSuchElementException nse) {
onto.setURI(new URI(m.getNsPrefixURI(""))); onto.setURI(new URI(m.getNsPrefixURI("")));
//onto.setFile(uri); //onto.setFile(uri);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment