Class AbstractElement
java.lang.Object
org.x4o.xml.element.AbstractElement
- All Implemented Interfaces:
Element
- Direct Known Subclasses:
AttributeAliasElement
,BeanElement
,DefaultElement
,DefaultElementBodyComment
,DefaultElementBodyWhitespace
,DescriptionElement
,ElementClassAddParentElement
,ELReferenceElement
,MethodElement
,ModuleElement
,NextAttributeElement
,ParentObjectElement
,PropertyElement
,SkipPhaseElement
An AbstractElement.
- Version:
- 1.0 Aug 8, 2005
- Author:
- Willem Cazander
-
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 characters) 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
Defaults to false.void
release()
Cleans the attributes and elements(class) and context.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 object) Sets the object which we control.void
setLanguageSession
(X4OLanguageSession languageSession) Sets the X4OLanguageSession.void
Set the parent Element.
-
Constructor Details
-
AbstractElement
public AbstractElement()
-
-
Method Details
-
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:
-
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:
-
setParent
-
getParent
-
release
Cleans the attributes and elements(class) and context.- Specified by:
release
in interfaceElement
- Throws:
ElementException
- Can be thrown when structure is not correct.- 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:
-
setElementObject
Description copied from interface:Element
Sets the object which we control.- Specified by:
setElementObject
in interfaceElement
- Parameters:
object
- The object to configed by this element.- See Also:
-
setLanguageSession
Description copied from interface:Element
Sets the X4OLanguageSession.- Specified by:
setLanguageSession
in interfaceElement
- Parameters:
languageSession
- The X4OLanguageSession to set.- See Also:
-
getLanguageSession
Description copied from interface:Element
Gets the X4OLanguageSession.- Specified by:
getLanguageSession
in interfaceElement
- Returns:
- Returns the X4OLanguageSession.
- See Also:
-
doCharacters
Description copied from interface:Element
Sets the body texts on an event based system.- Specified by:
doCharacters
in interfaceElement
- Parameters:
characters
- 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:
-
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:
-
setElementClass
Description copied from interface:Element
Sets the ElementClass.- Specified by:
setElementClass
in interfaceElement
- Parameters:
elementClass
- The ElementClass to set.- See Also:
-
getElementClass
Description copied from interface:Element
Gets the ElementClass.- Specified by:
getElementClass
in interfaceElement
- Returns:
- Returns the ElementClass.
- See Also:
-
getAttributes
-
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:
-
getChilderen
Description copied from interface:Element
Gets the childeren elements.- Specified by:
getChilderen
in interfaceElement
- Returns:
- Returns the childeren.
- See Also:
-
addChild
-
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:
-
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:
-
getElementType
Description copied from interface:Element
Gets the Element type.- Specified by:
getElementType
in interfaceElement
- Returns:
- Returns the ElementType.
- See Also:
-
isTransformingTree
public boolean isTransformingTree()Defaults to false.- Specified by:
isTransformingTree
in interfaceElement
- Returns:
- Returns true if transforming tree.
- See Also:
-