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
FieldsModifier and TypeFieldDescription(package private) Location<XMLDocumentIdentifier>(package private) Locator(package private) final LocationMap<XMLDocumentIdentifier,XMLDocumentIdentifier> protected final Locatorstatic final intstatic final Stringstatic final StringFields inherited from class eu.bandm.tools.util.xml.ContentProxy
out -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int end) voidvoidendElement(String uri, String localName, String qName) voidendPrefixMapping(String prefix) voidignorableWhitespace(char[] ch, int start, int end) protected voidvoidprocessingInstruction(String target, String data) voidvoidskippedEntity(String name) voidvoidstartElement(String uri, String localName, String qName, Attributes attrs) voidstartPrefixMapping(String prefix, String uri) protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
charactersin interfaceContentHandler- Overrides:
charactersin classContentProxy- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Overrides:
endDocumentin classContentProxy- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classContentProxy- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Overrides:
endPrefixMappingin classContentProxy- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Overrides:
ignorableWhitespacein classContentProxy- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Overrides:
processingInstructionin classContentProxy- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler- Overrides:
setDocumentLocatorin classContentProxy
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Overrides:
skippedEntityin classContentProxy- Throws:
SAXException
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classContentProxy- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classContentProxy- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Overrides:
startPrefixMappingin classContentProxy- Throws:
SAXException
-