public class OWLAPIOwl2Obo extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
OWLAPIOwl2Obo.UntranslatableAxiomException
untranslatable axiom exception
|
| Modifier and Type | Field and Description |
|---|---|
protected Pattern |
absoulteURLPattern |
static Map<String,String> |
annotationPropertyMap
annotation map
|
protected Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> |
apToDeclare |
protected boolean |
discardUntranslatable |
protected org.semanticweb.owlapi.model.OWLDataFactory |
fac |
protected Map<String,String> |
idSpaceMap |
protected org.semanticweb.owlapi.model.OWLOntologyManager |
manager |
protected OBODoc |
obodoc |
protected String |
ontologyId |
protected org.semanticweb.owlapi.model.OWLOntology |
owlOntology |
protected boolean |
strictConversion |
protected Set<org.semanticweb.owlapi.model.OWLAxiom> |
untranslatableAxioms |
| Constructor and Description |
|---|
OWLAPIOwl2Obo(org.semanticweb.owlapi.model.OWLOntologyManager translationManager) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(Frame f) |
protected void |
addQualifiers(Clause c,
Set<org.semanticweb.owlapi.model.OWLAnnotation> qualifiers) |
OBODoc |
convert(org.semanticweb.owlapi.model.OWLOntology ont) |
protected Clause |
createRelationshipClauseWithCardinality(org.semanticweb.owlapi.model.OWLObjectCardinalityRestriction restriction,
String fillerId,
Set<QualifierValue> qvs,
org.semanticweb.owlapi.model.OWLSubClassOfAxiom ax) |
protected Clause |
createRelationshipClauseWithRestrictions(org.semanticweb.owlapi.model.OWLQuantifiedObjectRestriction r,
String fillerId,
Set<QualifierValue> qvs,
org.semanticweb.owlapi.model.OWLSubClassOfAxiom ax) |
protected void |
error(org.semanticweb.owlapi.model.OWLAxiom ax) |
protected void |
error(String message) |
protected void |
error(String message,
org.semanticweb.owlapi.model.OWLAxiom ax) |
static String |
getDataVersion(org.semanticweb.owlapi.model.OWLOntology ontology) |
static String |
getIdentifier(org.semanticweb.owlapi.model.IRI iriId)
See table 5.9.2.
|
static String |
getIdentifier(org.semanticweb.owlapi.model.IRI iriId,
org.semanticweb.owlapi.model.OWLOntology baseOntology) |
String |
getIdentifier(org.semanticweb.owlapi.model.OWLObject obj) |
static String |
getIdentifierFromObject(org.semanticweb.owlapi.model.OWLObject obj,
org.semanticweb.owlapi.model.OWLOntology ont)
Retrieve the identifier for a given
OWLObject. |
static String |
getIdentifierFromObject(org.semanticweb.owlapi.model.OWLObject obj,
org.semanticweb.owlapi.model.OWLOntology ont,
String defaultValue)
Retrieve the identifier for a given
OWLObject. |
protected String |
getIdentifierUsingBaseOntology(org.semanticweb.owlapi.model.IRI iriId) |
org.semanticweb.owlapi.model.OWLOntologyManager |
getManager() |
OBODoc |
getObodoc() |
static String |
getOntologyId(org.semanticweb.owlapi.model.IRI iriObj) |
static String |
getOntologyId(org.semanticweb.owlapi.model.OWLOntology ontology)
if does not match this pattern, then retain original IRI
|
boolean |
getStrictConversion() |
protected Frame |
getTermFrame(org.semanticweb.owlapi.model.OWLClass entity) |
protected Frame |
getTypedefFrame(org.semanticweb.owlapi.model.OWLEntity entity) |
Collection<org.semanticweb.owlapi.model.OWLAxiom> |
getUntranslatableAxioms() |
protected String |
getValue(org.semanticweb.owlapi.model.OWLAnnotationValue annVal,
String tag) |
protected boolean |
handleDuplicateClause(Frame frame,
Clause clause)
Handle a duplicate clause in a frame during translation.
|
protected void |
handleSynonym(Set<org.semanticweb.owlapi.model.OWLAnnotation> qualifiers,
String scope,
Clause clause,
Set<org.semanticweb.owlapi.model.OWLAnnotation> unprocessedQualifiers) |
protected void |
init() |
protected static HashMap<String,String> |
initAnnotationPropertyMap() |
boolean |
isDiscardUntranslatable() |
static List<Clause> |
normalizeRelationshipClauses(List<Clause> clauses)
Join clauses and its
QualifierValue which have the same
relationship type and target. |
static String |
owlObjectToTag(org.semanticweb.owlapi.model.OWLObject obj) |
protected void |
preProcess() |
void |
setDiscardUntranslatable(boolean discardUntranslatable) |
void |
setManager(org.semanticweb.owlapi.model.OWLOntologyManager manager) |
void |
setObodoc(OBODoc obodoc) |
void |
setStrictConversion(boolean b) |
protected OBODoc |
tr() |
protected void |
tr(org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom aanAx,
Frame frame) |
protected boolean |
tr(org.semanticweb.owlapi.model.OWLAnnotationProperty prop,
org.semanticweb.owlapi.model.OWLAnnotationValue annVal,
Set<org.semanticweb.owlapi.model.OWLAnnotation> qualifiers,
Frame frame) |
protected void |
tr(org.semanticweb.owlapi.model.OWLAsymmetricObjectPropertyAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLClassAssertionAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLDeclarationAxiom axiom) |
protected void |
tr(org.semanticweb.owlapi.model.OWLDisjointClassesAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLInverseFunctionalObjectPropertyAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLInverseObjectPropertiesAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLOntology ontology) |
protected void |
tr(org.semanticweb.owlapi.model.OWLReflexiveObjectPropertyAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLSubClassOfAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLSubPropertyChainOfAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLSymmetricObjectPropertyAxiom ax) |
protected void |
tr(org.semanticweb.owlapi.model.OWLTransitiveObjectPropertyAxiom ax) |
protected boolean |
trGenericPropertyValue(org.semanticweb.owlapi.model.OWLAnnotationProperty prop,
org.semanticweb.owlapi.model.OWLAnnotationValue annVal,
Set<org.semanticweb.owlapi.model.OWLAnnotation> qualifiers,
Frame frame) |
protected void |
trNaryPropertyAxiom(org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> ax,
String tag) |
protected boolean |
trObjectProperty(org.semanticweb.owlapi.model.OWLObjectProperty prop,
String tag,
Boolean value,
Set<org.semanticweb.owlapi.model.OWLAnnotation> annotations) |
protected boolean |
trObjectProperty(org.semanticweb.owlapi.model.OWLObjectProperty prop,
String tag,
String value,
Set<org.semanticweb.owlapi.model.OWLAnnotation> annotations) |
protected org.semanticweb.owlapi.model.OWLOntologyManager manager
protected org.semanticweb.owlapi.model.OWLOntology owlOntology
protected org.semanticweb.owlapi.model.OWLDataFactory fac
protected OBODoc obodoc
protected Set<org.semanticweb.owlapi.model.OWLAxiom> untranslatableAxioms
protected Set<org.semanticweb.owlapi.model.OWLAnnotationProperty> apToDeclare
protected String ontologyId
protected boolean strictConversion
protected boolean discardUntranslatable
protected Pattern absoulteURLPattern
public OWLAPIOwl2Obo(org.semanticweb.owlapi.model.OWLOntologyManager translationManager)
translationManager - translationManagerprotected void init()
public void setStrictConversion(boolean b)
b - strict conversionpublic boolean getStrictConversion()
public boolean isDiscardUntranslatable()
public void setDiscardUntranslatable(boolean discardUntranslatable)
discardUntranslatable - the discardUntranslatable to setpublic org.semanticweb.owlapi.model.OWLOntologyManager getManager()
public void setManager(org.semanticweb.owlapi.model.OWLOntologyManager manager)
manager - managerpublic OBODoc getObodoc()
public void setObodoc(OBODoc obodoc)
obodoc - obodocpublic OBODoc convert(org.semanticweb.owlapi.model.OWLOntology ont)
ont - ontpublic Collection<org.semanticweb.owlapi.model.OWLAxiom> getUntranslatableAxioms()
protected OBODoc tr()
protected void preProcess()
protected void add(Frame f)
protected boolean trObjectProperty(org.semanticweb.owlapi.model.OWLObjectProperty prop,
String tag,
String value,
Set<org.semanticweb.owlapi.model.OWLAnnotation> annotations)
protected boolean trObjectProperty(org.semanticweb.owlapi.model.OWLObjectProperty prop,
String tag,
Boolean value,
Set<org.semanticweb.owlapi.model.OWLAnnotation> annotations)
protected void trNaryPropertyAxiom(org.semanticweb.owlapi.model.OWLNaryPropertyAxiom<org.semanticweb.owlapi.model.OWLObjectPropertyExpression> ax,
String tag)
protected void tr(org.semanticweb.owlapi.model.OWLSubPropertyChainOfAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLTransitiveObjectPropertyAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLReflexiveObjectPropertyAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLInverseFunctionalObjectPropertyAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLInverseObjectPropertiesAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLAsymmetricObjectPropertyAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLSymmetricObjectPropertyAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom aanAx,
Frame frame)
protected boolean tr(org.semanticweb.owlapi.model.OWLAnnotationProperty prop,
org.semanticweb.owlapi.model.OWLAnnotationValue annVal,
Set<org.semanticweb.owlapi.model.OWLAnnotation> qualifiers,
Frame frame)
protected void handleSynonym(Set<org.semanticweb.owlapi.model.OWLAnnotation> qualifiers, String scope, Clause clause, Set<org.semanticweb.owlapi.model.OWLAnnotation> unprocessedQualifiers)
protected boolean handleDuplicateClause(Frame frame, Clause clause)
frame - frameclause - clauseprotected boolean trGenericPropertyValue(org.semanticweb.owlapi.model.OWLAnnotationProperty prop,
org.semanticweb.owlapi.model.OWLAnnotationValue annVal,
Set<org.semanticweb.owlapi.model.OWLAnnotation> qualifiers,
Frame frame)
protected String getValue(org.semanticweb.owlapi.model.OWLAnnotationValue annVal, String tag)
protected void addQualifiers(Clause c, Set<org.semanticweb.owlapi.model.OWLAnnotation> qualifiers)
public static String getOntologyId(org.semanticweb.owlapi.model.OWLOntology ontology)
ontology - ontologypublic static String getOntologyId(org.semanticweb.owlapi.model.IRI iriObj)
iriObj - iriObjpublic static String getDataVersion(org.semanticweb.owlapi.model.OWLOntology ontology)
ontology - ontologyprotected void tr(org.semanticweb.owlapi.model.OWLOntology ontology)
protected void tr(org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLDisjointClassesAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLDeclarationAxiom axiom)
public String getIdentifier(org.semanticweb.owlapi.model.OWLObject obj)
obj - objpublic static String getIdentifierFromObject(org.semanticweb.owlapi.model.OWLObject obj, org.semanticweb.owlapi.model.OWLOntology ont, 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 idpublic static String getIdentifierFromObject(org.semanticweb.owlapi.model.OWLObject obj, org.semanticweb.owlapi.model.OWLOntology ont) throws OWLAPIOwl2Obo.UntranslatableAxiomException
OWLObject. This methods uses
also shorthand hints to resolve the identifier. Should the translation
process encounter an unexpected axiom an
OWLAPIOwl2Obo.UntranslatableAxiomException is thrown.obj - the OWLObject to resolveont - the target ontologyOWLAPIOwl2Obo.UntranslatableAxiomException - UntranslatableAxiomExceptionpublic static String getIdentifier(org.semanticweb.owlapi.model.IRI iriId)
iriId - iriIdprotected String getIdentifierUsingBaseOntology(org.semanticweb.owlapi.model.IRI iriId)
public static String getIdentifier(org.semanticweb.owlapi.model.IRI iriId, org.semanticweb.owlapi.model.OWLOntology baseOntology)
iriId - iriIdbaseOntology - baseOntologypublic static String owlObjectToTag(org.semanticweb.owlapi.model.OWLObject obj)
obj - objprotected Frame getTermFrame(org.semanticweb.owlapi.model.OWLClass entity)
protected Frame getTypedefFrame(org.semanticweb.owlapi.model.OWLEntity entity)
protected void tr(org.semanticweb.owlapi.model.OWLClassAssertionAxiom ax)
protected void tr(org.semanticweb.owlapi.model.OWLSubClassOfAxiom ax)
protected Clause createRelationshipClauseWithRestrictions(org.semanticweb.owlapi.model.OWLQuantifiedObjectRestriction r, String fillerId, Set<QualifierValue> qvs, org.semanticweb.owlapi.model.OWLSubClassOfAxiom ax)
protected Clause createRelationshipClauseWithCardinality(org.semanticweb.owlapi.model.OWLObjectCardinalityRestriction restriction, String fillerId, Set<QualifierValue> qvs, org.semanticweb.owlapi.model.OWLSubClassOfAxiom ax)
public static List<Clause> normalizeRelationshipClauses(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 - clausesClauseprotected void error(String message, org.semanticweb.owlapi.model.OWLAxiom ax)
protected void error(org.semanticweb.owlapi.model.OWLAxiom ax)
protected void error(String message)
Copyright © 2010-2015 The University of Manchester. All Rights Reserved.