Package eu.bandm.tools.util2
Class SaxLocatorMapper
java.lang.Object
eu.bandm.tools.util.xml.ContentProxy
eu.bandm.tools.util2.SaxLocatorMapper
- All Implemented Interfaces:
ContentHandler
Replaces all
setDocumentLocator(Locator)
SAX calls by an intercepting Locator
,
which re-maps location info according to the LocationMap
-
Field Summary
Modifier and TypeFieldDescription(package private) Location<XMLDocumentIdentifier>
(package private) Locator
(package private) final LocationMap<XMLDocumentIdentifier,
XMLDocumentIdentifier> protected final Locator
static final int
static final String
static final String
Fields inherited from class eu.bandm.tools.util.xml.ContentProxy
out
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int end) void
void
endElement
(String uri, String localName, String qName) void
endPrefixMapping
(String prefix) void
ignorableWhitespace
(char[] ch, int start, int end) protected void
void
processingInstruction
(String target, String data) void
void
skippedEntity
(String name) void
void
startElement
(String uri, String localName, String qName, Attributes attrs) void
startPrefixMapping
(String prefix, String uri) protected void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
map
-
incomingLocs
Locator incomingLocs -
cache
Location<XMLDocumentIdentifier> cache -
NO_NUMBER_AVAILABLE
public static final int NO_NUMBER_AVAILABLE- See Also:
-
NO_SYS_ID_AVAILABLE
- See Also:
-
NO_PUB_ID_AVAILABLE
-
newlocs
-
-
Constructor Details
-
SaxLocatorMapper
public SaxLocatorMapper(LocationMap<XMLDocumentIdentifier, XMLDocumentIdentifier> map, ContentHandler out)
-
-
Method Details
-
invalidate
protected void invalidate() -
updateCache
protected void updateCache() -
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classContentProxy
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classContentProxy
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classContentProxy
- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Overrides:
endPrefixMapping
in classContentProxy
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Overrides:
ignorableWhitespace
in classContentProxy
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Overrides:
processingInstruction
in classContentProxy
- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classContentProxy
-
skippedEntity
- Specified by:
skippedEntity
in interfaceContentHandler
- Overrides:
skippedEntity
in classContentProxy
- Throws:
SAXException
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classContentProxy
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classContentProxy
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Overrides:
startPrefixMapping
in classContentProxy
- Throws:
SAXException
-