org.coode.owlapi.obo.parser
Class OBOConsumer

java.lang.Object
  extended by org.coode.owlapi.obo.parser.OBOConsumer
All Implemented Interfaces:
OBOParserHandler

public class OBOConsumer
extends Object
implements OBOParserHandler

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 10-Jan-2007


Constructor Summary
OBOConsumer(org.semanticweb.owlapi.model.OWLOntologyManager owlOntologyManager, org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration configuration, org.semanticweb.owlapi.model.IRI baseIRI)
           
OBOConsumer(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration configuration, org.semanticweb.owlapi.model.IRI baseIRI)
           
 
Method Summary
 void addIntersectionOfOperand(org.semanticweb.owlapi.model.OWLClassExpression classExpression)
           
 void addSymbolicIdMapping(String symbolicName, org.semanticweb.owlapi.model.IRI fullIRI)
           
 void addUnionOfOperand(org.semanticweb.owlapi.model.OWLClassExpression classExpression)
           
 void endFrame()
           
 void endHeader()
           
 org.semanticweb.owlapi.model.OWLClass getCurrentClass()
           
 org.semanticweb.owlapi.model.OWLEntity getCurrentEntity()
           
 String getCurrentId()
           
 String getDefaultNamespaceTagValue()
          Gets the default-namespace tag value for the current ontology.
 IDSpaceManager getIdSpaceManager()
          Gets a COPY of the IDSpaceManager held by this OBOConsumer.
 org.semanticweb.owlapi.model.IRI getIRIFromOBOId(String oboId)
          Gets an IRI from an OBO ID.
 org.semanticweb.owlapi.model.IRI getIRIFromTagName(String tagName)
          Gets an IRI from a tag name.
 org.semanticweb.owlapi.model.OWLOntology getOntology()
           
 org.semanticweb.owlapi.model.OWLOntologyManager getOWLOntologyManager()
           
 org.semanticweb.owlapi.model.IRI getRelationIRIFromSymbolicIdOrOBOId(String symbolicIdOrOBOId)
           
 String getStanzaType()
           
 void handleTagValue(String tag, String value, String qualifierBlock, String comment)
           
 boolean isInstanceType()
           
 boolean isTerm()
           
 boolean isTypedef()
           
 org.semanticweb.owlapi.model.OWLAnnotation parseXRef(String xref)
           
 void registerIdSpace(String idSpacePrefix, String iriPrefix)
           
 void setCurrentId(String currentId)
           
 void setDataVersionTagValue(String dataVersionTagValue)
          Sets the value of the data-version tag for the current ontology that is being parsed.
 void setDefaultNamespaceTagValue(String defaultNamespaceTagValue)
          Sets the value of the default-namespace tag for the current ontology being parsed.
 void setOntologyTagValue(String ontologyTagValue)
          Sets the value of the ontology tag for the current ontology that is being parsed.
 void startFrame(String name)
           
 void startHeader()
           
 String unescapeTagValue(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OBOConsumer

public OBOConsumer(org.semanticweb.owlapi.model.OWLOntology ontology,
                   org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration configuration,
                   org.semanticweb.owlapi.model.IRI baseIRI)

OBOConsumer

public OBOConsumer(org.semanticweb.owlapi.model.OWLOntologyManager owlOntologyManager,
                   org.semanticweb.owlapi.model.OWLOntology ontology,
                   org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration configuration,
                   org.semanticweb.owlapi.model.IRI baseIRI)
Method Detail

getOWLOntologyManager

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

getOntology

public org.semanticweb.owlapi.model.OWLOntology getOntology()

getCurrentId

public String getCurrentId()

addSymbolicIdMapping

public void addSymbolicIdMapping(String symbolicName,
                                 org.semanticweb.owlapi.model.IRI fullIRI)

setDefaultNamespaceTagValue

public void setDefaultNamespaceTagValue(String defaultNamespaceTagValue)
Sets the value of the default-namespace tag for the current ontology being parsed.

Parameters:
defaultNamespaceTagValue - The value of the default-namespace tag.

getDefaultNamespaceTagValue

public String getDefaultNamespaceTagValue()
Gets the default-namespace tag value for the current ontology. If not default-namespace tag value has been set explicitly then this method returns the default value which is equal to OBOVocabulary.OBO_IRI_BASE.

Returns:
The default-namespace tag value. Not null.

setOntologyTagValue

public void setOntologyTagValue(String ontologyTagValue)
Sets the value of the ontology tag for the current ontology that is being parsed. This is used to construct an OWLOntologyID for the current ontology once the ontology header has been parsed in its entirety.

Parameters:
ontologyTagValue - The ontology tag value. Ultimately, this will be translated to an IRI.

setDataVersionTagValue

public void setDataVersionTagValue(String dataVersionTagValue)
Sets the value of the data-version tag for the current ontology that is being parsed. This is used to construct an OWLOntologyID for the current ontology once the ontology header has been parsed in its entirety.

Parameters:
dataVersionTagValue - The data-version tag value. Ultimately, this will be translated to an IRI.

registerIdSpace

public void registerIdSpace(String idSpacePrefix,
                            String iriPrefix)

getIdSpaceManager

public IDSpaceManager getIdSpaceManager()
Gets a COPY of the IDSpaceManager held by this OBOConsumer.

Returns:
A copy of the IDSpaceManager held by this consumer.

setCurrentId

public void setCurrentId(String currentId)

addUnionOfOperand

public void addUnionOfOperand(org.semanticweb.owlapi.model.OWLClassExpression classExpression)

addIntersectionOfOperand

public void addIntersectionOfOperand(org.semanticweb.owlapi.model.OWLClassExpression classExpression)

getStanzaType

public String getStanzaType()

isTerm

public boolean isTerm()

isTypedef

public boolean isTypedef()

isInstanceType

public boolean isInstanceType()

startHeader

public void startHeader()
Specified by:
startHeader in interface OBOParserHandler

endHeader

public void endHeader()
Specified by:
endHeader in interface OBOParserHandler

startFrame

public void startFrame(String name)
Specified by:
startFrame in interface OBOParserHandler

endFrame

public void endFrame()
Specified by:
endFrame in interface OBOParserHandler

handleTagValue

public void handleTagValue(String tag,
                           String value,
                           String qualifierBlock,
                           String comment)
Specified by:
handleTagValue in interface OBOParserHandler

unescapeTagValue

public String unescapeTagValue(String value)

getCurrentClass

public org.semanticweb.owlapi.model.OWLClass getCurrentClass()

getCurrentEntity

public org.semanticweb.owlapi.model.OWLEntity getCurrentEntity()

getIRIFromTagName

public org.semanticweb.owlapi.model.IRI getIRIFromTagName(String tagName)
Gets an IRI from a tag name.

Parameters:
tagName - The tag name.
Returns:
The IRI for the tag name. For built in tags this is obtained from the OBOVocabulary enum. Not null.
Throws:
NullPointerException - if tagName is null.

getIRIFromOBOId

public org.semanticweb.owlapi.model.IRI getIRIFromOBOId(String oboId)
Gets an IRI from an OBO ID. The OBO ID may be a canonical OBO ID of the form idspace:sequence or it may be a non-canonical ID.

Parameters:
oboId - The OBO ID
Returns:
An IRI obtained from the translation of the OBO ID.

getRelationIRIFromSymbolicIdOrOBOId

public org.semanticweb.owlapi.model.IRI getRelationIRIFromSymbolicIdOrOBOId(String symbolicIdOrOBOId)

parseXRef

public org.semanticweb.owlapi.model.OWLAnnotation parseXRef(String xref)


Copyright © 2012 The University of Manchester. All Rights Reserved.