public class OWLAPIOwl2Obo extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OWLAPIOwl2Obo.UntranslatableAxiomException
The Class UntranslatableAxiomException.
|
Modifier and Type | Field and Description |
---|---|
static Map<String,String> |
ANNOTATIONPROPERTYMAP
The annotation property map.
|
Constructor and Description |
---|
OWLAPIOwl2Obo(OWLOntologyManager translationManager)
Instantiates a new OWLAPI owl2 obo.
|
Modifier and Type | Method and Description |
---|---|
OBODoc |
convert(OWLOntology ont)
Convert.
|
static String |
getDataVersion(OWLOntology ontology)
Gets the data version.
|
static String |
getIdentifier(IRI iriId)
See table 5.9.2.
|
String |
getIdentifier(OWLObject obj)
Gets the identifier.
|
static String |
getIdentifierFromObject(OWLObject obj,
OWLOntology ont)
Retrieve the identifier for a given
OWLObject . |
static String |
getIdentifierFromObject(OWLObject obj,
OWLOntology ont,
String defaultValue)
Retrieve the identifier for a given
OWLObject . |
OWLOntologyManager |
getManager()
Gets the manager.
|
OBODoc |
getObodoc()
Gets the obodoc.
|
static String |
getOntologyId(IRI iriObj)
Gets the ontology id.
|
static String |
getOntologyId(OWLOntology ontology)
E.g.
|
boolean |
getStrictConversion()
Gets the strict conversion.
|
Collection<OWLAxiom> |
getUntranslatableAxioms()
Gets the untranslatable axioms.
|
boolean |
isDiscardUntranslatable()
Checks if is discard untranslatable.
|
boolean |
isMuteUntranslatableAxioms() |
static List<Clause> |
normalizeRelationshipClauses(List<Clause> clauses)
Join clauses and its
QualifierValue which have the same relationship type and target. |
static String |
owlObjectToTag(OWLObject obj)
Owl object to tag.
|
void |
setDiscardUntranslatable(boolean discardUntranslatable)
Sets the discard untranslatable.
|
void |
setManager(OWLOntologyManager manager)
Sets the manager.
|
void |
setMuteUntranslatableAxioms(boolean muteUntranslatableAxioms) |
void |
setObodoc(OBODoc obodoc)
Sets the obodoc.
|
void |
setStrictConversion(boolean b)
Sets the strict conversion.
|
public OWLAPIOwl2Obo(@Nonnull OWLOntologyManager translationManager)
translationManager
- the translation managerpublic void setStrictConversion(boolean b)
b
- the new strict conversionpublic boolean getStrictConversion()
public boolean isDiscardUntranslatable()
public void setDiscardUntranslatable(boolean discardUntranslatable)
discardUntranslatable
- the value for discard untranslatable to setpublic OWLOntologyManager getManager()
public void setManager(@Nonnull OWLOntologyManager manager)
manager
- the new managerpublic void setObodoc(@Nonnull OBODoc obodoc)
obodoc
- the new obodoc@Nonnull public OBODoc convert(@Nonnull OWLOntology ont)
ont
- the ontologypublic Collection<OWLAxiom> getUntranslatableAxioms()
public static String getOntologyId(OWLOntology ontology)
ontology
- the ontologypublic static String getOntologyId(@Nonnull IRI iriObj)
iriObj
- the iri@Nullable public static String getDataVersion(@Nonnull OWLOntology ontology)
ontology
- the ontology@Nullable public String getIdentifier(OWLObject obj)
obj
- the objectpublic boolean isMuteUntranslatableAxioms()
public void setMuteUntranslatableAxioms(boolean muteUntranslatableAxioms)
muteUntranslatableAxioms
- true disables logging@Nonnull public static String getIdentifierFromObject(@Nonnull OWLObject obj, @Nonnull OWLOntology ont, @Nonnull String defaultValue)
OWLObject
. This methods uses also shorthand hints
to resolve the identifier. Should the translation process encounter a problem or not find an
identifier the defaultValue is returned.obj
- the OWLObject
to resolveont
- the target ontologydefaultValue
- the value to return in case of an error or no id@Nullable public static String getIdentifierFromObject(OWLObject obj, @Nonnull OWLOntology ont) throws OWLAPIOwl2Obo.UntranslatableAxiomException
OWLObject
. This methods uses also shorthand hints
to resolve the identifier. Should the translation process encounter an unexpected axiom anobj
- the OWLObject
to resolveont
- the target ontologyOWLAPIOwl2Obo.UntranslatableAxiomException
- the untranslatable axiom exception
OWLAPIOwl2Obo.UntranslatableAxiomException
is thrown.@Nullable public static String getIdentifier(@Nullable IRI iriId)
iriId
- the iri id@Nullable public static String owlObjectToTag(OWLObject obj)
obj
- the object@Nonnull public static List<Clause> normalizeRelationshipClauses(@Nonnull List<Clause> clauses)
QualifierValue
which have the same relationship type and target.
Try to resolve conflicts for multiple statements. E.g., min=2 and min=3 is resolved to min=2,
or max=2 and max=4 is resolved to max=4. It will not merge conflicting exact cardinality
statements. TODO How to merge "all_some", and "all_only"?clauses
- the clausesClause
Copyright © 2020 The University of Manchester. All rights reserved.