|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.gene.builtin.PrefixMappingTracker
public class PrefixMappingTracker
Pipes the events through itself to another content handler. Tracks the
namespace - prefix mapping for all namespaces occured, and ensures that
startDocument()
and endDocument()
are never
called.
Field Summary | |
---|---|
boolean |
ignoreIgnorableWhitespaces
true if ignorable whitespaces shall not be reported to the
original content handler. |
ContentHandler |
original
The original content handler. |
Constructor Summary | |
---|---|
PrefixMappingTracker(ContentHandler original,
boolean ignoreIgnorableWhitespaces)
Constructs the instance of the processor. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
String |
getNamespace(String prefix)
Returns namespace that is currently bound to given prefix. |
String |
getPrefix(String namespace)
Returns last registered prefix for given namespace. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
void |
processingInstruction(String target,
String data)
|
void |
setDocumentLocator(Locator locator)
|
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final ContentHandler original
public final boolean ignoreIgnorableWhitespaces
true
if ignorable whitespaces shall not be reported to the
original content handler.
Constructor Detail |
---|
public PrefixMappingTracker(ContentHandler original, boolean ignoreIgnorableWhitespaces)
original
- here the events are routed.ignoreIgnorableWhitespaces
- if true
then
ignorableWhitespace()
event is ignored.Method Detail |
---|
public String getPrefix(String namespace)
namespace
- the namespace to query.
null
if no prefix is
registered for the namespace.public String getNamespace(String prefix)
null
namespace is returned as an empty string.
prefix
- prefix to check.
null
if prefix
is unknown.public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |