org.obolibrary.obo2owl
Class Obo2Owl

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

public class Obo2Owl
extends Object


Field Summary
static Map<String,org.semanticweb.owlapi.model.IRI> annotationPropertyMap
           
static boolean DEBUG
           
static String DEFAULT_IRI_PREFIX
          Deprecated. 
static String IRI_PROP_isReversiblePropertyChain
           
 
Constructor Summary
Obo2Owl()
           
Obo2Owl(org.semanticweb.owlapi.model.OWLOntologyManager manager)
           
 
Method Summary
protected  void add(Set<org.semanticweb.owlapi.model.OWLAxiom> axioms)
           
protected  void addDeclaredAnnotationProperties(Collection<org.semanticweb.owlapi.model.OWLAnnotationProperty> declaredProperties)
           
protected  void addOntologyAnnotation(org.semanticweb.owlapi.model.OWLAnnotationProperty ap, org.semanticweb.owlapi.model.OWLAnnotationValue v, Set<org.semanticweb.owlapi.model.OWLAnnotation> annotations)
           
protected  void apply(List<org.semanticweb.owlapi.model.OWLOntologyChange> changes)
           
 org.semanticweb.owlapi.model.OWLOntology convert(OBODoc obodoc)
          Converts an OBO document to an OWL ontology
 org.semanticweb.owlapi.model.OWLOntology convert(OBODoc obodoc, boolean useFreshManager)
           
 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)
          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)
          See convertURL(String iri, String outFile)
 org.semanticweb.owlapi.model.OWLOntologyManager getManager()
           
 OBODoc getObodoc()
           
protected  org.semanticweb.owlapi.model.OWLOntology getOwlOntology()
           
 org.semanticweb.owlapi.model.IRI oboIdToIRI(String id)
           
 void setManager(org.semanticweb.owlapi.model.OWLOntologyManager manager)
           
 void setObodoc(OBODoc obodoc)
           
protected  void setOwlOntology(org.semanticweb.owlapi.model.OWLOntology owlOntology)
           
protected  org.semanticweb.owlapi.model.OWLAxiom trGenericClause(org.semanticweb.owlapi.model.OWLAnnotationSubject sub, String tag, Clause clause)
           
 void trHeaderFrame(Frame headerFrame)
           
protected  org.semanticweb.owlapi.model.OWLAnnotationValue trLiteral(Object value)
           
 org.semanticweb.owlapi.model.OWLClassExpression trRel(String relId, String classId, Collection<QualifierValue> quals)
           
static org.semanticweb.owlapi.model.IRI trTagToIRI(String tag)
           
 org.semanticweb.owlapi.model.OWLClassExpression trTermFrame(Frame termFrame)
           
 Set<org.semanticweb.owlapi.model.OWLAxiom> trTermFrameClauses(org.semanticweb.owlapi.model.OWLClass cls, Collection<Clause> clauses, String t)
           
 org.semanticweb.owlapi.model.OWLNamedObject trTypedefFrame(Frame typedefFrame)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG

DEFAULT_IRI_PREFIX

@Deprecated
public static final String DEFAULT_IRI_PREFIX
Deprecated. 
Use conversion methods or Obo2OWLConstants.DEFAULT_IRI_PREFIX

See Also:
Constant Field Values

IRI_PROP_isReversiblePropertyChain

public static final String IRI_PROP_isReversiblePropertyChain
See Also:
Constant Field Values

annotationPropertyMap

public static Map<String,org.semanticweb.owlapi.model.IRI> annotationPropertyMap
Constructor Detail

Obo2Owl

public Obo2Owl()

Obo2Owl

public Obo2Owl(org.semanticweb.owlapi.model.OWLOntologyManager manager)
Method Detail

convertURL

public static void convertURL(String iri,
                              String outFile)
                       throws IOException,
                              org.semanticweb.owlapi.model.OWLOntologyCreationException,
                              org.semanticweb.owlapi.model.OWLOntologyStorageException,
                              OBOFormatParserException
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

Parameters:
iri -
outFile -
Throws:
IOException
org.semanticweb.owlapi.model.OWLOntologyCreationException
org.semanticweb.owlapi.model.OWLOntologyStorageException
OBOFormatParserException

convertURL

public static void convertURL(String iri,
                              String outFile,
                              String defaultOnt)
                       throws IOException,
                              org.semanticweb.owlapi.model.OWLOntologyCreationException,
                              org.semanticweb.owlapi.model.OWLOntologyStorageException,
                              OBOFormatParserException
See convertURL(String iri, String outFile)

Parameters:
iri -
outFile -
defaultOnt - -- e.g. "go". If the obo file contains no "ontology:" header tag, this is added
Throws:
IOException
org.semanticweb.owlapi.model.OWLOntologyCreationException
org.semanticweb.owlapi.model.OWLOntologyStorageException
OBOFormatParserException

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)

getOwlOntology

protected org.semanticweb.owlapi.model.OWLOntology getOwlOntology()
Returns:
the owlOntology

setOwlOntology

protected void setOwlOntology(org.semanticweb.owlapi.model.OWLOntology owlOntology)
Parameters:
owlOntology - the owlOntology to set

convert

public org.semanticweb.owlapi.model.OWLOntology convert(String oboFile)
                                                 throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Creates an OBOFormatParser object to parse a file and then converts it using the convert method

Parameters:
oboFile -
Returns:
ontology
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

convert

public org.semanticweb.owlapi.model.OWLOntology convert(OBODoc obodoc,
                                                        boolean useFreshManager)
                                                 throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Parameters:
obodoc -
useFreshManager -
Returns:
ontology
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

convert

public org.semanticweb.owlapi.model.OWLOntology convert(OBODoc obodoc)
                                                 throws org.semanticweb.owlapi.model.OWLOntologyCreationException
Converts an OBO document to an OWL ontology

Parameters:
obodoc -
Returns:
ontology
Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException

trHeaderFrame

public void trHeaderFrame(Frame headerFrame)

addOntologyAnnotation

protected void addOntologyAnnotation(org.semanticweb.owlapi.model.OWLAnnotationProperty ap,
                                     org.semanticweb.owlapi.model.OWLAnnotationValue v,
                                     Set<org.semanticweb.owlapi.model.OWLAnnotation> annotations)

trTermFrame

public org.semanticweb.owlapi.model.OWLClassExpression trTermFrame(Frame termFrame)

trTermFrameClauses

public Set<org.semanticweb.owlapi.model.OWLAxiom> trTermFrameClauses(org.semanticweb.owlapi.model.OWLClass cls,
                                                                     Collection<Clause> clauses,
                                                                     String t)

trTypedefFrame

public org.semanticweb.owlapi.model.OWLNamedObject trTypedefFrame(Frame typedefFrame)

add

protected void add(Set<org.semanticweb.owlapi.model.OWLAxiom> axioms)

apply

protected void apply(List<org.semanticweb.owlapi.model.OWLOntologyChange> changes)

trGenericClause

protected org.semanticweb.owlapi.model.OWLAxiom trGenericClause(org.semanticweb.owlapi.model.OWLAnnotationSubject sub,
                                                                String tag,
                                                                Clause clause)

trRel

public org.semanticweb.owlapi.model.OWLClassExpression trRel(String relId,
                                                             String classId,
                                                             Collection<QualifierValue> quals)

trTagToIRI

public static org.semanticweb.owlapi.model.IRI trTagToIRI(String tag)

addDeclaredAnnotationProperties

protected void addDeclaredAnnotationProperties(Collection<org.semanticweb.owlapi.model.OWLAnnotationProperty> declaredProperties)

trLiteral

protected org.semanticweb.owlapi.model.OWLAnnotationValue trLiteral(Object value)

oboIdToIRI

public org.semanticweb.owlapi.model.IRI oboIdToIRI(String id)


Copyright © 2010-2014. All Rights Reserved.