org.exolab.castor.tests.framework.testDescriptor
Class ExpectedSources

java.lang.Object
  extended by org.exolab.castor.tests.framework.testDescriptor.ExpectedSources
All Implemented Interfaces:
java.io.Serializable

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

Class ExpectedSources.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
ExpectedSources()
           
 
Method Summary
 void addExpectedSource(int index, java.lang.String vExpectedSource)
           
 void addExpectedSource(java.lang.String vExpectedSource)
           
 java.util.Enumeration enumerateExpectedSource()
          Method enumerateExpectedSource.
 java.lang.String[] getExpectedSource()
          Method getExpectedSource.Returns the contents of the collection in an Array.
 java.lang.String getExpectedSource(int index)
          Method getExpectedSource.
 int getExpectedSourceCount()
          Method getExpectedSourceCount.
 boolean isValid()
          Method isValid.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllExpectedSource()
           
 boolean removeExpectedSource(java.lang.String vExpectedSource)
          Method removeExpectedSource.
 java.lang.String removeExpectedSourceAt(int index)
          Method removeExpectedSourceAt.
 void setExpectedSource(int index, java.lang.String vExpectedSource)
           
 void setExpectedSource(java.lang.String[] vExpectedSourceArray)
           
static ExpectedSources 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

ExpectedSources

public ExpectedSources()
Method Detail

addExpectedSource

public void addExpectedSource(java.lang.String vExpectedSource)
                       throws java.lang.IndexOutOfBoundsException
Parameters:
vExpectedSource -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addExpectedSource

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

enumerateExpectedSource

public java.util.Enumeration enumerateExpectedSource()
Method enumerateExpectedSource.

Returns:
an Enumeration over all java.lang.String elements

getExpectedSource

public java.lang.String getExpectedSource(int index)
                                   throws java.lang.IndexOutOfBoundsException
Method getExpectedSource.

Parameters:
index -
Returns:
the value of the java.lang.String at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getExpectedSource

public java.lang.String[] getExpectedSource()
Method getExpectedSource.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

getExpectedSourceCount

public int getExpectedSourceCount()
Method getExpectedSourceCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

marshal

public void marshal(java.io.Writer out)
             throws MarshalException,
                    ValidationException
Parameters:
out -
Throws:
MarshalException - if object is null or if any SAXException is thrown during marshaling
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,
                    MarshalException,
                    ValidationException
Parameters:
handler -
Throws:
java.io.IOException - if an IOException occurs during marshaling
ValidationException - if this object is an invalid instance according to the schema
MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllExpectedSource

public void removeAllExpectedSource()

removeExpectedSource

public boolean removeExpectedSource(java.lang.String vExpectedSource)
Method removeExpectedSource.

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

removeExpectedSourceAt

public java.lang.String removeExpectedSourceAt(int index)
Method removeExpectedSourceAt.

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

setExpectedSource

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

setExpectedSource

public void setExpectedSource(java.lang.String[] vExpectedSourceArray)
Parameters:
vExpectedSourceArray -

unmarshal

public static ExpectedSources unmarshal(java.io.Reader reader)
                                 throws MarshalException,
                                        ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.exolab.castor.tests.framework.testDescriptor.ExpectedSources
Throws:
MarshalException - if object is null or if any SAXException is thrown during marshaling
ValidationException - if this object is an invalid instance according to the schema

validate

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


Intalio Inc. (C) 1999-2007. All rights reserved http://www.intalio.com