- java.lang.Object
-
- org.jorigin.lang.xml.LangResourceContentHandler
-
- All Implemented Interfaces:
ContentHandler
public class LangResourceContentHandler extends Object implements ContentHandler
A content handler for the lang resource XML files.- Since:
- 1.0.0
- Version:
- "1.0.13" - b202005081200L
- Author:
- Julien Seinturier - COMEX S.A. - contact@jorigin.org - https://github.com/jorigin/jeometry
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTRIBUTE_KEYThe name of the resource key attributestatic StringATTRIBUTE_VALUEThe name of the resource value attribute.static StringELEMENT_RESOURCEThe name of the resource XML elementstatic StringELEMENT_RESOURCESThe name of the resource list XML elementprotected LocatorlocatorHold onto the locator for location information
-
Constructor Summary
Constructors Constructor Description LangResourceContentHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidendDocument()voidendElement(String uri, String localName, String qName)voidendPrefixMapping(String prefix)HashMap<String,String>getResources()Get the resources attached to this content handler.voidignorableWhitespace(char[] ch, int start, int length)voidprocessingInstruction(String target, String data)voidsetDocumentLocator(Locator locator)voidskippedEntity(String name)voidstartDocument()voidstartElement(String uri, String localName, String qName, Attributes atts)voidstartPrefixMapping(String prefix, String uri)
-
-
-
Field Detail
-
ELEMENT_RESOURCES
public static String ELEMENT_RESOURCES
The name of the resource list XML element
-
ELEMENT_RESOURCE
public static String ELEMENT_RESOURCE
The name of the resource XML element
-
ATTRIBUTE_KEY
public static String ATTRIBUTE_KEY
The name of the resource key attribute
-
ATTRIBUTE_VALUE
public static String ATTRIBUTE_VALUE
The name of the resource value attribute.
-
locator
protected Locator locator
Hold onto the locator for location information
-
-
Method Detail
-
getResources
public HashMap<String,String> getResources()
Get the resources attached to this content handler.- Returns:
- the resources attached to this content handler.
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
-