uk.ac.ebi.intact.util
Class GoServerProxy.GoHandler
java.lang.Object
|
+--uk.ac.ebi.intact.util.GoServerProxy.GoHandler
- All Implemented Interfaces:
- org.xml.sax.ContentHandler
- Enclosing class:
- GoServerProxy
- public class GoServerProxy.GoHandler
- extends java.lang.Object
- implements org.xml.sax.ContentHandler
Parse the XML output given by the EGO web site.
Example:
http://www.ebi.ac.uk/ego/DisplayGoTerm?id=GO:0000074&intact=xml
gives
<?xml version="1.0" encoding="iso-8859-1"?>
<page>
<name>
regulation of cell cycle
</name>
<category>
process
</category>
</page>
- Version:
- $Id: GoServerProxy.java,v 1.3 2004/02/23 14:28:52 skerrien Exp $
- Author:
- Samuel Kerrien (skerrien@ebi.ac.uk)
|
Method Summary |
void |
characters(char[] ch,
int start,
int len)
|
void |
endDocument()
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName)
Called when the end of a tag is encoutered. |
void |
endPrefixMapping(java.lang.String prefix)
|
java.lang.String |
getCategory()
|
java.lang.String |
getName()
|
void |
ignorableWhitespace(char[] text,
int start,
int length)
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
skippedEntity(java.lang.String name)
|
void |
startDocument()
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes atts)
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GoServerProxy.GoHandler
public GoServerProxy.GoHandler()
getName
public java.lang.String getName()
getCategory
public java.lang.String getCategory()
characters
public final void characters(char[] ch,
int start,
int len)
- Specified by:
characters in interface org.xml.sax.ContentHandler
endElement
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName)
throws org.xml.sax.SAXException
- Called when the end of a tag is encoutered.
We are just interrested in the tags </name> and </category> and
store the content of the tag in the appropriate instance variable.
- Specified by:
endElement in interface org.xml.sax.ContentHandler
- Parameters:
namespaceURI - The Namespace URI, or the empty string if the element has no Namespace URI or
if Namespace processing is not being performed.localName - The local name (without prefix), or the empty string if Namespace processing
is not being performed.rawName - The qualified XML 1.0 name (with prefix), or the empty string if qualified
names are not available.
- Throws:
org.xml.sax.SAXException
startDocument
public void startDocument()
throws org.xml.sax.SAXException
- Specified by:
startDocument in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
endDocument
public void endDocument()
throws org.xml.sax.SAXException
- Specified by:
endDocument in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
startElement
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
- Specified by:
startElement in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
processingInstruction
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
- Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
startPrefixMapping
public void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
- Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
ignorableWhitespace
public void ignorableWhitespace(char[] text,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
endPrefixMapping
public void endPrefixMapping(java.lang.String prefix)
throws org.xml.sax.SAXException
- Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
skippedEntity
public void skippedEntity(java.lang.String name)
throws org.xml.sax.SAXException
- Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
- Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk