[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Wed Mar 17 20:57:28 UTC 2010
gordonp
Wed Mar 17 16:57:28 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared
In directory dev.open-bio.org:/tmp/cvs-serv12641/src/main/org/biomoby/shared
Modified Files:
MobyData.java
Log Message:
Added methods to allow association of a random application-specific objects with the Moby data
moby-live/Java/src/main/org/biomoby/shared MobyData.java,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyData.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyData.java 2008/01/07 22:11:36 1.6
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyData.java 2010/03/17 20:57:28 1.7
@@ -25,6 +25,9 @@
protected String name;
protected String id = null;
+ /** Convenience for applications to associate any data with the Moby objects as needed for the
+ application's particular purpose. Inspired by Java3D's scenegraph customization method. */
+ protected Object userData = null;
/**************************************************************************
* Default constructor.
@@ -54,6 +57,24 @@
public void setId (String value) {
id = value;
}
+
+ /**
+ * Retrieves any application-specific data that may have been stored in association with this Moby object.
+ * The returned object has nothing to do with the Moby protocol itself. See setUserData() for more details.
+ */
+ public Object getUserData(){
+ return userData;
+ }
+
+ /**
+ * Allows developers to track their application-specific information alongside the Moby functionality.
+ * Provided for application developers' convenience: data stored using this routine is completely
+ * ignore by the Moby core libraries. If you want to store Moby data, use the routines defined in various
+ * subclasses of this class (e.g. MobyDataObject).
+ */
+ public void setUserData(Object data){
+ userData = data;
+ }
/**************************************************************************
* Must be overwritten by a subclass.
More information about the MOBY-guts
mailing list