Interface Element
- All Known Implementing Classes:
AbstractElement
,AttributeAliasElement
,BeanElement
,DefaultElement
,DefaultElementBodyCharacters
,DefaultElementBodyComment
,DefaultElementBodyWhitespace
,DescriptionElement
,ElementClassAddParentElement
,ELReferenceElement
,MethodElement
,ModuleElement
,NextAttributeElement
,ParentObjectElement
,PropertyElement
,SkipPhaseElement
public interface Element
Defines an XML element with an object.
The main function is to store the ElementObject.
Also we can configure the ElementObject from differted events hooks. from the attibutes or parent (object)element.
The main function is to store the ElementObject.
Also we can configure the ElementObject from differted events hooks. from the attibutes or parent (object)element.
- Version:
- 1.0 Feb 01, 2005
- Author:
- Willem Cazander
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The ElementTypes which are possible. -
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 object) Sets the object which we control.void
setLanguageSession
(X4OLanguageSession languageSession) Sets the X4OLanguageSession.void
Set the parent Element.
-
Method Details
-
doElementEnd
This method is fired when the end xml tag is parsed.- Throws:
ElementException
- Can be thrown when structure is not correct.
-
doElementStart
This method is fired when the start of xml tag is parsed.- Throws:
ElementException
- Can be thrown when structure is not correct.
-
doElementRun
This method is fired only once in the run phase.- Throws:
ElementException
- Can be thrown when structure is not correct.
-
setParent
Set the parent Element.- Parameters:
element
- The paraent Element to set.
-
getParent
Element getParent()Returns the parent Element.
Or null when there is no parent Element.- Returns:
- Returns the parent Element
-
release
This method get called when this Element object is not needed anymore.
Can be used to close resources.- Throws:
ElementException
- Can be thrown when structure is not correct.
-
getElementObject
Object getElementObject()Gives back the object this Element has made and configed.
So other elements can do stuff to that object.- Returns:
- An Object.
-
setElementObject
Sets the object which we control.- Parameters:
object
- The object to configed by this element.
-
setLanguageSession
Sets the X4OLanguageSession.- Parameters:
languageSession
- The X4OLanguageSession to set.
-
getLanguageSession
X4OLanguageSession getLanguageSession()Gets the X4OLanguageSession.- Returns:
- Returns the X4OLanguageSession.
-
doCharacters
Sets the body texts on an event based system.- Parameters:
body
- The body text.- Throws:
ElementException
- Can be thrown when structure is not correct.
-
doComment
Sets the comment texts on an event based system.- Parameters:
comment
- The comment text.- Throws:
ElementException
- Can be thrown when structure is not correct.
-
doIgnorableWhitespace
Is called when there is whitespace in xml.- Parameters:
space
- The space.- Throws:
ElementException
- Can be thrown when structure is not correct.
-
setElementClass
Sets the ElementClass.- Parameters:
elementClass
- The ElementClass to set.
-
getElementClass
-
setAttribute
-
getAttributes
-
getChilderen
-
getAllChilderen
-
addChild
Adds an Elment as child of this element.- Parameters:
element
- The child to add.
-
removeChild
Removes an Elment as child of this element.- Parameters:
element
- The child to remove.
-
getElementType
-
isTransformingTree
boolean isTransformingTree()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.- Returns:
- Returns true if transforming tree.
-