|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nci.caarray.util.owlparser.AbstractOntologyOwlParser
public abstract class AbstractOntologyOwlParser
Base class for parsing an ontology description in OWL format. Generates calls to event methods which subclasses should implement to actually do appropriate processing of the parsed data.
Constructor Summary | |
---|---|
AbstractOntologyOwlParser(java.lang.String name,
java.lang.String url)
Create an ontology parser that will parse an ontology OWL file for a term source with given name and url. |
Method Summary | |
---|---|
protected abstract void |
finishProcessing()
Called to indicate the end of processing the OWL doc. |
java.util.Map<java.lang.String,gov.nih.nci.caarray.domain.vocabulary.Category> |
getCategoryCache()
|
java.util.Set<gov.nih.nci.caarray.domain.vocabulary.Term> |
getTermCache()
|
gov.nih.nci.caarray.domain.vocabulary.TermSource |
getTermSource()
|
void |
parse(org.dom4j.Document owlDoc)
Parse an OWL document from given Document. |
void |
parse(java.io.InputStream owlStream)
Parse an OWL document from given InputStream. |
protected abstract void |
processCategory(gov.nih.nci.caarray.domain.vocabulary.Category category)
Process acategory parsed from the OWL. |
protected abstract void |
processCategorySubclass(gov.nih.nci.caarray.domain.vocabulary.Category category,
gov.nih.nci.caarray.domain.vocabulary.Category parentCategory)
Process a child-parent relationships between the two given categories. |
protected abstract void |
processTerm(gov.nih.nci.caarray.domain.vocabulary.Term t)
Process a term parsed from the OWL. |
protected abstract void |
processTermSource(gov.nih.nci.caarray.domain.vocabulary.TermSource ts)
Process the term source parsed from the OWL. |
protected abstract void |
startProcessing()
Called to indicate the start of processing the OWL doc. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractOntologyOwlParser(java.lang.String name, java.lang.String url)
name
- an explicit name for the term source whose ontology is being parsedurl
- an explicit url for the term source whose ontology is being parsedMethod Detail |
---|
public void parse(java.io.InputStream owlStream) throws ParseException
owlStream
- InputStream containing the bytes of the OWL document
ParseException
- on errorpublic void parse(org.dom4j.Document owlDoc) throws ParseException
owlDoc
- The OWL document
ParseException
- on errorpublic gov.nih.nci.caarray.domain.vocabulary.TermSource getTermSource()
public java.util.Map<java.lang.String,gov.nih.nci.caarray.domain.vocabulary.Category> getCategoryCache()
public java.util.Set<gov.nih.nci.caarray.domain.vocabulary.Term> getTermCache()
protected abstract void startProcessing() throws ParseException
ParseException
- on errorprotected abstract void finishProcessing() throws ParseException
ParseException
- on errorprotected abstract void processTermSource(gov.nih.nci.caarray.domain.vocabulary.TermSource ts) throws ParseException
ts
- the parsed term source
ParseException
- on errorprotected abstract void processCategory(gov.nih.nci.caarray.domain.vocabulary.Category category) throws ParseException
category
- the parsed category
ParseException
- on errorprotected abstract void processCategorySubclass(gov.nih.nci.caarray.domain.vocabulary.Category category, gov.nih.nci.caarray.domain.vocabulary.Category parentCategory) throws ParseException
category
- the child categoryparentCategory
- the parent category
ParseException
- on errorprotected abstract void processTerm(gov.nih.nci.caarray.domain.vocabulary.Term t) throws ParseException
t
- the parsed term.
ParseException
- on error
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |