|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qsos.data.Element
public class Element
This class is the reference implementation of the IElement interface. It basicly act as a Java Bean for the model of an O3S sheet line. This model is that each line as four datas : meta, text, name and title. Meta is the xml tag, name and title are attributes and text is the text inside a tag. This leads to the point that one Element, the root Element contains all the others just like in a xml file.
For technical purpore this object has more property. It has a id property which his id in the datasource( if any)
Aside from this technical property, the JavaBean, has a reference to his container, which is an another IElement which contains this Element, and a list of sub-IElement which it contains itself.
see O3S Documentation.
Constructor Summary | |
---|---|
Element()
Allows to initialize the class. |
|
Element(java.lang.Long id,
java.lang.String meta,
java.lang.String name,
java.lang.String title,
java.lang.String text,
java.util.List<IElement> list,
IElement elem)
Allow to construct the value of every attribute of the class. |
Method Summary | |
---|---|
IElement |
addElement(IElement item)
Allow to add item to the list of sub element |
void |
delElement(IElement item)
Allow to delete an item from the list of sub element delete all the children |
java.lang.String |
getComment()
|
IElement |
getContainer()
Return an IElement which represents the parent of the current Element. |
java.lang.String |
getDesc()
|
java.lang.String |
getDesc0()
|
java.lang.String |
getDesc1()
|
java.lang.String |
getDesc2()
|
java.util.List<IElement> |
getElements()
Return a List of IElement which represents all the children of the current Element. |
java.lang.Long |
getId()
Returns the id of the Element. |
java.lang.String |
getMeta()
Return the meta in the Element. |
java.lang.String |
getName()
Return the name in the Element. |
java.lang.String |
getScore()
|
java.lang.String |
getText()
Return the text in the Element. |
java.lang.String |
getTitle()
Return the name in the Element. |
void |
setComment(java.lang.String comment)
|
void |
setContainer(IElement element)
Allow to set the container (the parent of an Element). |
void |
setDesc(java.lang.String desc)
|
void |
setDesc0(java.lang.String desc0)
|
void |
setDesc1(java.lang.String desc1)
|
void |
setDesc2(java.lang.String desc2)
|
void |
setElements(java.util.List<IElement> elements)
Allow to set the children of the current Element. |
void |
setId(java.lang.Long id)
Allows to set the id of the Element. |
void |
setMeta(java.lang.String meta)
Allows to set the meta of the Element. |
void |
setName(java.lang.String name)
Allows to set the name of the Element. |
void |
setScore(java.lang.String score)
|
void |
setText(java.lang.String text)
Allows to set the text of the Element. |
void |
setTitle(java.lang.String title)
Allows to set the title of the Element. |
java.lang.String |
toString()
Returns a string representation of the Element |
java.lang.String |
tree()
Return a string version of the Element and its childs. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Element()
Allows to initialize the class.
public Element(java.lang.Long id, java.lang.String meta, java.lang.String name, java.lang.String title, java.lang.String text, java.util.List<IElement> list, IElement elem)
Allow to construct the value of every attribute of the class.
id
- the id to set.meta
- the meta to set.name
- the name to set.title
- the title to set.text
- the text to set.list
- the list to set as elements.elem
- the elem toset as container.Method Detail |
---|
public java.lang.Long getId()
Returns the id of the Element.
getId
in interface IElement
public void setId(java.lang.Long id)
Allows to set the id of the Element.
setId
in interface IElement
id
- The id to set.public java.lang.String getMeta()
getMeta
in interface IElement
public void setMeta(java.lang.String meta)
Allows to set the meta of the Element.
setMeta
in interface IElement
meta
- the meta to set.public java.lang.String getName()
getName
in interface IElement
public void setName(java.lang.String name)
Allows to set the name of the Element.
setName
in interface IElement
name
- the name to set.public java.lang.String getTitle()
getTitle
in interface IElement
public void setTitle(java.lang.String title)
Allows to set the title of the Element.
setTitle
in interface IElement
title
- the title to set.public java.lang.String getText()
getText
in interface IElement
public void setText(java.lang.String text)
Allows to set the text of the Element.
setText
in interface IElement
text
- the text to set.public java.util.List<IElement> getElements()
Return a List of IElement which represents all the children of the current Element.
getElements
in interface IElement
public void setElements(java.util.List<IElement> elements)
Allow to set the children of the current Element.
setElements
in interface IElement
elements
- The List of Elements to set.public IElement getContainer()
Return an IElement which represents the parent of the current Element.
getContainer
in interface IElement
public void setContainer(IElement element)
Allow to set the container (the parent of an Element).
setContainer
in interface IElement
element
- the IElement to set as container of the current Element.public void setDesc(java.lang.String desc)
setDesc
in interface IElement
public java.lang.String getDesc()
getDesc
in interface IElement
public void setDesc0(java.lang.String desc0)
setDesc0
in interface IElement
public java.lang.String getDesc0()
getDesc0
in interface IElement
public void setDesc1(java.lang.String desc1)
setDesc1
in interface IElement
public java.lang.String getDesc1()
getDesc1
in interface IElement
public void setDesc2(java.lang.String desc2)
setDesc2
in interface IElement
public java.lang.String getDesc2()
getDesc2
in interface IElement
public void setComment(java.lang.String comment)
setComment
in interface IElement
public java.lang.String getComment()
getComment
in interface IElement
public void setScore(java.lang.String score) throws java.io.IOException
setScore
in interface IElement
java.io.IOException
public java.lang.String getScore()
getScore
in interface IElement
public IElement addElement(IElement item)
Allow to add item to the list of sub element
addElement
in interface IElement
item
- the IElement to add to the children of this object.
public void delElement(IElement item)
Allow to delete an item from the list of sub element delete all the children
delElement
in interface IElement
item
- the IElement to delete to the children of this object.public java.lang.String toString()
Returns a string representation of the Element
toString
in interface IElement
toString
in class java.lang.Object
public java.lang.String tree()
Return a string version of the Element and its childs. This method is designed to ease unit test and debug and is not to be used for anything else.
tree
in interface IElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |