VOTableUtil
Class Param

java.lang.Object
  |
  +--VOTableUtil.Param
All Implemented Interfaces:
java.io.Serializable, com.tbf.xml.Validateable, com.tbf.xml.XmlObject

public class Param
extends java.lang.Object
implements com.tbf.xml.XmlObject, com.tbf.xml.Validateable, java.io.Serializable

Param class.

See Also:
Serialized Form

Inner Class Summary
static class Param.Datatype
          Enumeration types for the Datatype property.
 
Field Summary
protected  java.lang.String _Arraysize
           
protected  java.lang.String _Datatype
           
protected static com.tbf.xml.XmlValidator _Datatype_validator_
           
protected  java.lang.String _Description
           
protected  java.util.Vector _doc_declared_namespaces_
          Storage for namespaces declared in the input document.
protected  java.lang.String _Id
          Declarations for the XML related fields.
protected  java.util.Vector _Link
           
protected static com.tbf.xml.XmlValidator _Link_validator_
           
protected  java.lang.String _Name
           
protected static com.tbf.xml.XmlNamespaceManager _nsm_
          The default XmlNamespaceManager for this class.
protected  java.lang.String _Precision
           
protected  java.lang.String _Ref
           
protected  java.lang.String _Ucd
           
protected  java.util.Vector _unexpected_xml_errors_
          Storage for UNEXPECTED_XML errors.
protected  java.lang.String _Unit
           
protected static boolean _validators_created
          This flag is used to used to check whether the validators have been created.
protected  java.lang.String _Value
           
protected  Values _Values
           
protected static com.tbf.xml.XmlValidator _Values_validator_
           
protected  java.lang.String _Width
           
static java.lang.String $ARRAYSIZE
          Constant for "arraysize" node name.
static java.lang.String $DATATYPE
          Constant for "datatype" node name.
static java.lang.String $DESCRIPTION
          Constant for "DESCRIPTION" node name.
static java.lang.String $ID
          Constant for "ID" node name.
static java.lang.String $LINK
          Constant for "LINK" node name.
static java.lang.String $NAME
          Constant for "name" node name.
static java.lang.String $PARAM
          Constant for "PARAM" node name.
static java.lang.String $PRECISION
          Constant for "precision" node name.
static java.lang.String $REF
          Constant for "ref" node name.
static java.lang.String $UCD
          Constant for "ucd" node name.
static java.lang.String $UNIT
          Constant for "unit" node name.
static java.lang.String $VALUE
          Constant for "value" node name.
static java.lang.String $VALUES
          Constant for "VALUES" node name.
static java.lang.String $WIDTH
          Constant for "width" node name.
 
Constructor Summary
Param()
          Default no args constructor.
Param(com.tbf.xml.XmlElement xml)
          Creates and populates an instance from the provided parse tree.
Param(com.tbf.xml.XmlElement xml, com.tbf.xml.XmlObject parent)
          Creates and populates an instance from the provided parse tree.
 
Method Summary
 void addLink(Link obj)
           
protected static void createValidators()
          Create the validators for this class.
 void deleteArraysize()
          Discards Arraysize's value.
 void deleteDatatype()
          Discards Datatype's value.
 void deleteDescription()
          Discards Description's value.
 void deleteId()
          Discards Id's value.
 void deleteName()
          Discards Name's value.
 void deletePrecision()
          Discards Precision's value.
 void deleteRef()
          Discards Ref's value.
 void deleteUcd()
          Discards Ucd's value.
 void deleteUnit()
          Discards Unit's value.
 void deleteValue()
          Discards Value's value.
 void deleteValues()
          Discards Values's value.
 void deleteWidth()
          Discards Width's value.
 void fromXml(com.tbf.xml.XmlElement xml)
          Deprecated. will be removed in a future release. Use unmarshal(XmlElement).
 java.util.Vector get$DocumentNamespaces()
          Get the Vector holding the namespaces declared in the element that this instance was unmarshalled from.
 com.tbf.xml.XmlNamespaceManager get$NamespaceManager()
          Get the XmlNamespaceManager for this class.
 com.tbf.xml.XmlObject get$Parent()
          Get this object's parent object.
 java.lang.String getArraysize()
          Get the Arraysize property.
static java.lang.String getClassXmlTagName()
          Gets the XML tag name for this class.
 java.lang.String getDatatype()
          Get the Datatype property.
 java.lang.String getDescription()
          Get the Description property.
 java.lang.String getId()
          Get the Id property.
 java.util.Vector getLink()
          Get the Link property.
 Link getLinkAt(int index)
           
 int getLinkCount()
          Get the count of elements in the Link property.
 java.lang.String getName()
          Get the Name property.
 java.lang.String getPrecision()
          Get the Precision property.
 java.lang.String getRef()
          Get the Ref property.
 java.lang.String getUcd()
          Get the Ucd property.
 java.lang.String getUnit()
          Get the Unit property.
 java.util.Vector getValidationErrors()
          Checks each field on the object for validity and returns a Vector holding the validation errors.
 java.util.Vector getValidationErrors(boolean return_on_error)
          Checks each field on the object for validity and returns a Vector holding the validation errors.
 java.util.Vector getValidationErrors(boolean return_on_error, boolean traverse)
          Checks each field on the object for validity and returns a Vector holding the validation errors.
 java.lang.String getValue()
          Get the Value property.
 Values getValues()
          Get the Values property.
 java.lang.String getWidth()
          Get the Width property.
 java.lang.String getXmlTagName()
          Gets the XML tag name for this object.
 boolean hasArraysize()
          Checks for whether Arraysize is set or not.
 boolean hasDatatype()
          Checks for whether Datatype is set or not.
 boolean hasDescription()
          Checks for whether Description is set or not.
 boolean hasId()
          Checks for whether Id is set or not.
 boolean hasName()
          Checks for whether Name is set or not.
 boolean hasPrecision()
          Checks for whether Precision is set or not.
 boolean hasRef()
          Checks for whether Ref is set or not.
 boolean hasUcd()
          Checks for whether Ucd is set or not.
 boolean hasUnit()
          Checks for whether Unit is set or not.
 boolean hasValue()
          Checks for whether Value is set or not.
 boolean hasValues()
          Checks for whether Values is set or not.
 boolean hasWidth()
          Checks for whether Width is set or not.
 boolean isValid()
          Checks this object to see if it will produce valid XML.
 void marshal(java.io.OutputStream stream)
          Writes this instance to a stream.
 void marshal(com.tbf.xml.XmlOutputStream out)
          Writes this instance to an XmlOutputStream.
protected  com.tbf.xml.XmlAttributeList marshalAttributes(com.tbf.xml.XmlAttributeList attrs)
          Get the XmlAttributeList for marshalling.
static boolean matches(com.tbf.xml.XmlElement xml, com.tbf.xml.XmlObject parent)
          Checks the XML to see whether it matches the XML contents of this class.
 void removeLink(Link obj)
           
 void removeLinkAt(int index)
           
 void set$Parent(com.tbf.xml.XmlObject parent)
          Set this object's parent object.
 void setArraysize(java.lang.String newValue)
          Set the Arraysize property.
 void setDatatype(com.tbf.util.EnumType new_value)
           
 void setDatatype(java.lang.String enumValue)
          Set the Datatype property.
 void setDescription(java.lang.String newValue)
          Set the Description property.
 void setId(java.lang.String newValue)
          Set the Id property.
 void setLink(java.util.Vector newList)
          Set the Link property.
 void setLinkAt(Link obj, int index)
           
 void setName(java.lang.String newValue)
          Set the Name property.
 void setPrecision(java.lang.String newValue)
          Set the Precision property.
 void setRef(java.lang.String newValue)
          Set the Ref property.
 void setUcd(java.lang.String newValue)
          Set the Ucd property.
 void setUnit(java.lang.String newValue)
          Set the Unit property.
 void setValue(java.lang.String newValue)
          Set the Value property.
 void setValues(Values obj)
          Set the Values property.
 void setWidth(java.lang.String newValue)
          Set the Width property.
 void toXml(java.io.OutputStream stream)
          Deprecated. This method will be removed in a future release. Use marshal(XmlOutputStream) or marshal(OutputStream).
 void toXml(java.io.OutputStream stream, boolean embed_files)
          Deprecated. This method will be removed in a future release. Use marshal(XmlOutputStream) or marshal(OutputStream).
 void toXml(java.io.OutputStream stream, java.lang.String indent, boolean embed_files)
          Deprecated. This method will be removed in a future release. Use marshal(XmlOutputStream) or marshal(OutputStream).
static Param unmarshal(java.io.InputStream in)
          This method unmarshals an XML document instance into an instance of this class.
 void unmarshal(com.tbf.xml.XmlElement xml)
          Populates this object with the values from the parsed XML.
protected  void unmarshalAttributes(com.tbf.xml.XmlElement xml)
          Unmarshal any attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

$NAME

public static final java.lang.String $NAME
Constant for "name" node name.

$WIDTH

public static final java.lang.String $WIDTH
Constant for "width" node name.

$REF

public static final java.lang.String $REF
Constant for "ref" node name.

$DATATYPE

public static final java.lang.String $DATATYPE
Constant for "datatype" node name.

$DESCRIPTION

public static final java.lang.String $DESCRIPTION
Constant for "DESCRIPTION" node name.

$PRECISION

public static final java.lang.String $PRECISION
Constant for "precision" node name.

$ARRAYSIZE

public static final java.lang.String $ARRAYSIZE
Constant for "arraysize" node name.

$LINK

public static final java.lang.String $LINK
Constant for "LINK" node name.

$UCD

public static final java.lang.String $UCD
Constant for "ucd" node name.

$ID

public static final java.lang.String $ID
Constant for "ID" node name.

$VALUES

public static final java.lang.String $VALUES
Constant for "VALUES" node name.

$VALUE

public static final java.lang.String $VALUE
Constant for "value" node name.

$UNIT

public static final java.lang.String $UNIT
Constant for "unit" node name.

$PARAM

public static final java.lang.String $PARAM
Constant for "PARAM" node name.

_Id

protected java.lang.String _Id
Declarations for the XML related fields.

_Unit

protected java.lang.String _Unit

_Datatype

protected java.lang.String _Datatype

_Precision

protected java.lang.String _Precision

_Width

protected java.lang.String _Width

_Ref

protected java.lang.String _Ref

_Name

protected java.lang.String _Name

_Ucd

protected java.lang.String _Ucd

_Value

protected java.lang.String _Value

_Arraysize

protected java.lang.String _Arraysize

_Description

protected java.lang.String _Description

_Values

protected Values _Values

_Link

protected java.util.Vector _Link

_unexpected_xml_errors_

protected transient java.util.Vector _unexpected_xml_errors_
Storage for UNEXPECTED_XML errors.

_validators_created

protected static transient boolean _validators_created
This flag is used to used to check whether the validators have been created.

_Datatype_validator_

protected static transient com.tbf.xml.XmlValidator _Datatype_validator_

_Values_validator_

protected static transient com.tbf.xml.XmlValidator _Values_validator_

_Link_validator_

protected static transient com.tbf.xml.XmlValidator _Link_validator_

_nsm_

protected static com.tbf.xml.XmlNamespaceManager _nsm_
The default XmlNamespaceManager for this class.
Since:
2.5

_doc_declared_namespaces_

protected java.util.Vector _doc_declared_namespaces_
Storage for namespaces declared in the input document.
Since:
2.5
Constructor Detail

Param

public Param()
Default no args constructor.

Param

public Param(com.tbf.xml.XmlElement xml)
Creates and populates an instance from the provided parse tree.
Parameters:
xml - the parse tree

Param

public Param(com.tbf.xml.XmlElement xml,
             com.tbf.xml.XmlObject parent)
Creates and populates an instance from the provided parse tree.
Parameters:
xml - the parse tree
parent - the containibg XmlObject
Method Detail

getId

public java.lang.String getId()
Get the Id property.

setId

public void setId(java.lang.String newValue)
Set the Id property.

hasId

public boolean hasId()
Checks for whether Id is set or not.
Returns:
true if Id is set, false if not

deleteId

public void deleteId()
Discards Id's value.

getUnit

public java.lang.String getUnit()
Get the Unit property.

setUnit

public void setUnit(java.lang.String newValue)
Set the Unit property.

hasUnit

public boolean hasUnit()
Checks for whether Unit is set or not.
Returns:
true if Unit is set, false if not

deleteUnit

public void deleteUnit()
Discards Unit's value.

getDatatype

public java.lang.String getDatatype()
Get the Datatype property.

setDatatype

public void setDatatype(java.lang.String enumValue)
Set the Datatype property.

setDatatype

public void setDatatype(com.tbf.util.EnumType new_value)

hasDatatype

public boolean hasDatatype()
Checks for whether Datatype is set or not.
Returns:
true if Datatype is set, false if not

deleteDatatype

public void deleteDatatype()
Discards Datatype's value.

getPrecision

public java.lang.String getPrecision()
Get the Precision property.

setPrecision

public void setPrecision(java.lang.String newValue)
Set the Precision property.

hasPrecision

public boolean hasPrecision()
Checks for whether Precision is set or not.
Returns:
true if Precision is set, false if not

deletePrecision

public void deletePrecision()
Discards Precision's value.

getWidth

public java.lang.String getWidth()
Get the Width property.

setWidth

public void setWidth(java.lang.String newValue)
Set the Width property.

hasWidth

public boolean hasWidth()
Checks for whether Width is set or not.
Returns:
true if Width is set, false if not

deleteWidth

public void deleteWidth()
Discards Width's value.

getRef

public java.lang.String getRef()
Get the Ref property.

setRef

public void setRef(java.lang.String newValue)
Set the Ref property.

hasRef

public boolean hasRef()
Checks for whether Ref is set or not.
Returns:
true if Ref is set, false if not

deleteRef

public void deleteRef()
Discards Ref's value.

getName

public java.lang.String getName()
Get the Name property.

setName

public void setName(java.lang.String newValue)
Set the Name property.

hasName

public boolean hasName()
Checks for whether Name is set or not.
Returns:
true if Name is set, false if not

deleteName

public void deleteName()
Discards Name's value.

getUcd

public java.lang.String getUcd()
Get the Ucd property.

setUcd

public void setUcd(java.lang.String newValue)
Set the Ucd property.

hasUcd

public boolean hasUcd()
Checks for whether Ucd is set or not.
Returns:
true if Ucd is set, false if not

deleteUcd

public void deleteUcd()
Discards Ucd's value.

getValue

public java.lang.String getValue()
Get the Value property.

setValue

public void setValue(java.lang.String newValue)
Set the Value property.

hasValue

public boolean hasValue()
Checks for whether Value is set or not.
Returns:
true if Value is set, false if not

deleteValue

public void deleteValue()
Discards Value's value.

getArraysize

public java.lang.String getArraysize()
Get the Arraysize property.

setArraysize

public void setArraysize(java.lang.String newValue)
Set the Arraysize property.

hasArraysize

public boolean hasArraysize()
Checks for whether Arraysize is set or not.
Returns:
true if Arraysize is set, false if not

deleteArraysize

public void deleteArraysize()
Discards Arraysize's value.

getDescription

public java.lang.String getDescription()
Get the Description property.

setDescription

public void setDescription(java.lang.String newValue)
Set the Description property.

hasDescription

public boolean hasDescription()
Checks for whether Description is set or not.
Returns:
true if Description is set, false if not

deleteDescription

public void deleteDescription()
Discards Description's value.

getValues

public Values getValues()
Get the Values property.

setValues

public void setValues(Values obj)
Set the Values property.

hasValues

public boolean hasValues()
Checks for whether Values is set or not.
Returns:
true if Values is set, false if not

deleteValues

public void deleteValues()
Discards Values's value.

getLink

public java.util.Vector getLink()
Get the Link property.

getLinkAt

public Link getLinkAt(int index)
               throws java.lang.IndexOutOfBoundsException

getLinkCount

public int getLinkCount()
Get the count of elements in the Link property.

setLink

public void setLink(java.util.Vector newList)
Set the Link property.

addLink

public void addLink(Link obj)

setLinkAt

public void setLinkAt(Link obj,
                      int index)
               throws java.lang.IndexOutOfBoundsException

removeLink

public void removeLink(Link obj)

removeLinkAt

public void removeLinkAt(int index)
                  throws java.lang.IndexOutOfBoundsException

getXmlTagName

public java.lang.String getXmlTagName()
Gets the XML tag name for this object.
Specified by:
getXmlTagName in interface com.tbf.xml.XmlObject

getClassXmlTagName

public static java.lang.String getClassXmlTagName()
Gets the XML tag name for this class.

createValidators

protected static void createValidators()
Create the validators for this class.

isValid

public boolean isValid()
Checks this object to see if it will produce valid XML.
Specified by:
isValid in interface com.tbf.xml.XmlObject

getValidationErrors

public java.util.Vector getValidationErrors()
Checks each field on the object for validity and returns a Vector holding the validation errors.
Specified by:
getValidationErrors in interface com.tbf.xml.Validateable

getValidationErrors

public java.util.Vector getValidationErrors(boolean return_on_error)
Checks each field on the object for validity and returns a Vector holding the validation errors.
Specified by:
getValidationErrors in interface com.tbf.xml.Validateable
Returns:
a Vector containing the validation errors

getValidationErrors

public java.util.Vector getValidationErrors(boolean return_on_error,
                                            boolean traverse)
Checks each field on the object for validity and returns a Vector holding the validation errors.
Specified by:
getValidationErrors in interface com.tbf.xml.Validateable
Returns:
a Vector containing the validation errors

matches

public static boolean matches(com.tbf.xml.XmlElement xml,
                              com.tbf.xml.XmlObject parent)
Checks the XML to see whether it matches the XML contents of this class.

unmarshal

public static Param unmarshal(java.io.InputStream in)
                       throws java.lang.Exception
This method unmarshals an XML document instance into an instance of this class.

fromXml

public void fromXml(com.tbf.xml.XmlElement xml)
Deprecated. will be removed in a future release. Use unmarshal(XmlElement).

Populates this object with the values from the parsed XML.
Specified by:
fromXml in interface com.tbf.xml.XmlObject

unmarshal

public void unmarshal(com.tbf.xml.XmlElement xml)
Populates this object with the values from the parsed XML.
Specified by:
unmarshal in interface com.tbf.xml.XmlObject
Since:
2.5

unmarshalAttributes

protected void unmarshalAttributes(com.tbf.xml.XmlElement xml)
Unmarshal any attributes.
Parameters:
xml - the XmlElement holding the parsed XML
Since:
2.5

toXml

public void toXml(java.io.OutputStream stream)
Deprecated. This method will be removed in a future release. Use marshal(XmlOutputStream) or marshal(OutputStream).

Writes this instance to a stream.
Specified by:
toXml in interface com.tbf.xml.XmlObject
Parameters:
stream - the OutputStream to write the XML object to

toXml

public void toXml(java.io.OutputStream stream,
                  boolean embed_files)
Deprecated. This method will be removed in a future release. Use marshal(XmlOutputStream) or marshal(OutputStream).

Writes this instance to a stream.
Specified by:
toXml in interface com.tbf.xml.XmlObject
Parameters:
stream - the OutputStream to write the XML object to
embed_files - set to true to embed files in the XML

toXml

public void toXml(java.io.OutputStream stream,
                  java.lang.String indent,
                  boolean embed_files)
Deprecated. This method will be removed in a future release. Use marshal(XmlOutputStream) or marshal(OutputStream).

Writes this instance to a stream.
Specified by:
toXml in interface com.tbf.xml.XmlObject
Parameters:
stream - the OutputStream to write the XML object to
embed_files - set to true to embed files in the XML

marshal

public void marshal(java.io.OutputStream stream)
Writes this instance to a stream. If the OutputStream is not an instance of XmlOutputStream then a FormattedOutputStream will be created which wraps the OutputStream.
Specified by:
marshal in interface com.tbf.xml.XmlObject
Parameters:
stream - the OutputStream to write the XML object to
Since:
2.5
See Also:
marshal(XmlOutputStream)

marshal

public void marshal(com.tbf.xml.XmlOutputStream out)
Writes this instance to an XmlOutputStream.
Specified by:
marshal in interface com.tbf.xml.XmlObject
Parameters:
out - the XmlOutputStream to write the XML object to
Since:
2.5
See Also:
marshal(OutputStream)

marshalAttributes

protected com.tbf.xml.XmlAttributeList marshalAttributes(com.tbf.xml.XmlAttributeList attrs)
Get the XmlAttributeList for marshalling.
Parameters:
attrs - the currently populated XmlAttributeList.
Returns:
a populated XmlAttributeList
Since:
2.5

get$Parent

public com.tbf.xml.XmlObject get$Parent()
Get this object's parent object.
Specified by:
get$Parent in interface com.tbf.xml.XmlObject

set$Parent

public void set$Parent(com.tbf.xml.XmlObject parent)
Set this object's parent object.
Specified by:
set$Parent in interface com.tbf.xml.XmlObject

get$NamespaceManager

public com.tbf.xml.XmlNamespaceManager get$NamespaceManager()
Get the XmlNamespaceManager for this class. This will be null if no namespaces on this class or if namespace support is disabled during code generation.
Specified by:
get$NamespaceManager in interface com.tbf.xml.XmlObject
Since:
2.5

get$DocumentNamespaces

public java.util.Vector get$DocumentNamespaces()
Get the Vector holding the namespaces declared in the element that this instance was unmarshalled from.
Since:
2.5