org.obolibrary.obo2owl
Class Owl2Obo

java.lang.Object
  extended by org.obolibrary.obo2owl.Owl2Obo

public class Owl2Obo
extends Object


Nested Class Summary
static class Owl2Obo.UntranslatableAxiomException
           
 
Field Summary
static Map<String,String> annotationPropertyMap
           
 
Constructor Summary
Owl2Obo()
           
 
Method Summary
 OBODoc convert(org.semanticweb.owlapi.model.OWLOntology ont)
           
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.
 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)
          E.g.
 boolean getStrictConversion()
           
 Collection<org.semanticweb.owlapi.model.OWLAxiom> getUntranslatableAxioms()
           
protected  boolean handleDuplicateClause(Frame frame, Clause clause)
          Handle a duplicate clause in a frame during translation.
 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)
           
 void setDiscardUntranslatable(boolean discardUntranslatable)
           
 void setManager(org.semanticweb.owlapi.model.OWLOntologyManager manager)
           
 void setObodoc(OBODoc obodoc)
           
 void setStrictConversion(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

annotationPropertyMap

public static Map<String,String> annotationPropertyMap
Constructor Detail

Owl2Obo

public Owl2Obo()
Method Detail

setStrictConversion

public void setStrictConversion(boolean b)

getStrictConversion

public boolean getStrictConversion()

isDiscardUntranslatable

public boolean isDiscardUntranslatable()
Returns:
the discardUntranslatable

setDiscardUntranslatable

public void setDiscardUntranslatable(boolean discardUntranslatable)
Parameters:
discardUntranslatable - the discardUntranslatable to set

getManager

public org.semanticweb.owlapi.model.OWLOntologyManager getManager()

setManager

public void setManager(org.semanticweb.owlapi.model.OWLOntologyManager manager)

getObodoc

public OBODoc getObodoc()

setObodoc

public void setObodoc(OBODoc obodoc)

convert

public OBODoc convert(org.semanticweb.owlapi.model.OWLOntology ont)
               throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

getUntranslatableAxioms

public Collection<org.semanticweb.owlapi.model.OWLAxiom> getUntranslatableAxioms()
Returns:
the untranslatableAxioms

handleDuplicateClause

protected boolean handleDuplicateClause(Frame frame,
                                        Clause clause)
Handle a duplicate clause in a frame during translation.

Parameters:
frame -
clause -
Returns:
true if the clause is to be marked as redundant and will not be added to the

getOntologyId

public static String getOntologyId(org.semanticweb.owlapi.model.OWLOntology ontology)
E.g. http://purl.obolibrary.org/obo/go.owl --> "go" if does not match this pattern, then retain original IRI

Parameters:
ontology -
Returns:
The OBO ID of the ontology

getOntologyId

public static String getOntologyId(org.semanticweb.owlapi.model.IRI iriObj)

getDataVersion

public static String getDataVersion(org.semanticweb.owlapi.model.OWLOntology ontology)

getIdentifier

public String getIdentifier(org.semanticweb.owlapi.model.OWLObject obj)

getIdentifierFromObject

public static String getIdentifierFromObject(org.semanticweb.owlapi.model.OWLObject obj,
                                             org.semanticweb.owlapi.model.OWLOntology ont,
                                             String defaultValue)
Retrieve the identifier for a given 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.

Parameters:
obj - the OWLObject to resolve
ont - the target ontology
defaultValue - the value to return in case of an error or no id
Returns:
identifier or the default value

getIdentifierFromObject

public static String getIdentifierFromObject(org.semanticweb.owlapi.model.OWLObject obj,
                                             org.semanticweb.owlapi.model.OWLOntology ont)
                                      throws Owl2Obo.UntranslatableAxiomException
Retrieve the identifier for a given OWLObject. This methods uses also shorthand hints to resolve the identifier. Should the translation process encounter an unexpected axiom an Owl2Obo.UntranslatableAxiomException is thrown.

Parameters:
obj - the OWLObject to resolve
ont - the target ontology
Returns:
identifier or null
Throws:
Owl2Obo.UntranslatableAxiomException

getIdentifier

public static String getIdentifier(org.semanticweb.owlapi.model.IRI iriId)
See table 5.9.2. Translation of identifiers

Parameters:
iriId -
Returns:
obo identifier or null

getIdentifier

public static String getIdentifier(org.semanticweb.owlapi.model.IRI iriId,
                                   org.semanticweb.owlapi.model.OWLOntology baseOntology)

owlObjectToTag

public static String owlObjectToTag(org.semanticweb.owlapi.model.OWLObject obj)

normalizeRelationshipClauses

public static List<Clause> normalizeRelationshipClauses(List<Clause> clauses)
Join clauses and its 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"?

Parameters:
clauses -
Returns:
normalized list of Clause


Copyright © 2010-2014. All Rights Reserved.