VOTableUtil
Class Values

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

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

Values class.

See Also:
Serialized Form

Inner Class Summary
static class Values.Invalid
          Enumeration types for the Invalid property.
static class Values.Type
          Enumeration types for the Type property.
 
Field Summary
protected  boolean _defaulted_Invalid_
           
protected  boolean _defaulted_Type_
           
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.lang.String _Invalid
           
protected static com.tbf.xml.XmlValidator _Invalid_validator_
           
protected  Max _Max
           
protected static com.tbf.xml.XmlValidator _Max_validator_
           
protected  Min _Min
           
protected static com.tbf.xml.XmlValidator _Min_validator_
           
protected static com.tbf.xml.XmlNamespaceManager _nsm_
          The default XmlNamespaceManager for this class.
protected  java.lang.String _Null
           
protected  java.util.Vector _Option
           
protected static com.tbf.xml.XmlValidator _Option_validator_
           
protected  java.lang.String _Type
           
protected static com.tbf.xml.XmlValidator _Type_validator_
           
protected  java.util.Vector _unexpected_xml_errors_
          Storage for UNEXPECTED_XML errors.
protected static boolean _validators_created
          This flag is used to used to check whether the validators have been created.
static java.lang.String $ID
          Constant for "ID" node name.
static java.lang.String $INVALID
          Constant for "invalid" node name.
static java.lang.String $MAX
          Constant for "MAX" node name.
static java.lang.String $MIN
          Constant for "MIN" node name.
static java.lang.String $NULL
          Constant for "null" node name.
static java.lang.String $OPTION
          Constant for "OPTION" node name.
static java.lang.String $TYPE
          Constant for "type" node name.
static java.lang.String $VALUES
          Constant for "VALUES" node name.
 
Constructor Summary
Values()
          Default no args constructor.
Values(com.tbf.xml.XmlElement xml)
          Creates and populates an instance from the provided parse tree.
Values(com.tbf.xml.XmlElement xml, com.tbf.xml.XmlObject parent)
          Creates and populates an instance from the provided parse tree.
 
Method Summary
 void addOption(Option obj)
           
protected static void createValidators()
          Create the validators for this class.
 boolean defaultedInvalid()
          Checks whether the Invalid property value is the default value.
 boolean defaultedType()
          Checks whether the Type property value is the default value.
 void deleteId()
          Discards Id's value.
 void deleteInvalid()
          Discards Invalid's value.
 void deleteMax()
          Discards Max's value.
 void deleteMin()
          Discards Min's value.
 void deleteNull()
          Discards Null's value.
 void deleteType()
          Discards Type'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.
static java.lang.String getClassXmlTagName()
          Gets the XML tag name for this class.
 java.lang.String getId()
          Get the Id property.
 java.lang.String getInvalid()
          Get the Invalid property.
 Max getMax()
          Get the Max property.
 Min getMin()
          Get the Min property.
 java.lang.String getNull()
          Get the Null property.
 java.util.Vector getOption()
          Get the Option property.
 Option getOptionAt(int index)
           
 int getOptionCount()
          Get the count of elements in the Option property.
 java.lang.String getType()
          Get the Type 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 getXmlTagName()
          Gets the XML tag name for this object.
 boolean hasId()
          Checks for whether Id is set or not.
 boolean hasInvalid()
          Checks for whether Invalid is set or not.
 boolean hasMax()
          Checks for whether Max is set or not.
 boolean hasMin()
          Checks for whether Min is set or not.
 boolean hasNull()
          Checks for whether Null is set or not.
 boolean hasType()
          Checks for whether Type 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 removeOption(Option obj)
           
 void removeOptionAt(int index)
           
 void set$Parent(com.tbf.xml.XmlObject parent)
          Set this object's parent object.
 void setId(java.lang.String newValue)
          Set the Id property.
 void setInvalid(com.tbf.util.EnumType new_value)
           
 void setInvalid(java.lang.String enumValue)
          Set the Invalid property.
 void setMax(Max obj)
          Set the Max property.
 void setMin(Min obj)
          Set the Min property.
 void setNull(java.lang.String newValue)
          Set the Null property.
 void setOption(java.util.Vector newList)
          Set the Option property.
 void setOptionAt(Option obj, int index)
           
 void setType(com.tbf.util.EnumType new_value)
           
 void setType(java.lang.String enumValue)
          Set the Type 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 Values 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

$ID

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

$MIN

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

$VALUES

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

$NULL

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

$OPTION

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

$TYPE

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

$INVALID

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

$MAX

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

_Id

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

_Type

protected java.lang.String _Type

_defaulted_Type_

protected boolean _defaulted_Type_

_Null

protected java.lang.String _Null

_Invalid

protected java.lang.String _Invalid

_defaulted_Invalid_

protected boolean _defaulted_Invalid_

_Min

protected Min _Min

_Max

protected Max _Max

_Option

protected java.util.Vector _Option

_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.

_Type_validator_

protected static transient com.tbf.xml.XmlValidator _Type_validator_

_Invalid_validator_

protected static transient com.tbf.xml.XmlValidator _Invalid_validator_

_Min_validator_

protected static transient com.tbf.xml.XmlValidator _Min_validator_

_Max_validator_

protected static transient com.tbf.xml.XmlValidator _Max_validator_

_Option_validator_

protected static transient com.tbf.xml.XmlValidator _Option_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

Values

public Values()
Default no args constructor.

Values

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

Values

public Values(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.

getType

public java.lang.String getType()
Get the Type property.

setType

public void setType(java.lang.String enumValue)
Set the Type property.

setType

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

hasType

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

deleteType

public void deleteType()
Discards Type's value.

defaultedType

public boolean defaultedType()
Checks whether the Type property value is the default value.
Returns:
true if Type is defaulted, false if not

getNull

public java.lang.String getNull()
Get the Null property.

setNull

public void setNull(java.lang.String newValue)
Set the Null property.

hasNull

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

deleteNull

public void deleteNull()
Discards Null's value.

getInvalid

public java.lang.String getInvalid()
Get the Invalid property.

setInvalid

public void setInvalid(java.lang.String enumValue)
Set the Invalid property.

setInvalid

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

hasInvalid

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

deleteInvalid

public void deleteInvalid()
Discards Invalid's value.

defaultedInvalid

public boolean defaultedInvalid()
Checks whether the Invalid property value is the default value.
Returns:
true if Invalid is defaulted, false if not

getMin

public Min getMin()
Get the Min property.

setMin

public void setMin(Min obj)
Set the Min property.

hasMin

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

deleteMin

public void deleteMin()
Discards Min's value.

getMax

public Max getMax()
Get the Max property.

setMax

public void setMax(Max obj)
Set the Max property.

hasMax

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

deleteMax

public void deleteMax()
Discards Max's value.

getOption

public java.util.Vector getOption()
Get the Option property.

getOptionAt

public Option getOptionAt(int index)
                   throws java.lang.IndexOutOfBoundsException

getOptionCount

public int getOptionCount()
Get the count of elements in the Option property.

setOption

public void setOption(java.util.Vector newList)
Set the Option property.

addOption

public void addOption(Option obj)

setOptionAt

public void setOptionAt(Option obj,
                        int index)
                 throws java.lang.IndexOutOfBoundsException

removeOption

public void removeOption(Option obj)

removeOptionAt

public void removeOptionAt(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 Values 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