VOTableUtil
Class Link

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

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

Link class.

See Also:
Serialized Form

Inner Class Summary
static class Link.ContentRole
          Enumeration types for the ContentRole property.
 
Field Summary
protected  java.lang.String _Action
           
protected  java.lang.String _ContentRole
           
protected static com.tbf.xml.XmlValidator _ContentRole_validator_
           
protected  java.lang.String _ContentType
           
protected  java.util.Vector _doc_declared_namespaces_
          Storage for namespaces declared in the input document.
protected  java.lang.String _Gref
           
protected  java.lang.String _Href
           
protected  java.lang.String _Id
          Declarations for the XML related fields.
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 _Title
           
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.
protected  java.lang.String _Value
           
static java.lang.String $ACTION
          Constant for "action" node name.
static java.lang.String $CONTENT_ROLE
          Constant for "content-role" node name.
static java.lang.String $CONTENT_TYPE
          Constant for "content-type" node name.
static java.lang.String $GREF
          Constant for "gref" node name.
static java.lang.String $HREF
          Constant for "href" 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 $TITLE
          Constant for "title" node name.
static java.lang.String $VALUE
          Constant for "value" node name.
 
Constructor Summary
Link()
          Default no args constructor.
Link(com.tbf.xml.XmlElement xml)
          Creates and populates an instance from the provided parse tree.
Link(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.
 void deleteAction()
          Discards Action's value.
 void deleteContentRole()
          Discards ContentRole's value.
 void deleteContentType()
          Discards ContentType's value.
 void deleteGref()
          Discards Gref's value.
 void deleteHref()
          Discards Href's value.
 void deleteId()
          Discards Id's value.
 void deletePCDATA()
          Discards PCDATA's value.
 void deleteTitle()
          Discards Title's value.
 void deleteValue()
          Discards Value'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 getAction()
          Get the Action property.
static java.lang.String getClassXmlTagName()
          Gets the XML tag name for this class.
 java.lang.String getContentRole()
          Get the ContentRole property.
 java.lang.String getContentType()
          Get the ContentType property.
 java.lang.String getGref()
          Get the Gref property.
 java.lang.String getHref()
          Get the Href property.
 java.lang.String getId()
          Get the Id property.
 java.lang.String getPCDATA()
          Get the PCDATA property.
 java.lang.String getTitle()
          Get the Title 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.
 java.lang.String getXmlTagName()
          Gets the XML tag name for this object.
 boolean hasAction()
          Checks for whether Action is set or not.
 boolean hasContentRole()
          Checks for whether ContentRole is set or not.
 boolean hasContentType()
          Checks for whether ContentType is set or not.
 boolean hasGref()
          Checks for whether Gref is set or not.
 boolean hasHref()
          Checks for whether Href is set or not.
 boolean hasId()
          Checks for whether Id is set or not.
 boolean hasPCDATA()
          Checks for whether PCDATA is set or not.
 boolean hasTitle()
          Checks for whether Title is set or not.
 boolean hasValue()
          Checks for whether Value 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 setAction(java.lang.String newValue)
          Set the Action property.
 void setContentRole(com.tbf.util.EnumType new_value)
           
 void setContentRole(java.lang.String enumValue)
          Set the ContentRole property.
 void setContentType(java.lang.String newValue)
          Set the ContentType property.
 void setGref(java.lang.String newValue)
          Set the Gref property.
 void setHref(java.lang.String newValue)
          Set the Href property.
 void setId(java.lang.String newValue)
          Set the Id property.
 void setPCDATA(java.lang.String newValue)
          Set the PCDATA property.
 void setTitle(java.lang.String newValue)
          Set the Title property.
 void setValue(java.lang.String newValue)
          Set the Value 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 Link 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

$HREF

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

$ACTION

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

$GREF

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

$CONTENT_ROLE

public static final java.lang.String $CONTENT_ROLE
Constant for "content-role" node name.

$LINK

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

$ID

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

$TITLE

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

$VALUE

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

$CONTENT_TYPE

public static final java.lang.String $CONTENT_TYPE
Constant for "content-type" node name.

_Id

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

_ContentRole

protected java.lang.String _ContentRole

_ContentType

protected java.lang.String _ContentType

_Title

protected java.lang.String _Title

_Value

protected java.lang.String _Value

_Href

protected java.lang.String _Href

_Gref

protected java.lang.String _Gref

_Action

protected java.lang.String _Action

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

_ContentRole_validator_

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

Link

public Link()
Default no args constructor.

Link

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

Link

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

getContentRole

public java.lang.String getContentRole()
Get the ContentRole property.

setContentRole

public void setContentRole(java.lang.String enumValue)
Set the ContentRole property.

setContentRole

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

hasContentRole

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

deleteContentRole

public void deleteContentRole()
Discards ContentRole's value.

getContentType

public java.lang.String getContentType()
Get the ContentType property.

setContentType

public void setContentType(java.lang.String newValue)
Set the ContentType property.

hasContentType

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

deleteContentType

public void deleteContentType()
Discards ContentType's value.

getTitle

public java.lang.String getTitle()
Get the Title property.

setTitle

public void setTitle(java.lang.String newValue)
Set the Title property.

hasTitle

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

deleteTitle

public void deleteTitle()
Discards Title'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.

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.

getGref

public java.lang.String getGref()
Get the Gref property.

setGref

public void setGref(java.lang.String newValue)
Set the Gref property.

hasGref

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

deleteGref

public void deleteGref()
Discards Gref's value.

getAction

public java.lang.String getAction()
Get the Action property.

setAction

public void setAction(java.lang.String newValue)
Set the Action property.

hasAction

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

deleteAction

public void deleteAction()
Discards Action'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 Link 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