diff --git a/owlapi/src/main/java/com/clarkparsia/owlapiv3/OntologyUtils.java b/owlapi/src/main/java/com/clarkparsia/owlapiv3/OntologyUtils.java index e503367fe..b3619590f 100644 --- a/owlapi/src/main/java/com/clarkparsia/owlapiv3/OntologyUtils.java +++ b/owlapi/src/main/java/com/clarkparsia/owlapiv3/OntologyUtils.java @@ -66,40 +66,10 @@ public static boolean containsClass(Set> classes, OWLClass cls) { } /** - * Given a set of OWL-API axiom, return its signature. + * Given an axiom, return its signature. */ public static Set getSignature(OWLAxiom axiom) { - Set entities = new HashSet(); - DeprecatedOWLEntityCollector collector = new DeprecatedOWLEntityCollector( - entities); - collector.setCollectDatatypes( false ); - axiom.accept(collector); - - return entities; - } - - /** - * @deprecated Use {@link #createOntology(Collection)} instead - */ - @Deprecated - public static OWLOntology getOntologyFromAxioms(Collection axioms) { - return OWL.Ontology( axioms ); - } - - /** - * @deprecated Use {@link #createOntology(Collection, IRI)} instead - */ - @Deprecated - public static OWLOntology getOntologyFromAxioms(Collection axioms, IRI iri) { - return OWL.Ontology( axioms, iri ); - } - - /** - * @deprecated Use {@link #createOntology(OWLAxiom...)} instead - */ - @Deprecated - public static OWLOntology getOntologyFromAxioms(OWLAxiom... axioms) { - return OWL.Ontology( Arrays.asList( axioms ) ); + return axiom.getSignature(); } public static OWLOntologyManager getOWLOntologyManager() { @@ -129,7 +99,7 @@ public static OWLOntology loadOntology( String uri ) { /** * Loads the ontology with given URI. * - * @param uri the ontology uri + * @param inputStream input ontology * @return the ontology */ public static OWLOntology loadOntology( InputStream inputStream ) { @@ -167,8 +137,8 @@ public static OWLOntology loadOntology( String uri, boolean withAnnotations ) { * leaving only logical axioms. * * @see #removeAllAnnotations(OWLOntology, OWLOntologyManager) - * @param uri - * the ontology uri + * @param inputStream + * input stream * @param withAnnotations * if false removes all annotation axioms from the * ontology, otherwise leaves the ontology intact @@ -186,8 +156,6 @@ public static OWLOntology loadOntology( InputStream inputStream, boolean withAnn /** * Prints a set of axioms to console - * - * @param args */ public static void printAxioms(Collection axioms) { for( OWLAxiom axiom : axioms ) { @@ -197,8 +165,6 @@ public static void printAxioms(Collection axioms) { /** * Prints an ontology to console - * - * @param args */ public static void printOntology(OWLOntology ont) { printAxioms( ont.getAxioms() ); @@ -218,11 +184,10 @@ public static void save(OWLOntology ont, String path) throws OWLOntologyStorageE /** * Update the ontology by adding or removing the given set of axioms - * - * @param OWLObject - * axiom - the axiom to add/remove - * @param boolean - * add - true - add; false - delete + * + * @param ontology target ontology + * @param axioms the axiom to add/remove + * @param add true - add; false - delete */ public static void updateOntology(OWLOntology ontology, Collection axioms, boolean add) { List changes = new ArrayList();