VOTableUtil
Class Stream

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

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

Stream class.

See Also:
Serialized Form

Inner Class Summary
static class Stream.Actuate
          Enumeration types for the Actuate property.
static class Stream.Encoding
          Enumeration types for the Encoding property.
static class Stream.Type
          Enumeration types for the Type property.
 
Field Summary
protected  java.lang.String _Actuate
           
protected static com.tbf.xml.XmlValidator _Actuate_validator_
           
protected  boolean _defaulted_Actuate_
           
protected  boolean _defaulted_Encoding_
           
protected  boolean _defaulted_Type_
           
protected  java.util.Vector _doc_declared_namespaces_
          Storage for namespaces declared in the input document.
protected  java.lang.String _Encoding
           
protected static com.tbf.xml.XmlValidator _Encoding_validator_
           
protected  java.lang.String _Expires
           
protected  java.lang.String _Href
           
protected static com.tbf.xml.XmlNamespaceManager _nsm_
          The default XmlNamespaceManager for this class.
protected  java.lang.String _PCDATA
           
protected static com.tbf.xml.XmlStringValidator _PCDATA_validator_
           
protected  java.lang.String _Rights
           
protected  java.lang.String _Type
          Declarations for the XML related fields.
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 $ACTUATE
          Constant for "actuate" node name.
static java.lang.String $ENCODING
          Constant for "encoding" node name.
static java.lang.String $EXPIRES
          Constant for "expires" node name.
static java.lang.String $HREF
          Constant for "href" node name.
static java.lang.String $RIGHTS
          Constant for "rights" node name.
static java.lang.String $STREAM
          Constant for "STREAM" node name.
static java.lang.String $TYPE
          Constant for "type" node name.
 
Constructor Summary
Stream()
          Default no args constructor.
Stream(com.tbf.xml.XmlElement xml)
          Creates and populates an instance from the provided parse tree.
Stream(com.tbf.xml.XmlElement xml, com.tbf.xml.XmlObject parent)
          Creates and populates an instance from the provided parse tree.
 
Method Summary
protected static void createValidators()
          Create the validators for this class.
 boolean defaultedActuate()
          Checks whether the Actuate property value is the default value.
 boolean defaultedEncoding()
          Checks whether the Encoding property value is the default value.
 boolean defaultedType()
          Checks whether the Type property value is the default value.
 void deleteActuate()
          Discards Actuate's value.
 void deleteEncoding()
          Discards Encoding's value.
 void deleteExpires()
          Discards Expires's value.
 void deleteHref()
          Discards Href's value.
 void deletePCDATA()
          Discards PCDATA's value.
 void deleteRights()
          Discards Rights'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.
 java.lang.String getActuate()
          Get the Actuate property.
static java.lang.String getClassXmlTagName()
          Gets the XML tag name for this class.
 java.lang.String getEncoding()
          Get the Encoding property.
 java.lang.String getExpires()
          Get the Expires property.
 java.lang.String getHref()
          Get the Href property.
 java.lang.String getPCDATA()
          Get the PCDATA property.
 java.lang.String getRights()
          Get the Rights 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 hasActuate()
          Checks for whether Actuate is set or not.
 boolean hasEncoding()
          Checks for whether Encoding is set or not.
 boolean hasExpires()
          Checks for whether Expires is set or not.
 boolean hasHref()
          Checks for whether Href is set or not.
 boolean hasPCDATA()
          Checks for whether PCDATA is set or not.
 boolean hasRights()
          Checks for whether Rights 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 set$Parent(com.tbf.xml.XmlObject parent)
          Set this object's parent object.
 void setActuate(com.tbf.util.EnumType new_value)
           
 void setActuate(java.lang.String enumValue)
          Set the Actuate property.
 void setEncoding(com.tbf.util.EnumType new_value)
           
 void setEncoding(java.lang.String enumValue)
          Set the Encoding property.
 void setExpires(java.lang.String newValue)
          Set the Expires property.
 void setHref(java.lang.String newValue)
          Set the Href property.
 void setPCDATA(java.lang.String newValue)
          Set the PCDATA property.
 void setRights(java.lang.String newValue)
          Set the Rights property.
 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 Stream 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

$ACTUATE

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

$EXPIRES

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

$HREF

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

$TYPE

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

$ENCODING

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

$RIGHTS

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

$STREAM

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

_Type

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

_defaulted_Type_

protected boolean _defaulted_Type_

_Href

protected java.lang.String _Href

_Actuate

protected java.lang.String _Actuate

_defaulted_Actuate_

protected boolean _defaulted_Actuate_

_Encoding

protected java.lang.String _Encoding

_defaulted_Encoding_

protected boolean _defaulted_Encoding_

_Expires

protected java.lang.String _Expires

_Rights

protected java.lang.String _Rights

_PCDATA

protected java.lang.String _PCDATA

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

_Actuate_validator_

protected static transient com.tbf.xml.XmlValidator _Actuate_validator_

_Encoding_validator_

protected static transient com.tbf.xml.XmlValidator _Encoding_validator_

_PCDATA_validator_

protected static transient com.tbf.xml.XmlStringValidator _PCDATA_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

Stream

public Stream()
Default no args constructor.

Stream

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

Stream

public Stream(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

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

getHref

public java.lang.String getHref()
Get the Href property.

setHref

public void setHref(java.lang.String newValue)
Set the Href property.

hasHref

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

deleteHref

public void deleteHref()
Discards Href's value.

getActuate

public java.lang.String getActuate()
Get the Actuate property.

setActuate

public void setActuate(java.lang.String enumValue)
Set the Actuate property.

setActuate

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

hasActuate

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

deleteActuate

public void deleteActuate()
Discards Actuate's value.

defaultedActuate

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

getEncoding

public java.lang.String getEncoding()
Get the Encoding property.

setEncoding

public void setEncoding(java.lang.String enumValue)
Set the Encoding property.

setEncoding

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

hasEncoding

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

deleteEncoding

public void deleteEncoding()
Discards Encoding's value.

defaultedEncoding

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

getExpires

public java.lang.String getExpires()
Get the Expires property.

setExpires

public void setExpires(java.lang.String newValue)
Set the Expires property.

hasExpires

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

deleteExpires

public void deleteExpires()
Discards Expires's value.

getRights

public java.lang.String getRights()
Get the Rights property.

setRights

public void setRights(java.lang.String newValue)
Set the Rights property.

hasRights

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

deleteRights

public void deleteRights()
Discards Rights's value.

getPCDATA

public java.lang.String getPCDATA()
Get the PCDATA property.

setPCDATA

public void setPCDATA(java.lang.String newValue)
Set the PCDATA property.

hasPCDATA

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

deletePCDATA

public void deletePCDATA()
Discards PCDATA's value.

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 Stream 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