edu.sdsc.inca
Class WrapSuite

java.lang.Object
  extended by edu.sdsc.inca.WrapSuite

public class WrapSuite
extends java.lang.Object

A class that wraps a suite, represented by an Inca XmlBean, with some convenience methods.


Field Summary
protected  edu.sdsc.inca.dataModel.suite.SuiteDocument doc
           
protected  java.util.ArrayList series
           
protected  edu.sdsc.inca.dataModel.suite.Suite suite
           
 
Constructor Summary
WrapSuite(java.lang.String name, java.lang.String description)
          Creates a new suite.
WrapSuite(edu.sdsc.inca.dataModel.suite.Suite suite)
          Creates a new WrapSuite to wrap an existing Suite.
 
Method Summary
 WrapSeries addNewSeries()
          Adds another series to the suite.
 void copy(WrapSuite original)
          Copies all information from another suite into this one.
 WrapSuite differences(WrapSuite ws)
          Returns a new WrapSuite that contains the modifications necessary to produce a specified WrapSuite from this one.
 WrapSeries[] getAllSeries()
          Returns the set of series in the suite as an array, empty if none.
 java.lang.String getDescription()
          Returns the description of the suite.
 java.lang.String getName()
          Returns the name of the suite.
 WrapSeries getSeriesAt(int index)
          Returns a specified SeriesConfig from the Suite.
 int getSeriesCount()
          Returns the number of series configs in the suite.
 edu.sdsc.inca.dataModel.suite.Suite getSuite()
          Returns the Suite wrapped by this WrappedSuite.
 void removeSeries(WrapSeries series)
          Removes a specified series from the suite.
 void setDescription(java.lang.String description)
          Sets the suite description to a specified value.
 void setName(java.lang.String name)
          Sets the suite name to a specified value.
 java.lang.String toString()
          An override of the default toString function.
 java.lang.String toXml()
          Returns XML for the Suite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

doc

protected edu.sdsc.inca.dataModel.suite.SuiteDocument doc

suite

protected edu.sdsc.inca.dataModel.suite.Suite suite

series

protected java.util.ArrayList series
Constructor Detail

WrapSuite

public WrapSuite(java.lang.String name,
                 java.lang.String description)
Creates a new suite.

Parameters:
name - the suite name
description - the suite description

WrapSuite

public WrapSuite(edu.sdsc.inca.dataModel.suite.Suite suite)
Creates a new WrapSuite to wrap an existing Suite.

Parameters:
suite - the suite to wrap
Method Detail

addNewSeries

public WrapSeries addNewSeries()
Adds another series to the suite.

Returns:
the new series

copy

public void copy(WrapSuite original)
Copies all information from another suite into this one.

Parameters:
original - the WrapSuite to duplicate

differences

public WrapSuite differences(WrapSuite ws)
Returns a new WrapSuite that contains the modifications necessary to produce a specified WrapSuite from this one.

Parameters:
ws - the modified WrapSuite
Returns:
a new WrapSuite that shows the differences needed to produce ws

getAllSeries

public WrapSeries[] getAllSeries()
Returns the set of series in the suite as an array, empty if none.

Returns:
the set of series, empty if none

getDescription

public java.lang.String getDescription()
Returns the description of the suite.

Returns:
the suite description

getName

public java.lang.String getName()
Returns the name of the suite.

Returns:
the suite name

getSeriesAt

public WrapSeries getSeriesAt(int index)
Returns a specified SeriesConfig from the Suite.

Parameters:
index - the index into the SeriesConfig array of the desired item

getSeriesCount

public int getSeriesCount()
Returns the number of series configs in the suite.

Returns:
the number of series configs

getSuite

public edu.sdsc.inca.dataModel.suite.Suite getSuite()
Returns the Suite wrapped by this WrappedSuite.

Returns:
the wrapped Suite

removeSeries

public void removeSeries(WrapSeries series)
Removes a specified series from the suite.

Parameters:
series - the series to remove

toString

public java.lang.String toString()
An override of the default toString function.

Overrides:
toString in class java.lang.Object

setDescription

public void setDescription(java.lang.String description)
Sets the suite description to a specified value.

Parameters:
description - the description of the suite

setName

public void setName(java.lang.String name)
Sets the suite name to a specified value.

Parameters:
name - the name of the suite

toXml

public java.lang.String toXml()
Returns XML for the Suite.

Returns:
the suite, as an XML string