public class XMLPropertyElement extends java.lang.Object implements XMLProperty
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
className |
protected java.util.List |
content |
protected java.lang.String |
name |
protected XMLProperty |
parent |
protected java.lang.String |
type |
| Constructor and Description |
|---|
XMLPropertyElement(XMLProperty mother)
Constructs an empty property element.
|
XMLPropertyElement(XMLProperty mother,
java.lang.String propertyName,
java.lang.String propertyType,
java.lang.Object value)
Constructs a property element with the specified value.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getArrayString(java.lang.Object array)
Returns a string representation of a primitive array.
|
XMLControl |
getChildControl(java.lang.String name)
Gets the named XMLControl child of this property.
|
XMLControl[] |
getChildControls()
Gets the XMLControl children of this property.
|
int |
getLevel()
Gets the level of this property relative to root.
|
XMLProperty |
getParentProperty()
Gets the immediate parent property.
|
java.lang.Class |
getPropertyClass()
Gets the property class.
|
java.util.List |
getPropertyContent()
Gets the xml content for this property.
|
java.lang.String |
getPropertyName()
Gets the property name.
|
java.lang.String |
getPropertyType()
Gets the property type.
|
protected java.lang.String |
indent(int level)
Returns a space for indentation.
|
void |
setValue(java.lang.String stringValue)
Sets the value of this property if property type is primitive or string.
|
java.lang.String |
toString()
Returns the xml string representation of this property.
|
protected XMLProperty parent
protected java.lang.String name
protected java.lang.String type
protected java.lang.String className
protected java.util.List content
public XMLPropertyElement(XMLProperty mother)
mother - the parentpublic XMLPropertyElement(XMLProperty mother, java.lang.String propertyName, java.lang.String propertyType, java.lang.Object value)
mother - the parentpropertyName - the namepropertyType - the typevalue - the valuepublic java.lang.String getPropertyName()
getPropertyName in interface XMLPropertypublic java.lang.String getPropertyType()
getPropertyType in interface XMLPropertypublic java.lang.Class getPropertyClass()
getPropertyClass in interface XMLPropertypublic XMLProperty getParentProperty()
getParentProperty in interface XMLPropertypublic int getLevel()
getLevel in interface XMLPropertypublic java.util.List getPropertyContent()
getPropertyContent in interface XMLPropertypublic XMLControl getChildControl(java.lang.String name)
getChildControl in interface XMLPropertyname - the property namepublic XMLControl[] getChildControls()
getChildControls in interface XMLPropertypublic void setValue(java.lang.String stringValue)
setValue in interface XMLPropertystringValue - the string value of a primitive or string propertypublic java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.String indent(int level)
level - the indent levelprotected java.lang.String getArrayString(java.lang.Object array)
array - the array