/** * E.g. http://purl.obolibrary.org/obo/go.owl to "go"<br> * if does not match this pattern, then retain original IRI * * @param ontology the ontology * @return The OBO ID of the ontology */ public static String getOntologyId(OWLOntology ontology) { return getOntologyId(ontology.getOntologyID().getOntologyIRI().get()); }
/** * E.g. http://purl.obolibrary.org/obo/go.owl to "go"<br> * if does not match this pattern, then retain original IRI * * @param ontology the ontology * @return The OBO ID of the ontology */ public static String getOntologyId(OWLOntology ontology) { return getOntologyId(ontology.getOntologyID().getOntologyIRI().get()); }
/** * E.g. http://purl.obolibrary.org/obo/go.owl to "go"<br> * if does not match this pattern, then retain original IRI * * @param ontology the ontology * @return The OBO ID of the ontology */ public static String getOntologyId(OWLOntology ontology) { return getOntologyId(ontology.getOntologyID().getOntologyIRI().get()); }
/** * E.g. http://purl.obolibrary.org/obo/go.owl to "go"<br> * if does not match this pattern, then retain original IRI * * @param ontology the ontology * @return The OBO ID of the ontology */ public static String getOntologyId(OWLOntology ontology) { return getOntologyId(ontology.getOntologyID().getOntologyIRI().get()); }
/** * Gets the data version. * * @param ontology the ontology * @return the data version */ @Nullable public static String getDataVersion(OWLOntology ontology) { String oid = getOntologyId(ontology); Optional<IRI> v = ontology.getOntologyID().getVersionIRI(); if (v.isPresent()) { String vs = v.get().toString().replace("http://purl.obolibrary.org/obo/", ""); vs = vs.replaceFirst(oid + '/', ""); vs = vs.replace('/' + oid + ".owl", ""); return vs; } return null; }
/** * Gets the data version. * * @param ontology the ontology * @return the data version */ @Nullable public static String getDataVersion(OWLOntology ontology) { String oid = getOntologyId(ontology); Optional<IRI> v = ontology.getOntologyID().getVersionIRI(); if (v.isPresent()) { String vs = v.get().toString().replace("http://purl.obolibrary.org/obo/", ""); vs = vs.replaceFirst(oid + '/', ""); vs = vs.replace('/' + oid + ".owl", ""); return vs; } return null; }
/** * Convert. * * @param ont the ont * @return the oBO doc */ public OBODoc convert(OWLOntology ont) { owlOntology = ont; ontologyId = getOntologyId(ont); init(); return tr(); }
/** * Convert. * * @param ont the ont * @return the oBO doc */ public OBODoc convert(OWLOntology ont) { owlOntology = ont; ontologyId = getOntologyId(ont); init(); return tr(); }
/** * Gets the data version. * * @param ontology the ontology * @return the data version */ @Nullable public static String getDataVersion(OWLOntology ontology) { String oid = getOntologyId(ontology); Optional<IRI> v = ontology.getOntologyID().getVersionIRI(); if (v.isPresent()) { String vs = v.get().toString().replace("http://purl.obolibrary.org/obo/", ""); vs = vs.replaceFirst(oid + '/', ""); vs = vs.replace('/' + oid + ".owl", ""); return vs; } return null; }
/** * Convert. * * @param ont the ont * @return the oBO doc */ public OBODoc convert(OWLOntology ont) { owlOntology = ont; ontologyId = getOntologyId(ont); init(); return tr(); }
/** * Gets the data version. * * @param ontology the ontology * @return the data version */ @Nullable public static String getDataVersion(OWLOntology ontology) { String oid = getOntologyId(ontology); Optional<IRI> v = ontology.getOntologyID().getVersionIRI(); if (v.isPresent()) { String vs = v.get().toString().replace("http://purl.obolibrary.org/obo/", ""); vs = vs.replaceFirst(oid + '/', ""); vs = vs.replace('/' + oid + ".owl", ""); return vs; } return null; }
/** * Convert. * * @param ont the ont * @return the oBO doc */ public OBODoc convert(OWLOntology ont) { owlOntology = ont; ontologyId = getOntologyId(ont); init(); return tr(); }
.forEach(iri -> f.addClause(new Clause(OboFormatTag.TAG_IMPORT.getTag()) .withValue(iri.toString()))); String id = getOntologyId(ontology); Clause c = new Clause(OboFormatTag.TAG_ONTOLOGY.getTag()); c.setValue(id);
.forEach(iri -> f.addClause(new Clause(OboFormatTag.TAG_IMPORT.getTag()) .withValue(iri.toString()))); String id = getOntologyId(ontology); Clause c = new Clause(OboFormatTag.TAG_ONTOLOGY.getTag()); c.setValue(id);
.forEach(iri -> f.addClause(new Clause(OboFormatTag.TAG_IMPORT.getTag()) .withValue(iri.toString()))); String id = getOntologyId(ontology); Clause c = new Clause(OboFormatTag.TAG_ONTOLOGY.getTag()); c.setValue(id);
.forEach(iri -> f.addClause(new Clause(OboFormatTag.TAG_IMPORT.getTag()) .withValue(iri.toString()))); String id = getOntologyId(ontology); Clause c = new Clause(OboFormatTag.TAG_ONTOLOGY.getTag()); c.setValue(id);