
de.uni_stuttgart.vis.vowl.owl2vowl.converter.OntologyConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of OWL2VOWL Show documentation
Show all versions of OWL2VOWL Show documentation
Owl2Vowl is an ontology converter used to convert the given ontology to a json
format that is used in the WebVOWL visualization. See
https://github.com/VisualDataWeb/WebVOWL or http://vowl.visualdataweb.org/.
The newest version!
package de.uni_stuttgart.vis.vowl.owl2vowl.converter;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
/**
*
*/
public class OntologyConverter extends AbstractConverter {
private static final Logger logger = LogManager.getLogger(OntologyConverter.class);
public OntologyConverter(OWLOntology ontology) {
this.ontology = ontology;
}
public OntologyConverter(OWLOntology ontology, String ontologyIRI) {
this(ontology);
loadedOntologyPath = ontologyIRI;
}
@Override
protected void loadOntology() throws OWLOntologyCreationException {
logger.info("Converting Ontolgy...");
logger.info("Loading ontology ... [" + ontology + "]");
manager = ontology.getOWLOntologyManager();
loadedOntologyPath = "Direct ontology";
String logOntoName;
if (!ontology.isAnonymous()) {
logOntoName = ontology.getOntologyID().getOntologyIRI().get().toString();
} else {
logOntoName = "Anonymous";
logger.info("Ontology IRI is anonymous.");
}
logger.info("Ontologies loaded! Main Ontology: " + logOntoName);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy