Version: 1.1.1

org.biomoby.shared
Class MobyPrimaryDataSimple

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

public class MobyPrimaryDataSimple
extends MobyPrimaryData
implements Cloneable

A container representing a way how various primary data types are used in a service. It points to a MobyDataType where the real data type is stored, and to a MobyNamespace where the namespace is stored.

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

Constructor Summary
MobyPrimaryDataSimple()
          Default constructor.
MobyPrimaryDataSimple(Element elem)
          Construct this instance from a piece of XML.
MobyPrimaryDataSimple(String name)
          Normal constructor.
 
Method Summary
 void addNamespace(MobyNamespace value)
          Add one namespace to already existing ones (but only if a namespace of the same name does not exist yet).
 MobyPrimaryDataSimple clone()
          Must be overwritten by a subclass.
 String format(int indent)
           
 MobyDataType getDataType()
           
 MobyNamespace[] getNamespaces()
          Return all namespaces defined in this data container.
 void removeNamespace(MobyNamespace value)
          Remove given namespace.
 void removeNamespace(String namespaceName)
          Remove namespace given by its name.
 void setDataType(MobyDataType value)
           
 void setNamespaces(MobyNamespace[] value)
          Replace all existing namespaces (if any) by a new array of namespaces.
 String toString()
           
 String toXML()
          Convert this instance into 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

MobyPrimaryDataSimple

public MobyPrimaryDataSimple()
Default constructor.


MobyPrimaryDataSimple

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


MobyPrimaryDataSimple

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

Method Detail

clone

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

Specified by:
clone in class MobyPrimaryData

getDataType

public MobyDataType getDataType()
Specified by:
getDataType in class MobyPrimaryData

setDataType

public void setDataType(MobyDataType value)
Specified by:
setDataType in class MobyPrimaryData

getNamespaces

public MobyNamespace[] getNamespaces()
Return all namespaces defined in this data container.

Specified by:
getNamespaces in class MobyPrimaryData

setNamespaces

public void setNamespaces(MobyNamespace[] value)
Replace all existing namespaces (if any) by a new array of namespaces. Do not accept duplicates (same names).

Specified by:
setNamespaces in class MobyPrimaryData

addNamespace

public void addNamespace(MobyNamespace value)
Add one namespace to already existing ones (but only if a namespace of the same name does not exist yet).

Specified by:
addNamespace in class MobyPrimaryData

removeNamespace

public void removeNamespace(String namespaceName)
Remove namespace given by its name.

Specified by:
removeNamespace in class MobyPrimaryData

removeNamespace

public void removeNamespace(MobyNamespace value)
Remove given namespace.

Specified by:
removeNamespace in class MobyPrimaryData

toXML

public String toXML()
Convert this instance into XML. The XML will look like this: ObjectOntologyTerm NamespaceTerm ...

Specified by:
toXML in class MobyData

toString

public String toString()
Overrides:
toString in class Object

format

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

Version: 1.1.1

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