Version: 1.1.1

org.biomoby.shared
Class MobySecondaryData

java.lang.Object
  extended by org.biomoby.shared.MobyData
      extended by org.biomoby.shared.MobySecondaryData
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
MobyDataSecondaryInstance

public class MobySecondaryData
extends MobyData
implements Cloneable

A container representing a way how various secondary data types are used in a service.

Version:
$Id: MobySecondaryData.java,v 1.13 2009/06/09 18:56:27 gordonp Exp $
Author:
Martin Senger

Field Summary
static String BOOLEAN_TYPE
           
static String DATETIME_TYPE
           
static String FLOAT_TYPE
           
static String INTEGER_TYPE
           
static String STRING_TYPE
           
 
Constructor Summary
MobySecondaryData(Element elem)
          Construct this instance from a piece of XML.
MobySecondaryData(String name)
          Default constructor.
 
Method Summary
 void addAllowedValue(String value)
           
 MobySecondaryData clone()
          Must be overwritten by a subclass.
 String format(int indent)
           
 String[] getAllowedValues()
           
 String getDataType()
           
 String getDefaultValue()
           
 String getDescription()
          Return a (usually) human readable description of this parameter.
 String getLSID()
           
 int getMaximumValue()
           
 String getMaxValue()
           
 int getMinimumValue()
           
 String getMinValue()
           
 boolean isPrimary()
           
 void setAllowedValues(String[] value)
           
 void setDataType(String value)
           
 void setDefaultValue(String value)
           
 void setDescription(String value)
           
 void setMaximumValue(int value)
          Deprecated. Use setMaxValue(java.lang.String) instead.
 void setMaxValue(String value)
           
 void setMinimumValue(int value)
          Deprecated. Use setMinValue(java.lang.String) instead.
 void setMinValue(String value)
           
 String toString()
           
 String toXML()
          Convert this instance into XML.
 
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
 

Field Detail

INTEGER_TYPE

public static final String INTEGER_TYPE
See Also:
Constant Field Values

FLOAT_TYPE

public static final String FLOAT_TYPE
See Also:
Constant Field Values

STRING_TYPE

public static final String STRING_TYPE
See Also:
Constant Field Values

DATETIME_TYPE

public static final String DATETIME_TYPE
See Also:
Constant Field Values

BOOLEAN_TYPE

public static final String BOOLEAN_TYPE
See Also:
Constant Field Values
Constructor Detail

MobySecondaryData

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


MobySecondaryData

public MobySecondaryData(Element elem)
Construct this instance from a piece of XML. The XML looks like this: <Parameter articleName="NameOfArticle"> <datatype>INT|FLOAT|STRING</datatype> <description>...</description> <default>...</default> <!-- any/all of these --> <max>...</max> <!-- ... --> <min>...</min> <!-- ... --> <enum>...</enum> <!-- ... --> <enum>...</enum> <!-- ... --> </Parameter>

Method Detail

clone

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

Specified by:
clone in class MobyData

getDataType

public String getDataType()

getLSID

public String getLSID()

setDataType

public void setDataType(String value)
                 throws Exception
Throws:
Exception

getDefaultValue

public String getDefaultValue()

setDefaultValue

public void setDefaultValue(String value)

getMinimumValue

public int getMinimumValue()

setMinimumValue

public void setMinimumValue(int value)
Deprecated. Use setMinValue(java.lang.String) instead.


getMinValue

public String getMinValue()

setMinValue

public void setMinValue(String value)

getMaximumValue

public int getMaximumValue()

setMaximumValue

public void setMaximumValue(int value)
Deprecated. Use setMaxValue(java.lang.String) instead.


getMaxValue

public String getMaxValue()

setMaxValue

public void setMaxValue(String value)

getAllowedValues

public String[] getAllowedValues()

setAllowedValues

public void setAllowedValues(String[] value)

addAllowedValue

public void addAllowedValue(String value)

isPrimary

public boolean isPrimary()
Specified by:
isPrimary in class MobyData

getDescription

public String getDescription()
Return a (usually) human readable description of this parameter.


setDescription

public void setDescription(String value)
See Also:
getDescription()

toXML

public String toXML()
Convert this instance into XML. The XML will look like this: <Parameter articleName="NameOfArticle"> <datatype>INT|FLOAT|STRING</datatype> <description>...</description> <default>...</default> <!-- any/all of these --> <max>...</max> <!-- ... --> <min>...</min> <!-- ... --> <enum>...</enum> <!-- ... --> <enum>...</enum> <!-- ... --> </Parameter>

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