TDataProvider - the type of the IDataProvider to be usedTResult - the type of result provided by the elementTParent - the type of parent of this elementpublic abstract class ElementBase<TDataProvider extends IDataProvider,TResult,TParent extends ElementBase<TDataProvider,?,?>> extends Object
SAXParser.| Constructor and Description |
|---|
ElementBase(String name,
Attributes attributes,
TParent parent,
TDataProvider dataProvider)
Creates a new instance of he element using the given attributes, parent and dataProvider.
|
| 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.
|
String |
getAttribute(String key)
returns the attributes with the given key.
|
Map<String,String> |
getAttributes()
Gets the attribute map as an unmodifiable map.
|
List<ElementBase> |
getChildren()
Gets the
children. |
TDataProvider |
getDataProvider()
Gets the
dataProvider. |
String |
getName()
Gets the value of the property.
|
TParent |
getParent()
Gets the
parent. |
abstract TResult |
getResult()
Returns the result for the current element.
|
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, TParent parent, TDataProvider dataProvider) throws IllegalArgumentException
name - value of the element, must not be nullattributes - attributes to be usedparent - parent of the elementdataProvider - dataProvider to be used, must not be nullIllegalArgumentException - if either value or dataProvider are nullpublic final Map<String,String> getAttributes()
public List<ElementBase> getChildren()
children.childrenpublic TDataProvider getDataProvider()
dataProvider.dataProviderpublic abstract TResult getResult() throws SAXException
SAXException - will be thrown when an error occurs retrieving the resultpublic String getAttribute(String key)
key - key of the attributepublic 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 processingCopyright © 2016 Saxonia Systems AG. All rights reserved.