|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cysols.iodef.IElement
public class IElement
The Element represents an element in an XML document.
| Field Summary | |
|---|---|
protected List<IAttribute> |
attributeList
|
protected ElementCreator |
elementcreator
|
protected OrderlyMap |
elementsMap
|
String |
myName
element name |
| Constructor Summary | |
|---|---|
protected |
IElement(String name,
ElementCreator creator)
Instantiates with the specified name. |
protected |
IElement(String uri,
String name)
Instantiates with the specified name spece and name. |
| Method Summary | |
|---|---|
void |
addElement(IElement element)
Adds the element to the end of the list of children of this element. |
protected IElement |
addElementValue(String key,
String value)
|
protected IAttribute |
createAttribute(String name)
|
protected Element |
createDomElement(Document doc)
|
protected IElement |
createrElement(String name)
|
protected IAttribute |
getAttribute(String namespece,
String name)
|
String[] |
getAttributeNames()
Returns array of name containing the attributes of this node. |
protected IAttribute[] |
getAttributes()
|
String |
getAttributeValue(String name)
Returns the one of attribute value for specified name. |
String |
getAttributeValue(String namespece,
String name)
Returns the attribute value for specified namespece and name. |
String |
getAttributeValueINS(String name)
Returns The first attribute value found that matches for specified name, this method ignores name spece. |
String[] |
getAttributeValuesINS(String name)
Returns the attribute values for specified name, this method ignores name spece. |
protected List |
getElementList(String key)
|
String |
getElementName()
Returns the element name. |
IElement[] |
getElements()
Returns array of element containing the list of children. |
IElement[] |
getElements(String name)
Returns the children elements that matched the specified name and null namespace in this element. |
IElement[] |
getElements(String namespece,
String name)
Returns the children elements that matched the specified name and namespace in this element. |
IElement[] |
getElementsINS(String name)
Returns the children elements that matched the specified name in this element. |
protected String[] |
getElementsValue(String key)
|
protected String |
getElementValue(String key)
|
String |
getNameSpace()
Returns the name spece. |
String |
getValue()
Returns the node value. |
void |
removeAttribute(String name)
Removes the attribute by the specified name. |
void |
removeAttribute(String namespece,
String name)
Removes the attribute by the specified namespece and name. |
void |
removeElements(String namespece,
String name)
Removes the elements by the specified namespece and name. |
void |
setAttribute(IAttribute attr)
Sets the attribute node in this element. |
void |
setAttribute(String name,
String value)
Sets the attribute with the specified name and null namespace. |
void |
setAttribute(String namespece,
String name,
String value)
Sets the attribute with the specified namespece and name |
void |
setAttributeINS(String name,
String value)
Sets the attribute with the specified name and the namespace resolved by creator. |
void |
setElementINS(IElement element)
Adds the element to the end of the list of children of this element if elements with same name doesn't exist, else replaces the element to the existing elements. |
void |
setElementsINS(IElement[] elements)
Adds the elements to the end of the list of children of this element if elements with same name doesn't exist, else replaces the elements to the existing elements. |
protected IElement |
setElementValue(String key,
String value)
|
void |
setNameSpace(String namespace)
Sets the namespace in this element. |
void |
setValue(String value)
Sets the node value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String myName
protected OrderlyMap elementsMap
protected List<IAttribute> attributeList
protected ElementCreator elementcreator
| Constructor Detail |
|---|
protected IElement(String name,
ElementCreator creator)
name - element namecreator - a instance of ElementCreator class
protected IElement(String uri,
String name)
uri - the name specname - the element name| Method Detail |
|---|
public String getElementName()
public void setNameSpace(String namespace)
namespace - the namespace uripublic String getNameSpace()
public String getAttributeValue(String name)
name - - defined attribute name to XML schema
public String[] getAttributeValuesINS(String name)
name - - defined attribute name to XML schema
public String getAttributeValueINS(String name)
name - - defined attribute name to XML schema
public String getAttributeValue(String namespece,
String name)
namespece - - defined attribute name spece.name - - defined attribute name.
public String getValue()
public void setValue(String value)
value - node value
public void setAttribute(String name,
String value)
name - name of attributevalue - value of attribute
public void setAttributeINS(String name,
String value)
name - name of attributevalue - value of attributepublic void setAttribute(IAttribute attr)
attr - the attribute node
public void setAttribute(String namespece,
String name,
String value)
namespece - namespece of attributename - name of attributevalue - value of attributepublic void addElement(IElement element)
element - the element to add.
public IElement[] getElements(String namespece,
String name)
namespece - the namespace uriname - element name
public IElement[] getElementsINS(String name)
name - element name
public IElement[] getElements(String name)
name - element name
public void setElementINS(IElement element)
element - the element to add.public void setElementsINS(IElement[] elements)
elements - the elements to add.public void removeAttribute(String name)
name - attribute name
public void removeAttribute(String namespece,
String name)
namespece - name spece of attributename - name of attribute
public void removeElements(String namespece,
String name)
namespece - name spece of elementname - name of elementpublic String[] getAttributeNames()
public IElement[] getElements()
protected Element createDomElement(Document doc)
protected String getElementValue(String key)
protected IElement setElementValue(String key,
String value)
protected String[] getElementsValue(String key)
protected IElement addElementValue(String key,
String value)
protected List getElementList(String key)
protected IElement createrElement(String name)
protected IAttribute createAttribute(String name)
protected IAttribute[] getAttributes()
protected IAttribute getAttribute(String namespece,
String name)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||