|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Element
| Method Summary | |
|---|---|
void |
addChild(Element child)
Add a new child Element |
Element |
createElement(java.lang.String name)
|
Element |
createElement(java.lang.String element,
java.lang.String value)
|
java.lang.String |
getAttribute(java.lang.String name)
Return the value of specified attribute. |
java.lang.String |
getAttribute(java.lang.String name,
java.lang.String defaultValue)
Returns the value of the attribute specified by its name as a String, or the default value if no attribute by
that name exists or is empty. |
boolean |
getAttributeAsBoolean(java.lang.String name)
Return the boolean value of the specified attribute contained
in this node. |
boolean |
getAttributeAsBoolean(java.lang.String name,
boolean defaultValue)
Returns the value of the attribute specified by its name as a boolean, or the default value if no attribute by
that name exists or is empty. |
double |
getAttributeAsDouble(java.lang.String name)
Return the double value of the specified attribute contained
in this node. |
double |
getAttributeAsDouble(java.lang.String name,
double defaultValue)
Returns the value of the attribute specified by its name as a double, or the default value if no attribute by
that name exists or is empty. |
float |
getAttributeAsFloat(java.lang.String name)
Return the float value of the specified attribute contained
in this node. |
float |
getAttributeAsFloat(java.lang.String name,
float defaultValue)
Returns the value of the attribute specified by its name as a float, or the default value if no attribute by
that name exists or is empty. |
int |
getAttributeAsInteger(java.lang.String name)
Return the int value of the specified attribute contained
in this node. |
int |
getAttributeAsInteger(java.lang.String name,
int defaultValue)
Returns the value of the attribute specified by its name as a int, or the default value if no attribute by
that name exists or is empty. |
long |
getAttributeAsLong(java.lang.String name)
Returns the value of the attribute specified by its name as a long. |
long |
getAttributeAsLong(java.lang.String name,
long defaultValue)
Returns the value of the attribute specified by its name as a long, or the default value if no attribute by
that name exists or is empty. |
java.lang.String[] |
getAttributeNames()
Return an array of all attribute names. |
Element |
getChild(java.lang.String child)
Return a new Element instance encapsulating the
specified child node. |
Element |
getChild(java.lang.String child,
boolean create)
Return a new Element instance encapsulating the
specified child node. |
Element[] |
getChildren()
Return an Element[]
|
Element[] |
getChildren(java.lang.String name)
Return an Element[] containing all
node children with the specified name. |
java.lang.String |
getName()
Return the name of the element |
java.lang.String |
getValue()
Return the value of the element |
java.lang.String |
getValue(java.lang.String defaultValue)
Return the value of the element |
boolean |
removeChild(Element child)
|
boolean |
removeChildren(java.lang.String child)
|
void |
setAttribute(java.lang.String name,
java.lang.String value)
Add a new XMLAttribute |
void |
setName(java.lang.String name)
Set the name of the Element |
void |
setValue(java.lang.String value)
Set the value of the Element |
| Methods inherited from interface org.jutil.io.VersionedObject |
|---|
getVersion |
| Method Detail |
|---|
java.lang.String getName()
void setName(java.lang.String name)
Element
name - The name Stringjava.lang.String getValue()
java.lang.String getValue(java.lang.String defaultValue)
void setValue(java.lang.String value)
Element
value - The value Stringvoid addChild(Element child)
Element
child - The child Element.Element getChild(java.lang.String child)
Element instance encapsulating the
specified child node.
child - The name of the child node.
Element getChild(java.lang.String child,
boolean create)
Element instance encapsulating the
specified child node.
child - The name of the child node.create - Boolean flag if true create new ElementThe name of the child node.
Element[] getChildren()
Element[]
return new Element[0];Element[] getChildren(java.lang.String name)
Element[] containing all
node children with the specified name.
name - The name of the children to get.
return new Element[0];java.lang.String[] getAttributeNames()
void setAttribute(java.lang.String name,
java.lang.String value)
XMLAttribute
name - The attribute name.value - The attribute value.java.lang.String getAttribute(java.lang.String name)
name - The name of the attribute you ask the value of.
int getAttributeAsInteger(java.lang.String name)
throws AttributeNotFoundException,
ValueParseException
int value of the specified attribute contained
in this node.
name - The name of the attribute you ask the value of.
AttributeNotFoundException - If no attribute with that name exists.
NumberParseException - or if conversion to int fails.
ValueParseException
long getAttributeAsLong(java.lang.String name)
throws AttributeNotFoundException,
ValueParseException
long.
name - The name of the attribute you ask the value of.
AttributeNotFoundException - If no attribute with that name exists.
NumberParseException - or if conversion to long fails.
ValueParseException
float getAttributeAsFloat(java.lang.String name)
throws AttributeNotFoundException,
ValueParseException
float value of the specified attribute contained
in this node.
name - The name of the attribute you ask the value of.
AttributeNotFoundException - If no attribute with that name exists.
NumberParseException - or if conversion to float fails.
ValueParseException
double getAttributeAsDouble(java.lang.String name)
throws AttributeNotFoundException,
ValueParseException
double value of the specified attribute contained
in this node.
name - The name of the attribute you ask the value of.
AttributeNotFoundException - If no attribute with that name exists.
NumberParseException - or if conversion to double fails.
ValueParseException
boolean getAttributeAsBoolean(java.lang.String name)
throws AttributeNotFoundException,
ValueParseException
boolean value of the specified attribute contained
in this node.
name - The name of the attribute you ask the value of.
AttributeNotFoundException - If no attribute with that name exists.
NumberParseException - or if conversion to boolean fails.
ValueParseException
java.lang.String getAttribute(java.lang.String name,
java.lang.String defaultValue)
String, or the default value if no attribute by
that name exists or is empty.
name - The name of the attribute you ask the value of.defaultValue - The default value desired.
int getAttributeAsInteger(java.lang.String name,
int defaultValue)
int, or the default value if no attribute by
that name exists or is empty.
name - The name of the attribute you ask the value of.defaultValue - The default value desired.
long getAttributeAsLong(java.lang.String name,
long defaultValue)
long, or the default value if no attribute by
that name exists or is empty.
name - The name of the attribute you ask the value of.defaultValue - The default value desired.
float getAttributeAsFloat(java.lang.String name,
float defaultValue)
float, or the default value if no attribute by
that name exists or is empty.
name - The name of the attribute you ask the value of.defaultValue - The default value desired.
double getAttributeAsDouble(java.lang.String name,
double defaultValue)
double, or the default value if no attribute by
that name exists or is empty.
name - The name of the attribute you ask the value of.defaultValue - The default value desired.
boolean getAttributeAsBoolean(java.lang.String name,
boolean defaultValue)
boolean, or the default value if no attribute by
that name exists or is empty.
name - The name of the attribute you ask the value of.defaultValue - The default value desired.
Element createElement(java.lang.String name)
Element createElement(java.lang.String element,
java.lang.String value)
boolean removeChild(Element child)
boolean removeChildren(java.lang.String child)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||