TAttributeType - the type of the AttributeWrapper to be usedTAttributeHolder - the type of the AttributeHolder to be usedTDocumentDataProvider - the type of the IDocumentDataProvider to be usedTResult - the type of result provided by the elementpublic abstract class ElementBase<TAttributeType extends AttributeWrapper,TAttributeHolder extends AttributeHolder<TAttributeType>,TDocumentDataProvider extends IDocumentDataProvider,TResult,TChild extends ElementBase<?,?,TDocumentDataProvider,?,?>> extends Object
SAXParser.| Constructor and Description |
|---|
ElementBase(String name,
Attributes attributes,
TDocumentDataProvider documentDataProvider,
TAttributeHolder attributeHolder)
Creates a new instance of he element using the given attributes, parent and documentDataProvider.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
endProcessing()
Will be called when the end of the element was been reached and thus the processing is finished.
|
TAttributeHolder |
getAttributeHolder()
Gets the
attributeHolder. |
Map<String,TAttributeType> |
getAttributes()
Gets the attribute map as an unmodifiable map.
|
TDocumentDataProvider |
getDocumentDataProvider()
Gets the
documentDataProvider. |
String |
getName()
Gets the value of the property.
|
abstract TResult |
getResult()
Returns the result for the current element.
|
List<TChild> |
getUnmodifiableChildren()
Gets an unmodifiable instance of the
children. |
abstract boolean |
keepElement()
Determines if the element will be kept, meaning it will be kept in memory and is available as a parent for all its children.
|
abstract void |
processCharacterData(char[] ch,
int start,
int length)
Will be called when character data (CDATA) is read for an element.
|
abstract void |
startProcessing()
Will be called when an element is started that represents this element.
|
String |
toString() |
public ElementBase(String name, Attributes attributes, TDocumentDataProvider documentDataProvider, TAttributeHolder attributeHolder) throws IllegalArgumentException
name - value of the element, must not be nullattributes - attributes to be useddocumentDataProvider - documentDataProvider to be used, must not be nullattributeHolder - the element that will contain the attributes of this element.IllegalArgumentException - if either value or documentDataProvider are nullpublic final Map<String,TAttributeType> getAttributes()
public TDocumentDataProvider getDocumentDataProvider()
documentDataProvider.documentDataProviderpublic TAttributeHolder getAttributeHolder()
attributeHolder.attributeHolderpublic List<TChild> getUnmodifiableChildren()
children.childrenpublic abstract boolean keepElement()
public abstract void startProcessing()
throws SAXException
SAXException - will be thrown when an error occurs during processingpublic abstract void processCharacterData(char[] ch,
int start,
int length)
throws SAXException
ch - The characters.start - The start position in the character array.length - The number of characters to use from the
character array.SAXException - will be thrown when an error occurs during processing the characterspublic abstract void endProcessing()
throws SAXException
SAXException - will be thrown when an error occurs during processingpublic abstract TResult getResult() throws SAXException
SAXException - will be thrown when an error occurs retrieving the resultCopyright © 2017 Saxonia Systems AG. All rights reserved.