|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.program.sax.SequenceAlignmentSAXParser
public class SequenceAlignmentSAXParser
A SAX2 parser for dealing with a sequence alignments. The format of any given alignment is automatically detected (e.g. ClustalW, Needle). Supported alignment formats are:
Primary author -
Field Summary | |
---|---|
protected int |
iState
|
protected String |
oFullNamespacePrefix
|
protected ContentHandler |
oHandler
|
protected String |
oNamespacePrefix
|
protected boolean |
tNamespacePrefixes
|
protected boolean |
tNamespaces
|
Constructor Summary | |
---|---|
SequenceAlignmentSAXParser()
Initialises internal state Sets namespace prefix to "biojava" |
Method Summary | |
---|---|
void |
addPrefixMapping(String poPrefix,
String poURI)
Adds a namespace prefix to URI mapping as (key,value) pairs. |
protected void |
changeState(int piState)
Centralise chaining of iState field to help with debugging. |
protected void |
characters(char[] ch,
int start,
int length)
Utility method to centralize the sending of a SAX characters message a document handler. |
protected void |
endElement(org.biojava.bio.program.sax.QName poQName)
Utility method to centralize the sending of a SAX endElement message a document handler. |
ContentHandler |
getContentHandler()
Return the content handler. |
protected BufferedReader |
getContentStream(InputSource poSource)
Create a stream from an an InputSource, picking the correct stream according to order of precedance. |
DTDHandler |
getDTDHandler()
Do-nothing implementation of interface method |
EntityResolver |
getEntityResolver()
Do-nothing implementation of interface method |
ErrorHandler |
getErrorHandler()
Do-nothing implementation of interface method |
boolean |
getFeature(String poName)
Do-nothing implementation of interface method |
String |
getNamespacePrefix()
Describe getNamespacePrefix method here. |
boolean |
getNamespacePrefixes()
Support SAX2 configuration of namespace support of parser. |
boolean |
getNamespaces()
Support SAX2 configuration of namespace support of parser. |
Object |
getProperty(String name)
Do-nothing implementation of interface method |
String |
getURIFromPrefix(String poPrefix)
Gets the URI for a namespace prefix, given that prefix, or null if the prefix is not recognised. |
void |
parse(InputSource poSource)
Describe 'parse' method here. |
void |
parse(String poSystemId)
Full implementation of interface method. |
String |
prefix(String poElementName)
Given an unprefixed element name, returns a new element name with a namespace prefix |
void |
setContentHandler(ContentHandler poHandler)
Allow an application to register a content event handler. |
void |
setDTDHandler(DTDHandler handler)
Do-nothing implementation of interface method |
void |
setEntityResolver(EntityResolver resolver)
Do-nothing implementation of interface method |
void |
setErrorHandler(ErrorHandler handler)
Do-nothing implementation of interface method |
void |
setFeature(String poName,
boolean value)
Handles support for ReasoningDomain and Namespace-prefixes |
void |
setNamespacePrefix(String poPrefix)
|
void |
setProperty(String name,
Object value)
Do-nothing implementation of interface method |
protected void |
startElement(org.biojava.bio.program.sax.QName poQName,
Attributes atts)
Utility method to centralize sending of a SAX startElement message to document handler |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ContentHandler oHandler
protected boolean tNamespaces
protected boolean tNamespacePrefixes
protected String oNamespacePrefix
protected String oFullNamespacePrefix
protected int iState
Constructor Detail |
---|
public SequenceAlignmentSAXParser()
Method Detail |
---|
public void parse(InputSource poSource) throws IOException, SAXException
parse
in interface XMLReader
poSource
- -
IOException
SAXException
public void setContentHandler(ContentHandler poHandler)
Applications may register a new or different handler in the middle of a parse, and the SAX parser must begin using the new handler immediately.
setContentHandler
in interface XMLReader
poHandler
- a ContentHandler
The XML content handler
NullPointerException
- If the handler argument is nullpublic ContentHandler getContentHandler()
getContentHandler
in interface XMLReader
ContentHandler
The current content handler,
or null if none has been registered.public void parse(String poSystemId) throws IOException, SAXException
parse
in interface XMLReader
IOException
SAXException
public boolean getFeature(String poName) throws SAXNotRecognizedException, SAXNotSupportedException
getFeature
in interface XMLReader
SAXNotRecognizedException
SAXNotSupportedException
public void setFeature(String poName, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
setFeature
in interface XMLReader
SAXNotRecognizedException
SAXNotSupportedException
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
getProperty
in interface XMLReader
SAXNotRecognizedException
SAXNotSupportedException
public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
setProperty
in interface XMLReader
SAXNotRecognizedException
SAXNotSupportedException
public void setEntityResolver(EntityResolver resolver)
setEntityResolver
in interface XMLReader
public EntityResolver getEntityResolver()
getEntityResolver
in interface XMLReader
public void setDTDHandler(DTDHandler handler)
setDTDHandler
in interface XMLReader
public DTDHandler getDTDHandler()
getDTDHandler
in interface XMLReader
public void setErrorHandler(ErrorHandler handler)
setErrorHandler
in interface XMLReader
public ErrorHandler getErrorHandler()
getErrorHandler
in interface XMLReader
protected void startElement(org.biojava.bio.program.sax.QName poQName, Attributes atts) throws SAXException
poQName
- a QName
valueatts
- an Attributes
value
SAXException
- if an error occursprotected void endElement(org.biojava.bio.program.sax.QName poQName) throws SAXException
poQName
- -
SAXException
- thrown if
thrown
- ifprotected void characters(char[] ch, int start, int length) throws SAXException
ch
- -start
- -length
- -
SAXException
- thrown if
thrown
- ifpublic boolean getNamespaces()
public boolean getNamespacePrefixes()
public void addPrefixMapping(String poPrefix, String poURI)
poPrefix
- a String
representation of the
namespace prefixpoURI
- a String
representation of the URI
for the namespace prefix.public String getURIFromPrefix(String poPrefix)
poPrefix
- a String
The namespace prefix.public void setNamespacePrefix(String poPrefix)
poPrefix
- a String
valuepublic String getNamespacePrefix()
getNamespacePrefix
method here.
String
valuepublic String prefix(String poElementName)
String
valueprotected BufferedReader getContentStream(InputSource poSource)
poSource
- an InputSource
value
BufferedReader
valueprotected void changeState(int piState)
piState
- an int
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |