Class BaseType
- java.lang.Object
-
- com.sun.xml.rpc.processor.modeler.j2ee.xml.BaseType
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ComplexType,SimpleType
public class BaseType extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Factoryfactoryprotected SimpleDateFormatsimpleDateFormatprotected AttrxmlAttrprotected ElementxmlElement
-
Constructor Summary
Constructors Constructor Description BaseType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetElementBooleanValue(String elementName)bytegetElementByteValue(String elementName)DategetElementDateValue(String elementName)Get the value for the input elementdoublegetElementDoubleValue(String elementName)floatgetElementFloatValue(String elementName)intgetElementIntegerValue(String elementName)longgetElementLongValue(String elementName)StringgetElementName()Return the node name for this elementshortgetElementShortValue(String elementName)StringgetElementValue()Get the text value for this elementStringgetElementValue(String elementName)Get the value for the input elementStringgetElementValue(String property, int index)Get the element with the specifed name and at the specified locationBaseTypegetElementValue(String property, String className)Get the value for the input elementObjectgetElementValue(String property, String className, int index)Get the value for the input elementAttrgetXMLAttribute()Return the XML attribute that corresponds to this beanElementgetXMLElement()Return the XML element that corresponds to this beanbooleanremoveElement(String elementName)Remove the element with the input elementName from the current nodevoidsetElementValue(String elementName, boolean value)Create an element and set it to the specified valuevoidsetElementValue(String elementName, byte value)Create an element and set it to the specified valuevoidsetElementValue(String elementName, double value)Create an element and set it to the specified valuevoidsetElementValue(String elementName, float value)Create an element and set it to the specified valuevoidsetElementValue(String elementName, int value)Create an element and set it to the specified valuevoidsetElementValue(String elementName, long value)Create an element and set it to the specified valuevoidsetElementValue(String elementName, short value)Create an element and set it to the specified valuevoidsetElementValue(String elementName, BaseType baseType)Create an element and set it to the specified valuevoidsetElementValue(String elementName, String elementValue)Create the element and the text node if it does not exist.voidsetElementValue(String elementName, Date value)Create an element and set it to the specified value.protected voidsetFactory(Factory factory)Remember the factory that creates this XML element or attributeprotected voidsetXMLAttribute(Attr xmlAttr)Remember the XML attribute that corresponds to this beanprotected voidsetXMLElement(Element element)Remember the XML element that corresponds to this beanintsizeOfElement(String name)Return the number of children with this namevoidupdateElementValue(boolean value)voidupdateElementValue(byte value)voidupdateElementValue(double value)voidupdateElementValue(float value)voidupdateElementValue(int value)voidupdateElementValue(long value)voidupdateElementValue(short value)voidupdateElementValue(String value)Update the text node for this elementvoidupdateElementValue(Date value)
-
-
-
Field Detail
-
factory
protected Factory factory
-
xmlElement
protected Element xmlElement
-
xmlAttr
protected Attr xmlAttr
-
simpleDateFormat
protected SimpleDateFormat simpleDateFormat
-
-
Method Detail
-
setFactory
protected void setFactory(Factory factory)
Remember the factory that creates this XML element or attribute
-
setXMLElement
protected void setXMLElement(Element element)
Remember the XML element that corresponds to this bean
-
getXMLElement
public Element getXMLElement()
Return the XML element that corresponds to this bean
-
setXMLAttribute
protected void setXMLAttribute(Attr xmlAttr)
Remember the XML attribute that corresponds to this bean
-
getXMLAttribute
public Attr getXMLAttribute()
Return the XML attribute that corresponds to this bean
-
setElementValue
public void setElementValue(String elementName, String elementValue)
Create the element and the text node if it does not exist. Otherwise update the text value.- Parameters:
elementName- - the name of the elementelementValue- - the value of the element
-
setElementValue
public void setElementValue(String elementName, boolean value)
Create an element and set it to the specified value
-
setElementValue
public void setElementValue(String elementName, int value)
Create an element and set it to the specified value
-
setElementValue
public void setElementValue(String elementName, float value)
Create an element and set it to the specified value
-
setElementValue
public void setElementValue(String elementName, double value)
Create an element and set it to the specified value
-
setElementValue
public void setElementValue(String elementName, long value)
Create an element and set it to the specified value
-
setElementValue
public void setElementValue(String elementName, short value)
Create an element and set it to the specified value
-
setElementValue
public void setElementValue(String elementName, byte value)
Create an element and set it to the specified value
-
setElementValue
public void setElementValue(String elementName, Date value)
Create an element and set it to the specified value. The Date string is converted into the XML Schema date format CCYY-MM-DD.
-
setElementValue
public void setElementValue(String elementName, BaseType baseType)
Create an element and set it to the specified value
-
getElementValue
public String getElementValue()
Get the text value for this element
-
getElementValue
public String getElementValue(String property, int index)
Get the element with the specifed name and at the specified location
-
getElementValue
public String getElementValue(String elementName)
Get the value for the input element- Parameters:
elementName- The name of the element- Returns:
- String The value of the element (from the text node)
-
getElementBooleanValue
public boolean getElementBooleanValue(String elementName)
-
getElementIntegerValue
public int getElementIntegerValue(String elementName)
-
getElementFloatValue
public float getElementFloatValue(String elementName)
-
getElementDoubleValue
public double getElementDoubleValue(String elementName)
-
getElementLongValue
public long getElementLongValue(String elementName)
-
getElementShortValue
public short getElementShortValue(String elementName)
-
getElementByteValue
public byte getElementByteValue(String elementName)
-
getElementDateValue
public Date getElementDateValue(String elementName)
Get the value for the input element- Parameters:
elementName- The name of the element- Returns:
- Date The Java Date for the element value if the value conforms to the pattern yyyy-mm-dd
-
getElementValue
public BaseType getElementValue(String property, String className)
Get the value for the input element- Parameters:
className- - the name of the class corresponding to this element Could be an inner class.
-
getElementValue
public Object getElementValue(String property, String className, int index)
Get the value for the input element- Parameters:
property- - the name of the elementclassName- - the name of the class corresponding to this element Could be an inner classindex- - an index for collection
-
updateElementValue
public void updateElementValue(String value)
Update the text node for this element
-
updateElementValue
public void updateElementValue(boolean value)
-
updateElementValue
public void updateElementValue(int value)
-
updateElementValue
public void updateElementValue(float value)
-
updateElementValue
public void updateElementValue(double value)
-
updateElementValue
public void updateElementValue(long value)
-
updateElementValue
public void updateElementValue(short value)
-
updateElementValue
public void updateElementValue(byte value)
-
updateElementValue
public void updateElementValue(Date value)
-
removeElement
public boolean removeElement(String elementName)
Remove the element with the input elementName from the current node
-
sizeOfElement
public int sizeOfElement(String name)
Return the number of children with this name
-
getElementName
public String getElementName()
Return the node name for this element
-
-