public class XmlSaxEventHandlerImpl extends AbstractSaxEventHandler
Metacard
s. By default, handles all
elements defined in the xmlToMetacard
These defaults can be
overridden by passing a different Map
in XmlSaxEventHandlerImpl#setXmlToMetacard(Map)
Modifier | Constructor and Description |
---|---|
protected |
XmlSaxEventHandlerImpl() |
protected |
XmlSaxEventHandlerImpl(Map<String,String> xmlToMetacardMap) |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Takes in a sax event from
SaxEventHandlerDelegate and adds the characters
to textDataOfElement |
void |
endElement(String namespaceURI,
String localName,
String qName)
Takes in a sax event from
SaxEventHandlerDelegate . |
List<Attribute> |
getAttributes() |
Set<AttributeDescriptor> |
getSupportedAttributeDescriptors()
Get all the possible attribute types that can be returned by this factory's handler
|
void |
startDocument() |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
Takes in a sax event from
SaxEventHandlerDelegate , and if it is in the
xmlToMetacardMapping, begin reading it. |
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping
public List<Attribute> getAttributes()
public Set<AttributeDescriptor> getSupportedAttributeDescriptors()
SaxEventHandler
public void startDocument()
startDocument
in interface ContentHandler
startDocument
in class AbstractSaxEventHandler
public void startElement(String uri, String localName, String qName, Attributes attributes)
SaxEventHandlerDelegate
, and if it is in the
xmlToMetacardMapping, begin reading it.uri
- the URI that is passed in by SaxEventHandlerDelegate
localName
- the localName that is passed in by SaxEventHandlerDelegate
qName
- the qName that is passed in by SaxEventHandlerDelegate
attributes
- the attributes that are passed in by SaxEventHandlerDelegate
public void endElement(String namespaceURI, String localName, String qName)
SaxEventHandlerDelegate
. If the element is in the
xmlToElementMapping, add it to the attributes listnamespaceURI
- the namespaceURI that is passed in by SaxEventHandlerDelegate
localName
- the localName that is passed in by SaxEventHandlerDelegate
qName
- the qName that is passed in by SaxEventHandlerDelegate
public void characters(char[] ch, int start, int length)
SaxEventHandlerDelegate
and adds the characters
to textDataOfElementch
- the ch that is passed in by SaxEventHandlerDelegate
start
- the start that is passed in by SaxEventHandlerDelegate
length
- the length that is passed in by SaxEventHandlerDelegate
This work is licensed under a Creative Commons Attribution 4.0 International License.