uk.ac.essex.ia.opview.xml
Class Graph

java.lang.Object
  extended by uk.ac.essex.ia.opview.xml.Graph
All Implemented Interfaces:
java.io.Serializable

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

Class Graph.

See Also:
Serialized Form

Constructor Summary
Graph()
           
 
Method Summary
 void addGraphItem(GraphItem vGraphItem)
           
 void addGraphItem(int index, GraphItem vGraphItem)
           
 java.util.Enumeration<? extends GraphItem> enumerateGraphItem()
          Method enumerateGraphItem.
 GraphItem[] getGraphItem()
          Method getGraphItem.Returns the contents of the collection in an Array.
 GraphItem getGraphItem(int index)
          Method getGraphItem.
 int getGraphItemCount()
          Method getGraphItemCount.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends GraphItem> iterateGraphItem()
          Method iterateGraphItem.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllGraphItem()
           
 boolean removeGraphItem(GraphItem vGraphItem)
          Method removeGraphItem.
 GraphItem removeGraphItemAt(int index)
          Method removeGraphItemAt.
 void setGraphItem(GraphItem[] vGraphItemArray)
           
 void setGraphItem(int index, GraphItem vGraphItem)
           
static Graph 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

Graph

public Graph()
Method Detail

addGraphItem

public void addGraphItem(GraphItem vGraphItem)
                  throws java.lang.IndexOutOfBoundsException
Parameters:
vGraphItem -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addGraphItem

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

enumerateGraphItem

public java.util.Enumeration<? extends GraphItem> enumerateGraphItem()
Method enumerateGraphItem.

Returns:
an Enumeration over all possible elements of this collection

getGraphItem

public GraphItem getGraphItem(int index)
                       throws java.lang.IndexOutOfBoundsException
Method getGraphItem.

Parameters:
index -
Returns:
the value of the uk.ac.essex.ia.opview.xml.GraphItem at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getGraphItem

public GraphItem[] getGraphItem()
Method getGraphItem.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

getGraphItemCount

public int getGraphItemCount()
Method getGraphItemCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateGraphItem

public java.util.Iterator<? extends GraphItem> iterateGraphItem()
Method iterateGraphItem.

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

removeAllGraphItem

public void removeAllGraphItem()

removeGraphItem

public boolean removeGraphItem(GraphItem vGraphItem)
Method removeGraphItem.

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

removeGraphItemAt

public GraphItem removeGraphItemAt(int index)
Method removeGraphItemAt.

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

setGraphItem

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

setGraphItem

public void setGraphItem(GraphItem[] vGraphItemArray)
Parameters:
vGraphItemArray -

unmarshal

public static Graph 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.ia.opview.xml.Graph
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