org.exolab.castor.tests.framework.testDescriptor

Class ExpectedSources

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(java.io.Writer out)
void
marshal(org.xml.sax.ContentHandler handler)
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()

Constructor Details

ExpectedSources

public ExpectedSources()

Method Details

addExpectedSource

public void addExpectedSource(int index,
                              java.lang.String vExpectedSource)
            throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vExpectedSource -

addExpectedSource

public void addExpectedSource(java.lang.String vExpectedSource)
            throws java.lang.IndexOutOfBoundsException
Parameters:
vExpectedSource -

enumerateExpectedSource

public java.util.Enumeration enumerateExpectedSource()
Method enumerateExpectedSource.
Returns:
an Enumeration over all java.lang.String elements

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

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

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

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-2008. All rights reserved http://www.intalio.com