Class DefaultElementBodyCharacters
java.lang.Object
org.x4o.xml.element.DefaultElementBodyCharacters
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.x4o.xml.element.Element
Element.ElementType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an Elment as child of this element.void
doCharacters
(String body) Sets the body texts on an event based system.void
Sets the comment texts on an event based system.void
This method is fired when the end xml tag is parsed.void
This method is fired only once in the run phase.void
This method is fired when the start of xml tag is parsed.void
doIgnorableWhitespace
(String space) Is called when there is whitespace in xml.Gets the childeren elements including those which are comment and white space.Gets the xml attributes.Gets the childeren elements.Gets the ElementClass.Gives back the object this Element has made and configed.
So other elements can do stuff to that object.Gets the Element type.Gets the X4OLanguageSession.Returns the parent Element.
Or null when there is no parent Element.boolean
Returns if this elements transforms the tree.void
release()
This method get called when this Element object is not needed anymore.
Can be used to close resources.void
removeChild
(Element element) Removes an Elment as child of this element.void
setAttribute
(String name, String value) Sets the xml attributes.void
setElementClass
(ElementClass elementClass) Sets the ElementClass.void
setElementObject
(Object elementObject) Sets the object which we control.void
setLanguageSession
(X4OLanguageSession elementLanguage) Sets the X4OLanguageSession.void
Set the parent Element.
-
Constructor Details
-
DefaultElementBodyCharacters
public DefaultElementBodyCharacters()
-
-
Method Details
-
getElementType
Description copied from interface:Element
Gets the Element type.- Specified by:
getElementType
in interfaceElement
- Returns:
- The ElementType for characters.
- See Also:
-
addChild
-
doCharacters
Description copied from interface:Element
Sets the body texts on an event based system.- Specified by:
doCharacters
in interfaceElement
- Parameters:
body
- The body text.- Throws:
ElementException
- Can be thrown when structure is not correct.- See Also:
-
doComment
Description copied from interface:Element
Sets the comment texts on an event based system.- Specified by:
doComment
in interfaceElement
- Parameters:
comment
- The comment text.- Throws:
ElementException
- Can be thrown when structure is not correct.- See Also:
-
doElementEnd
Description copied from interface:Element
This method is fired when the end xml tag is parsed.- Specified by:
doElementEnd
in interfaceElement
- Throws:
ElementException
- Can be thrown when structure is not correct.- See Also:
-
doElementRun
Description copied from interface:Element
This method is fired only once in the run phase.- Specified by:
doElementRun
in interfaceElement
- Throws:
ElementException
- Can be thrown when structure is not correct.- See Also:
-
doElementStart
Description copied from interface:Element
This method is fired when the start of xml tag is parsed.- Specified by:
doElementStart
in interfaceElement
- Throws:
ElementException
- Can be thrown when structure is not correct.- See Also:
-
doIgnorableWhitespace
Description copied from interface:Element
Is called when there is whitespace in xml.- Specified by:
doIgnorableWhitespace
in interfaceElement
- Parameters:
space
- The space.- Throws:
ElementException
- Can be thrown when structure is not correct.- See Also:
-
getAllChilderen
Description copied from interface:Element
Gets the childeren elements including those which are comment and white space. (text)- Specified by:
getAllChilderen
in interfaceElement
- Returns:
- Returns all the childeren.
- See Also:
-
getAttributes
-
getChilderen
Description copied from interface:Element
Gets the childeren elements.- Specified by:
getChilderen
in interfaceElement
- Returns:
- Returns the childeren.
- See Also:
-
getElementClass
Description copied from interface:Element
Gets the ElementClass.- Specified by:
getElementClass
in interfaceElement
- Returns:
- Returns the ElementClass.
- See Also:
-
getLanguageSession
Description copied from interface:Element
Gets the X4OLanguageSession.- Specified by:
getLanguageSession
in interfaceElement
- Returns:
- Returns the X4OLanguageSession.
- See Also:
-
getElementObject
Description copied from interface:Element
Gives back the object this Element has made and configed.
So other elements can do stuff to that object.- Specified by:
getElementObject
in interfaceElement
- Returns:
- An Object.
- See Also:
-
getParent
-
isTransformingTree
public boolean isTransformingTree()Description copied from interface:Element
Returns if this elements transforms the tree. if true the the doElementRun is runned in the transform phase insteat of the run phase. You need to add those new or modified Elements to the DirtyElement for reparsering.- Specified by:
isTransformingTree
in interfaceElement
- Returns:
- Returns true if transforming tree.
- See Also:
-
release
Description copied from interface:Element
This method get called when this Element object is not needed anymore.
Can be used to close resources.- Specified by:
release
in interfaceElement
- Throws:
ElementException
- Can be thrown when structure is not correct.- See Also:
-
removeChild
Description copied from interface:Element
Removes an Elment as child of this element.- Specified by:
removeChild
in interfaceElement
- Parameters:
element
- The child to remove.- See Also:
-
setAttribute
Description copied from interface:Element
Sets the xml attributes.- Specified by:
setAttribute
in interfaceElement
- Parameters:
name
- The name to set.value
- The value to set.- See Also:
-
setElementClass
Description copied from interface:Element
Sets the ElementClass.- Specified by:
setElementClass
in interfaceElement
- Parameters:
elementClass
- The ElementClass to set.- See Also:
-
setLanguageSession
Description copied from interface:Element
Sets the X4OLanguageSession.- Specified by:
setLanguageSession
in interfaceElement
- Parameters:
elementLanguage
- The X4OLanguageSession to set.- See Also:
-
setElementObject
Description copied from interface:Element
Sets the object which we control.- Specified by:
setElementObject
in interfaceElement
- Parameters:
elementObject
- The object to configed by this element.- See Also:
-
setParent
-