|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.shared.MobyData org.biomoby.shared.MobyPrimaryData org.biomoby.shared.MobyPrimaryDataSimple org.biomoby.shared.data.MobyDataObject org.biomoby.shared.data.MobyDataObjectSAI
public class MobyDataObjectSAI
A convenience class that just associates a set of possible services to run with a data instance. It shadows all of the normal MobyDataObject methods, passing them through to the data instance given in the constructor. This is done rather than unnecessarily cloning potentially large objects. NOTA BENE: This object does not clone the MOBY data passed in, therefore any changes you make to the original MOBY data object later will be reflected here! If you want this object to retain its own copy (e.g. in an intialization loop) call the constructor like this: new MobyDataObjectSAI((MobyDataObject) data.clone(), ...)
Field Summary |
---|
Fields inherited from interface org.biomoby.shared.data.MobyDataInstance |
---|
CENTRAL_XML_MODE, SERVICE_XML_MODE |
Constructor Summary | |
---|---|
MobyDataObjectSAI(MobyDataObject mdsi,
MobyService[] services)
Constructor that takes an existing object and associates services with it. |
|
MobyDataObjectSAI(String namespace,
String id,
MobyService[] services)
Constructor for base Objects. |
|
MobyDataObjectSAI(String namespace,
String id,
MobyService[] services,
Registry registry)
|
Method Summary | |
---|---|
void |
addCrossReference(MobyDataObject mobj)
|
void |
addNamespace(MobyNamespace ns)
Add one namespace to already existing ones (but only if a namespace of the same name does not exist yet). |
MobyDataObjectSAI |
clone()
Simply calls new constructor with object's existing data type, name and value. |
Collection |
getCrossReferences()
Call this method if you would like to modify the cross references, such as removing items, clearing the collection, etc. |
MobyDataObject |
getDataInstance()
Returns the underlying data instance we are shadowing |
MobyDataType |
getDataType()
|
String |
getId()
|
MobyNamespace[] |
getNamespaces()
Return all namespaces defined in this data container. |
Object |
getObject()
Gives access to the Java object instance underlying the MobyData instance. |
MobyService[] |
getServices()
|
Object |
getUserData()
Retrieves any application-specific data that may have been stored in association with this Moby object. |
String |
getValue()
A lexical (prefereably human readable) representation of the underlying object value (not including the namespace and ID). |
int |
getXmlMode()
Report whether toXML will produce Central template or service call instance XML. |
boolean |
hasCrossReferences()
|
void |
setId(String value)
Used to set the data instance value based on an ID string. i.e. just an Object. |
void |
setServices(MobyService[] services)
|
void |
setUserData(Object data)
Allows developers to track their application-specific information alongside the Moby functionality. |
void |
setXmlMode(int mode)
Determined whether toXML will return a Central template value or a service call instance value. |
String |
toString()
Convenience method to get the basic XML representation |
String |
toXML()
Produces a full-blown XML fragment that depending on the value of getXmlMode() is either a template for use in MOBY Central services, or a Simple element for use in calling a service instance. |
Methods inherited from class org.biomoby.shared.data.MobyDataObject |
---|
addCrossReferences, addCrossReferences, addProvisionInfo, compareTo, createInstanceFromDOM, createInstanceFromDOM, createInstanceFromString, createInstanceFromString, createInstanceFromXML, equals, getId, getName, getPrimaryNamespace, getProvisionInfo, getTextContents, setName, setPrimaryNamespace, setProvisionInfo |
Methods inherited from class org.biomoby.shared.MobyPrimaryDataSimple |
---|
format, removeNamespace, removeNamespace, setDataType, setNamespaces |
Methods inherited from class org.biomoby.shared.MobyPrimaryData |
---|
isPrimary |
Methods inherited from class org.biomoby.shared.MobyData |
---|
getName |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.biomoby.shared.data.MobyDataInstance |
---|
getName, setName |
Constructor Detail |
---|
public MobyDataObjectSAI(String namespace, String id, MobyService[] services)
public MobyDataObjectSAI(String namespace, String id, MobyService[] services, Registry registry)
public MobyDataObjectSAI(MobyDataObject mdsi, MobyService[] services)
Method Detail |
---|
public MobyDataObjectSAI clone()
MobyDataObject
clone
in class MobyDataObject
public MobyDataObject getDataInstance()
public MobyService[] getServices()
getServices
in interface MobyDataServiceAssocInstance
public MobyDataType getDataType()
getDataType
in class MobyPrimaryDataSimple
public void setServices(MobyService[] services)
setServices
in interface MobyDataServiceAssocInstance
public int getXmlMode()
MobyDataObject
getXmlMode
in interface MobyDataInstance
getXmlMode
in class MobyDataObject
public void setXmlMode(int mode) throws IllegalArgumentException
MobyDataObject
setXmlMode
in interface MobyDataInstance
setXmlMode
in class MobyDataObject
mode
- one of MobyDataInstance.CENTRAL_XML_MODE or MobyDataInstance.SERVICE_XML_MODE
IllegalArgumentException
- if the mode is not one of the specified valuespublic Object getUserData()
MobyData
getUserData
in interface MobyDataInstance
getUserData
in class MobyData
public void setUserData(Object data)
MobyData
setUserData
in interface MobyDataInstance
setUserData
in class MobyData
public String getValue()
MobyDataObject
getValue
in class MobyDataObject
public void setId(String value)
MobyDataObject
setId
in class MobyDataObject
public String getId()
getId
in class MobyData
public void addNamespace(MobyNamespace ns)
MobyPrimaryDataSimple
addNamespace
in class MobyPrimaryDataSimple
public MobyNamespace[] getNamespaces()
MobyPrimaryDataSimple
getNamespaces
in class MobyPrimaryDataSimple
public Object getObject()
MobyDataObject
getObject
in interface MobyDataInstance
getObject
in class MobyDataObject
public void addCrossReference(MobyDataObject mobj)
addCrossReference
in class MobyDataObject
public Collection getCrossReferences()
MobyDataObject
getCrossReferences
in class MobyDataObject
public boolean hasCrossReferences()
hasCrossReferences
in class MobyDataObject
public String toString()
MobyDataObject
toString
in class MobyDataObject
public String toXML()
MobyDataObject
toXML
in interface MobyDataInstance
toXML
in class MobyDataObject
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |