public class OWLAPIObo2Owl extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<String,org.semanticweb.owlapi.model.IRI> |
ANNOTATIONPROPERTYMAP
The annotation property map.
|
protected Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> |
apToDeclare
The ap to declare.
|
protected Map<String,org.semanticweb.owlapi.model.OWLClass> |
clsToDeclare
The cls to declar.
|
protected String |
defaultIDSpace
The default id space.
|
protected org.semanticweb.owlapi.model.OWLDataFactory |
fac
The fac.
|
protected Map<String,String> |
idSpaceMap
The id space map.
|
static String |
IRI_PROP_ISREVERSIBLEPROPERTYCHAIN
The Constant IRI_PROP_isReversiblePropertyChain.
|
protected org.semanticweb.owlapi.model.OWLOntologyManager |
manager
The manager.
|
protected OBODoc |
obodoc
The obodoc.
|
protected org.semanticweb.owlapi.model.OWLOntology |
owlOntology
The owl ontology.
|
protected Map<String,org.semanticweb.owlapi.model.OWLAnnotationProperty> |
typedefToAnnotationProperty
The typedef to annotation property.
|
| Constructor and Description |
|---|
OWLAPIObo2Owl(org.semanticweb.owlapi.model.OWLOntologyManager manager)
Instantiates a new oWLAPI obo2 owl.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(org.semanticweb.owlapi.model.OWLAxiom axiom)
Adds the.
|
protected void |
add(Set<org.semanticweb.owlapi.model.OWLAxiom> axioms)
Adds the.
|
protected void |
addDeclaredAnnotationProperties(Collection<org.semanticweb.owlapi.model.OWLAnnotationProperty> declaredProperties)
Adds the declared annotation properties.
|
protected void |
addOntologyAnnotation(org.semanticweb.owlapi.model.OWLAnnotationProperty ap,
org.semanticweb.owlapi.model.OWLAnnotationValue v,
Set<org.semanticweb.owlapi.model.OWLAnnotation> annotations)
Adds the ontology annotation.
|
protected void |
addPropertyValueHeaders(Collection<Clause> clauses)
Adds the property value headers.
|
protected void |
apply(List<org.semanticweb.owlapi.model.OWLOntologyChange> changes)
Apply the changes.
|
protected void |
apply(org.semanticweb.owlapi.model.OWLOntologyChange change)
Apply the change.
|
org.semanticweb.owlapi.model.OWLOntology |
convert(OBODoc doc)
Convert.
|
org.semanticweb.owlapi.model.OWLOntology |
convert(OBODoc doc,
org.semanticweb.owlapi.model.OWLOntology in)
Convert.
|
org.semanticweb.owlapi.model.OWLOntology |
convert(String oboFile)
Creates an OBOFormatParser object to parse a file and then converts it
using the convert method.
|
static void |
convertURL(String iri,
String outFile,
org.semanticweb.owlapi.model.OWLOntologyManager manager)
Static convenience method which: (1) creates an Obo2Owl bridge object (2)
parses an obo file from a URL (3) converts that to an OWL ontology (4)
saves the OWL ontology as RDF/XML.
|
static void |
convertURL(String iri,
String outFile,
String defaultOnt,
org.semanticweb.owlapi.model.OWLOntologyManager manager)
See.
|
protected String |
getDefaultIDSpace()
Gets the default id space.
|
protected static String |
getIdPrefix(String x)
Gets the id prefix.
|
org.semanticweb.owlapi.model.OWLOntologyManager |
getManager()
Gets the manager.
|
OBODoc |
getObodoc()
Gets the obodoc.
|
protected org.semanticweb.owlapi.model.OWLOntology |
getOwlOntology()
Gets the owl ontology.
|
protected static boolean |
getQVBoolean(String q,
Collection<QualifierValue> quals)
Gets the qV boolean.
|
protected static Integer |
getQVInt(String q,
Collection<QualifierValue> quals)
Gets the qV int.
|
protected static String |
getQVString(String q,
Collection<QualifierValue> quals)
Gets the qV string.
|
protected static String |
getURI(String path)
Gets the uri.
|
protected void |
init(org.semanticweb.owlapi.model.OWLOntologyManager m)
Init
|
protected static Map<String,org.semanticweb.owlapi.model.IRI> |
initAnnotationPropertyMap()
Table 5.8 Translation of Annotation Vocabulary.
|
protected String |
mapPropId(String id)
See section "header macros" and treat-xrefs-as-equivalent.
|
org.semanticweb.owlapi.model.IRI |
oboIdToIRI(String id)
Obo id to iri.
|
protected void |
postProcess(org.semanticweb.owlapi.model.OWLOntology ontology)
perform any necessary post-processing.
|
void |
setManager(org.semanticweb.owlapi.model.OWLOntologyManager manager)
Sets the manager.
|
void |
setObodoc(OBODoc obodoc)
Sets the obodoc.
|
protected void |
setOwlOntology(org.semanticweb.owlapi.model.OWLOntology owlOntology)
Sets the owl ontology.
|
protected org.semanticweb.owlapi.model.OWLOntology |
tr(org.semanticweb.owlapi.model.OWLOntology in)
Tr.
|
protected org.semanticweb.owlapi.model.OWLAnnotationProperty |
trAnnotationProp(String relId)
Tr annotation prop.
|
protected Set<org.semanticweb.owlapi.model.OWLAnnotation> |
trAnnotations(Clause clause)
Tr annotations.
|
protected void |
trAnnotations(Clause clause,
Set<org.semanticweb.owlapi.model.OWLAnnotation> anns)
Tr annotations.
|
protected Set<? extends org.semanticweb.owlapi.model.OWLAnnotation> |
trAnnotations(Collection<Clause> clauses)
Tr annotations.
|
protected Set<org.semanticweb.owlapi.model.OWLAxiom> |
translateAltIds(Collection<Clause> clauses,
org.semanticweb.owlapi.model.IRI replacedBy,
boolean isClass)
Generate axioms for the alternate identifiers of an
OWLClass or
OWLObjectProperty. |
protected String |
translateShorthandIdToExpandedId(String id)
Translate shorthand id to expanded id.
|
protected org.semanticweb.owlapi.model.OWLClassExpression |
trClass(Object v)
Tr class.
|
protected org.semanticweb.owlapi.model.OWLClass |
trClass(String classId)
Tr class.
|
protected org.semanticweb.owlapi.model.OWLAxiom |
trGenericClause(org.semanticweb.owlapi.model.OWLAnnotationSubject sub,
String tag,
Clause clause)
Tr generic clause.
|
protected org.semanticweb.owlapi.model.OWLAxiom |
trGenericClause(org.semanticweb.owlapi.model.OWLNamedObject e,
String tag,
Clause clause)
Tr generic clause.
|
void |
trHeaderFrame(Frame headerFrame)
Tr header frame.
|
protected org.semanticweb.owlapi.model.OWLIndividual |
trIndividual(String instId)
Tr individual.
|
protected org.semanticweb.owlapi.model.OWLAxiom |
trIntersectionOf(org.semanticweb.owlapi.model.OWLClass cls,
Collection<Clause> clauses)
Tr intersection of.
|
protected org.semanticweb.owlapi.model.OWLAnnotationValue |
trLiteral(Object inputValue)
Tr literal.
|
protected org.semanticweb.owlapi.model.OWLObjectPropertyExpression |
trObjectProp(Object v)
Tr object prop.
|
protected org.semanticweb.owlapi.model.OWLObjectProperty |
trObjectProp(String relId)
Tr object prop.
|
org.semanticweb.owlapi.model.OWLClassExpression |
trRel(String relId,
String classId,
Collection<QualifierValue> quals)
Tr rel.
|
protected static org.semanticweb.owlapi.model.OWLAxiom |
trRelationIntersectionOf(String id,
org.semanticweb.owlapi.model.OWLProperty p,
Collection<Clause> clauses)
Tr relation intersection of.
|
protected static org.semanticweb.owlapi.model.OWLAxiom |
trRelationUnionOf(String id,
org.semanticweb.owlapi.model.OWLProperty p,
Collection<Clause> clauses)
Tr relation union of.
|
protected org.semanticweb.owlapi.model.OWLAnnotationProperty |
trSynonymType(String type)
Tr synonym type.
|
protected org.semanticweb.owlapi.model.OWLAnnotationProperty |
trTagToAnnotationProp(String tag)
Tr tag to annotation prop.
|
static org.semanticweb.owlapi.model.IRI |
trTagToIRI(String tag)
Tr tag to iri.
|
protected org.semanticweb.owlapi.model.OWLAxiom |
trTermClause(org.semanticweb.owlapi.model.OWLClass cls,
String tag,
Clause clause)
#5.2
|
org.semanticweb.owlapi.model.OWLClassExpression |
trTermFrame(Frame termFrame)
Tr term frame.
|
Set<org.semanticweb.owlapi.model.OWLAxiom> |
trTermFrameClauses(org.semanticweb.owlapi.model.OWLClass cls,
Collection<Clause> clauses,
String t)
Tr term frame clauses.
|
protected org.semanticweb.owlapi.model.OWLAxiom |
trTypedefClause(org.semanticweb.owlapi.model.OWLObjectProperty p,
String tag,
Clause clause)
Tr typedef clause.
|
org.semanticweb.owlapi.model.OWLNamedObject |
trTypedefFrame(Frame typedefFrame)
Tr typedef frame.
|
protected org.semanticweb.owlapi.model.OWLNamedObject |
trTypedefToAnnotationProperty(Frame typedefFrame)
Tr typedef to annotation property.
|
protected org.semanticweb.owlapi.model.OWLAxiom |
trUnionOf(org.semanticweb.owlapi.model.OWLClass cls,
Collection<Clause> clauses)
Tr union of.
|
public static final String IRI_PROP_ISREVERSIBLEPROPERTYCHAIN
protected String defaultIDSpace
protected org.semanticweb.owlapi.model.OWLOntologyManager manager
protected org.semanticweb.owlapi.model.OWLOntology owlOntology
protected org.semanticweb.owlapi.model.OWLDataFactory fac
protected OBODoc obodoc
public static final Map<String,org.semanticweb.owlapi.model.IRI> ANNOTATIONPROPERTYMAP
protected final Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> apToDeclare
protected final Map<String,org.semanticweb.owlapi.model.OWLClass> clsToDeclare
public OWLAPIObo2Owl(org.semanticweb.owlapi.model.OWLOntologyManager manager)
manager - the managerprotected void init(org.semanticweb.owlapi.model.OWLOntologyManager m)
m - the managerpublic static void convertURL(String iri, String outFile, org.semanticweb.owlapi.model.OWLOntologyManager manager) throws IOException, org.semanticweb.owlapi.model.OWLOntologyCreationException, org.semanticweb.owlapi.model.OWLOntologyStorageException
iri - the irioutFile - the out filemanager - manager to useIOException - Signals that an I/O exception has occurred.org.semanticweb.owlapi.model.OWLOntologyCreationException - the oWL ontology creation exceptionorg.semanticweb.owlapi.model.OWLOntologyStorageException - the oWL ontology storage exceptionOBOFormatParserException - the oBO format parser exceptionpublic static void convertURL(String iri, String outFile, String defaultOnt, org.semanticweb.owlapi.model.OWLOntologyManager manager) throws IOException, org.semanticweb.owlapi.model.OWLOntologyCreationException, org.semanticweb.owlapi.model.OWLOntologyStorageException
iri - the irioutFile - the out filedefaultOnt - -- e.g. "go". If the obo file contains no "ontology:" header tag,
this is addedmanager - the manager to be usedIOException - Signals that an I/O exception has occurred.org.semanticweb.owlapi.model.OWLOntologyCreationException - the oWL ontology creation exceptionorg.semanticweb.owlapi.model.OWLOntologyStorageException - the oWL ontology storage exceptionOBOFormatParserException - the oBO format parser exception
convertURL(String iri, String outFile, OWLOntologyManager manager)protected static Map<String,org.semanticweb.owlapi.model.IRI> initAnnotationPropertyMap()
public org.semanticweb.owlapi.model.OWLOntologyManager getManager()
public void setManager(org.semanticweb.owlapi.model.OWLOntologyManager manager)
manager - the new managerpublic OBODoc getObodoc()
public void setObodoc(OBODoc obodoc)
obodoc - the new obodocprotected org.semanticweb.owlapi.model.OWLOntology getOwlOntology()
protected void setOwlOntology(org.semanticweb.owlapi.model.OWLOntology owlOntology)
owlOntology - the owlOntology to setpublic org.semanticweb.owlapi.model.OWLOntology convert(String oboFile) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
oboFile - the obo fileorg.semanticweb.owlapi.model.OWLOntologyCreationException - the oWL ontology creation exceptionpublic org.semanticweb.owlapi.model.OWLOntology convert(OBODoc doc) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
doc - the obodocorg.semanticweb.owlapi.model.OWLOntologyCreationException - the oWL ontology creation exceptionpublic org.semanticweb.owlapi.model.OWLOntology convert(OBODoc doc, org.semanticweb.owlapi.model.OWLOntology in) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
doc - the obodocin - the inorg.semanticweb.owlapi.model.OWLOntologyCreationException - the oWL ontology creation exceptionprotected org.semanticweb.owlapi.model.OWLOntology tr(org.semanticweb.owlapi.model.OWLOntology in)
throws org.semanticweb.owlapi.model.OWLOntologyCreationException
in - the inorg.semanticweb.owlapi.model.OWLOntologyCreationException - the oWL ontology creation exceptionprotected void postProcess(org.semanticweb.owlapi.model.OWLOntology ontology)
ontology - the ontologyprotected static String getURI(String path)
path - the pathpublic void trHeaderFrame(Frame headerFrame)
headerFrame - the header frameprotected void addPropertyValueHeaders(Collection<Clause> clauses)
clauses - the clausesprotected void addOntologyAnnotation(org.semanticweb.owlapi.model.OWLAnnotationProperty ap,
org.semanticweb.owlapi.model.OWLAnnotationValue v,
Set<org.semanticweb.owlapi.model.OWLAnnotation> annotations)
ap - the apv - the vannotations - the annotationspublic org.semanticweb.owlapi.model.OWLClassExpression trTermFrame(Frame termFrame)
termFrame - the term frameprotected Set<org.semanticweb.owlapi.model.OWLAxiom> translateAltIds(Collection<Clause> clauses, org.semanticweb.owlapi.model.IRI replacedBy, boolean isClass)
OWLClass or
OWLObjectProperty.clauses - collection of alt_id clausesreplacedBy - IRI of the entityisClass - set to true if the alt_id is represents a class, false in case of
an propertypublic Set<org.semanticweb.owlapi.model.OWLAxiom> trTermFrameClauses(org.semanticweb.owlapi.model.OWLClass cls, Collection<Clause> clauses, String t)
cls - the clsclauses - the clausest - the tprotected org.semanticweb.owlapi.model.OWLNamedObject trTypedefToAnnotationProperty(Frame typedefFrame)
typedefFrame - the typedef framepublic org.semanticweb.owlapi.model.OWLNamedObject trTypedefFrame(Frame typedefFrame)
typedefFrame - the typedef frameprotected static org.semanticweb.owlapi.model.OWLAxiom trRelationUnionOf(String id, org.semanticweb.owlapi.model.OWLProperty p, Collection<Clause> clauses)
id - the idp - the pclauses - the clausesprotected static org.semanticweb.owlapi.model.OWLAxiom trRelationIntersectionOf(String id, org.semanticweb.owlapi.model.OWLProperty p, Collection<Clause> clauses)
id - the idp - the pclauses - the clausesprotected org.semanticweb.owlapi.model.OWLAxiom trUnionOf(org.semanticweb.owlapi.model.OWLClass cls,
Collection<Clause> clauses)
cls - the clsclauses - the clausesprotected org.semanticweb.owlapi.model.OWLAxiom trIntersectionOf(org.semanticweb.owlapi.model.OWLClass cls,
Collection<Clause> clauses)
cls - the clsclauses - the clausesprotected void add(org.semanticweb.owlapi.model.OWLAxiom axiom)
axiom - the axiomprotected void add(Set<org.semanticweb.owlapi.model.OWLAxiom> axioms)
axioms - the axiomsprotected void apply(org.semanticweb.owlapi.model.OWLOntologyChange change)
change - the changeprotected void apply(List<org.semanticweb.owlapi.model.OWLOntologyChange> changes)
changes - the changesprotected org.semanticweb.owlapi.model.OWLAxiom trTermClause(org.semanticweb.owlapi.model.OWLClass cls,
String tag,
Clause clause)
cls - the clstag - the tagclause - the clauseprotected org.semanticweb.owlapi.model.OWLAxiom trTypedefClause(org.semanticweb.owlapi.model.OWLObjectProperty p,
String tag,
Clause clause)
p - the ptag - the tagclause - the clauseprotected org.semanticweb.owlapi.model.OWLAxiom trGenericClause(org.semanticweb.owlapi.model.OWLNamedObject e,
String tag,
Clause clause)
e - the etag - the tagclause - the clauseprotected org.semanticweb.owlapi.model.OWLAxiom trGenericClause(org.semanticweb.owlapi.model.OWLAnnotationSubject sub,
String tag,
Clause clause)
sub - the subtag - the tagclause - the clauseprotected org.semanticweb.owlapi.model.OWLAnnotationProperty trSynonymType(String type)
type - the typeprotected Set<org.semanticweb.owlapi.model.OWLAnnotation> trAnnotations(Clause clause)
clause - the clauseprotected void trAnnotations(Clause clause, Set<org.semanticweb.owlapi.model.OWLAnnotation> anns)
clause - the clauseanns - the annsprotected Set<? extends org.semanticweb.owlapi.model.OWLAnnotation> trAnnotations(Collection<Clause> clauses)
clauses - the clausespublic org.semanticweb.owlapi.model.OWLClassExpression trRel(String relId, String classId, Collection<QualifierValue> quals)
relId - the rel idclassId - the class idquals - the qualsprotected static String getQVString(String q, Collection<QualifierValue> quals)
q - the qquals - the qualsprotected static boolean getQVBoolean(String q, Collection<QualifierValue> quals)
q - the qquals - the qualsprotected static Integer getQVInt(String q, Collection<QualifierValue> quals)
q - the qquals - the qualsprotected org.semanticweb.owlapi.model.OWLClass trClass(String classId)
classId - the class idprotected org.semanticweb.owlapi.model.OWLClassExpression trClass(Object v)
v - the vprotected String mapPropId(String id)
id - the idprotected static String getIdPrefix(String x)
x - the xprotected org.semanticweb.owlapi.model.OWLIndividual trIndividual(String instId)
instId - the inst idpublic static org.semanticweb.owlapi.model.IRI trTagToIRI(String tag)
tag - the tagprotected org.semanticweb.owlapi.model.OWLAnnotationProperty trTagToAnnotationProp(String tag)
tag - the tagprotected void addDeclaredAnnotationProperties(Collection<org.semanticweb.owlapi.model.OWLAnnotationProperty> declaredProperties)
declaredProperties - the declared propertiesprotected org.semanticweb.owlapi.model.OWLAnnotationProperty trAnnotationProp(String relId)
relId - the rel idprotected org.semanticweb.owlapi.model.OWLObjectProperty trObjectProp(String relId)
relId - the rel idprotected org.semanticweb.owlapi.model.OWLObjectPropertyExpression trObjectProp(Object v)
v - the vprotected org.semanticweb.owlapi.model.OWLAnnotationValue trLiteral(Object inputValue)
inputValue - the valuepublic org.semanticweb.owlapi.model.IRI oboIdToIRI(String id)
id - the idprotected String translateShorthandIdToExpandedId(String id)
id - the idprotected String getDefaultIDSpace()
Copyright © 2010-2015 The University of Manchester. All Rights Reserved.