Version: 1.1.1

org.biomoby.shared
Class MobyPrimaryDataSet

java.lang.Object
  extended by org.biomoby.shared.MobyData
      extended by org.biomoby.shared.MobyPrimaryData
          extended by org.biomoby.shared.MobyPrimaryDataSet
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
MobyDataObjectSet

public class MobyPrimaryDataSet
extends MobyPrimaryData
implements Cloneable

A container representing a way how a named collection of various primary data types is used in a service.

Version:
$Id: MobyPrimaryDataSet.java,v 1.10 2008/01/07 22:11:36 gordonp Exp $
Author:
Martin Senger

Constructor Summary
MobyPrimaryDataSet(Element elem)
          Construct this instance from a piece of XML.
MobyPrimaryDataSet(String name)
          Default constructor.
 
Method Summary
 void addElement(MobyPrimaryDataSimple value)
           
 void addNamespace(MobyNamespace value)
          Add given namespace of all elements of this collection.
 MobyPrimaryDataSet clone()
          Must be overwritten by a subclass.
 String format(int indent)
           
 MobyDataType getDataType()
          Return a data type of the first element of this collection (according the Biomoby API, however, all elements should have the same data type).
 MobyPrimaryDataSimple[] getElements()
           
 MobyNamespace[] getNamespaces()
          Return namespaces of the first element of this collection.
 void removeNamespace(MobyNamespace value)
          Remove given namespace from all elements of this collection.
 void removeNamespace(String namespaceName)
          Remove given namespace (defined by its name) from all elements of this collection.
 void setDataType(MobyDataType dataType)
          Set given data type to all elements of this collection (according the Biomoby API all elements should have the same data type).
 void setElements(MobyPrimaryDataSimple[] value)
           
 void setNamespaces(MobyNamespace[] value)
          Set given namespaces of all elements of this collection.
 String toString()
           
 String toXML()
          Convert this instance to the XML.
 
Methods inherited from class org.biomoby.shared.MobyPrimaryData
isPrimary
 
Methods inherited from class org.biomoby.shared.MobyData
getId, getName, getUserData, setId, setName, setUserData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MobyPrimaryDataSet

public MobyPrimaryDataSet(String name)
Default constructor. Other characteristics are empty - which is usually wrong - therefore use 'set' method to fill them.


MobyPrimaryDataSet

public MobyPrimaryDataSet(Element elem)
Construct this instance from a piece of XML. The XML looks like this: ...... ......

Method Detail

clone

public MobyPrimaryDataSet clone()
Description copied from class: MobyPrimaryData
Must be overwritten by a subclass.

Specified by:
clone in class MobyPrimaryData

getElements

public MobyPrimaryDataSimple[] getElements()

setElements

public void setElements(MobyPrimaryDataSimple[] value)

addElement

public void addElement(MobyPrimaryDataSimple value)

getDataType

public MobyDataType getDataType()
Return a data type of the first element of this collection (according the Biomoby API, however, all elements should have the same data type).

Specified by:
getDataType in class MobyPrimaryData

setDataType

public void setDataType(MobyDataType dataType)
Set given data type to all elements of this collection (according the Biomoby API all elements should have the same data type).

Specified by:
setDataType in class MobyPrimaryData

getNamespaces

public MobyNamespace[] getNamespaces()
Return namespaces of the first element of this collection.

Specified by:
getNamespaces in class MobyPrimaryData

setNamespaces

public void setNamespaces(MobyNamespace[] value)
Set given namespaces of all elements of this collection.

Specified by:
setNamespaces in class MobyPrimaryData

addNamespace

public void addNamespace(MobyNamespace value)
Add given namespace of all elements of this collection.

Specified by:
addNamespace in class MobyPrimaryData

removeNamespace

public void removeNamespace(String namespaceName)
Remove given namespace (defined by its name) from all elements of this collection.

Specified by:
removeNamespace in class MobyPrimaryData

removeNamespace

public void removeNamespace(MobyNamespace value)
Remove given namespace from all elements of this collection.

Specified by:
removeNamespace in class MobyPrimaryData

toXML

public String toXML()
Convert this instance to the XML. The XML will look like this: ...... ......

Specified by:
toXML in class MobyData

format

public String format(int indent)
Specified by:
format in class MobyData

toString

public String toString()
Overrides:
toString in class Object

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010