public static String getDataVersion(OWLOntology ontology) { String oid = getOntologyId(ontology); IRI v = ontology.getOntologyID().getVersionIRI(); if (v != null) { String vs = v.toString().replace("http://purl.obolibrary.org/obo/", ""); vs = vs.replaceFirst(oid+"/", ""); vs = vs.replace("/"+oid+".owl", ""); return vs; } return null; }
public OBODoc convert(OWLOntology ont) throws OWLOntologyCreationException { owlOntology = ont; if (ont != null) { ontologyId = getOntologyId(ont); } else { ontologyId = "TODO"; } init(); return tr(); }
/** * E.g. http://purl.obolibrary.org/obo/go.owl --> "go" * * if does not match this pattern, then retain original IRI * * @param ontology * @return The OBO ID of the ontology */ public static String getOntologyId(OWLOntology ontology){ return getOntologyId(ontology.getOntologyID().getOntologyIRI()); }
String ontologyId = Owl2Obo.getOntologyId(ontology); if(outputFile == null){ gciFile = new File(config.outputdir.getValue(), ontologyId+ "-aux.owl").getAbsolutePath(); outputFilePath = Owl2Obo.getOntologyId(ontology) + ".obo";
String id = getOntologyId(owlOntology);