Version: 1.1.1

org.biomoby.shared.parser
Class MobyDataElement

java.lang.Object
  extended by org.biomoby.shared.parser.MobyDataElement
Direct Known Subclasses:
MobyCollection, MobyParameter, MobySimple

public abstract class MobyDataElement
extends Object

A general "envelope" that can carry real Biomoby data objects. The known sub-classes represents concepts from the Biomoby API (Simples and Collections, for example).

Note that this is an envelope so it does not contain any value (any real data).

Version:
$Id: MobyDataElement.java,v 1.2 2006/02/07 14:11:06 senger Exp $
Author:
Martin Senger

Constructor Summary
MobyDataElement()
          Default constructor.
 
Method Summary
 String format(int indent)
          Return the same contents as toString() method but indented by level expressed in the parameter 'indent'.
 String getName()
           
 void setName(String name)
          A name here means an article name of the top-level object.
 String toString()
          Format all non-empty public members in a human-readable way.
 org.jdom.Element toXML()
          Create an XML element representing this object.
static org.jdom.Element toXML(String articleName)
          Create an XML element representing this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MobyDataElement

public MobyDataElement()
Default constructor.

Method Detail

toString

public String toString()
Format all non-empty public members in a human-readable way.

Overrides:
toString in class Object
Returns:
a formatted string
See Also:
for making the returned string better indented

format

public String format(int indent)
Return the same contents as toString() method but indented by level expressed in the parameter 'indent'. It is useful when a hierarchy of objects call toString methods on their children/members.

Parameters:
indent - means a level of wanted indentation: number 1 means three spaces, number two six spaces, etc.
Returns:
a formatted, and indented, string

toXML

public org.jdom.Element toXML()
Create an XML element representing this object.

Returns:
a jDom element that can be easily incorporated into bigger a XML document

toXML

public static org.jdom.Element toXML(String articleName)
Create an XML element representing this object.

Returns:
a jDom element that can be easily incorporated into bigger a XML document

setName

public void setName(String name)
A name here means an article name of the top-level object.


getName

public String getName()

Version: 1.1.1

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