uk.ac.essex.xul.castor
Class Input

java.lang.Object
  extended by uk.ac.essex.xul.castor.Input
All Implemented Interfaces:
java.io.Serializable

public class Input
extends java.lang.Object
implements java.io.Serializable

Class Input.

See Also:
Serialized Form

Constructor Summary
Input()
           
 
Method Summary
 void addOption(int index, Option vOption)
           
 void addOption(Option vOption)
           
 java.util.Enumeration<? extends Option> enumerateOption()
          Method enumerateOption.
 java.lang.String getLabel()
          Returns the value of field 'label'.
 java.lang.String getName()
          Returns the value of field 'name'.
 Option[] getOption()
          Method getOption.Returns the contents of the collection in an Array.
 Option getOption(int index)
          Method getOption.
 int getOptionCount()
          Method getOptionCount.
 InputTypeType getType()
          Returns the value of field 'type'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends Option> iterateOption()
          Method iterateOption.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllOption()
           
 boolean removeOption(Option vOption)
          Method removeOption.
 Option removeOptionAt(int index)
          Method removeOptionAt.
 void setLabel(java.lang.String label)
          Sets the value of field 'label'.
 void setName(java.lang.String name)
          Sets the value of field 'name'.
 void setOption(int index, Option vOption)
           
 void setOption(Option[] vOptionArray)
           
 void setType(InputTypeType type)
          Sets the value of field 'type'.
static Input unmarshal(java.io.Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Input

public Input()
Method Detail

addOption

public void addOption(Option vOption)
               throws java.lang.IndexOutOfBoundsException
Parameters:
vOption -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addOption

public void addOption(int index,
                      Option vOption)
               throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vOption -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateOption

public java.util.Enumeration<? extends Option> enumerateOption()
Method enumerateOption.

Returns:
an Enumeration over all possible elements of this collection

getLabel

public java.lang.String getLabel()
Returns the value of field 'label'.

Returns:
the value of field 'Label'.

getName

public java.lang.String getName()
Returns the value of field 'name'.

Returns:
the value of field 'Name'.

getOption

public Option getOption(int index)
                 throws java.lang.IndexOutOfBoundsException
Method getOption.

Parameters:
index -
Returns:
the value of the uk.ac.essex.xul.castor.Option at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getOption

public Option[] getOption()
Method getOption.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getOptionCount

public int getOptionCount()
Method getOptionCount.

Returns:
the size of this collection

getType

public InputTypeType getType()
Returns the value of field 'type'.

Returns:
the value of field 'Type'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateOption

public java.util.Iterator<? extends Option> iterateOption()
Method iterateOption.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
java.io.IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllOption

public void removeAllOption()

removeOption

public boolean removeOption(Option vOption)
Method removeOption.

Parameters:
vOption -
Returns:
true if the object was removed from the collection.

removeOptionAt

public Option removeOptionAt(int index)
Method removeOptionAt.

Parameters:
index -
Returns:
the element removed from the collection

setLabel

public void setLabel(java.lang.String label)
Sets the value of field 'label'.

Parameters:
label - the value of field 'label'.

setName

public void setName(java.lang.String name)
Sets the value of field 'name'.

Parameters:
name - the value of field 'name'.

setOption

public void setOption(int index,
                      Option vOption)
               throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vOption -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setOption

public void setOption(Option[] vOptionArray)
Parameters:
vOptionArray -

setType

public void setType(InputTypeType type)
Sets the value of field 'type'.

Parameters:
type - the value of field 'type'.

unmarshal

public static Input unmarshal(java.io.Reader reader)
                       throws org.exolab.castor.xml.MarshalException,
                              org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled uk.ac.essex.xul.castor.Input
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema