log.debug("Redundant call to registerObject");
}
// TODO: add default provenance.
- unregistered.__ensure_instance_ids(); // call cascade method here : TODO: decide if we need to do this.
+ // TODO: decide if we need to do call __ensure_instance_ids here
+ // TODO: check if __ensure_instance_ids works correctly with new 'visit flag' mechanism
+ unregistered.__ensure_instance_ids(); // call cascade method here :
return unregistered.getVorbaId();
}
}
public abstract ClientHandle getClientHandle();
public abstract UserHandle getUserHandle();
+ /**
+ * called when an object is touched by the vamsas library prior to writing
+ * to record last hash for the object's VorbaId
+ * @param vobject
+ */
+ public abstract void updateHashValue(Vobject vobject);
}
\ No newline at end of file
*/
protected boolean __stored_in_document = false;
/**
+ * true if Vobject was updated since the vamsas library last read a Vobj with the same VorbaId from a document.
+ */
+ protected boolean __updated_since_last_read = false;
+ /**
* memory of the last doHash() value computed for the Vobject
* @see doHash()
*/
- protected long __last_hash = 0;
+ protected int __last_hash = 0;
/**
* set by testInstanceForIdField() if Vobject should have a VorbaId
*/
protected boolean registerable = false;
-
+ protected boolean __visited = false;
/**
* reference to containing object for this Vobject.
*/
VorbaId thisid = vorbaId;
IVorbaIdFactory factory = __vorba;
boolean stored = __stored_in_document;
+ boolean updated = __updated_since_last_read;
+ boolean visited = __visited;
+ java.lang.reflect.Field idfield = ___id_field;
+ ___id_field=null;
+ __updated_since_last_read=false;
vorbaId = null;
__vorba = null;
+ __visited=false;
+ // compute hash
__last_hash = this.hashCode();
+ // reset houseskeeping variables
+ ___id_field=idfield;
vorbaId = thisid;
__vorba = factory;
__stored_in_document = stored;
+ __updated_since_last_read=updated;
V_parent=_V_parent;
+ __visited=visited;
return (__old_hash==0) || (__old_hash == __last_hash);
}
}
/**
+ * @return true if this object has been updated in the currently stored document since the last time a Vobject with the same ID was read from a Vamsas Document
+ */
+ public boolean is__updated_since_last_read() {
+ return __updated_since_last_read;
+ }
+
+ /**
+ * Set internal flag to indicate this object was updated since the last document read
+ * @param __updated_since_last_read the __updated_since_last_read to set
+ */
+ protected void set__updated_since_last_read(boolean __updated_since_last_read) {
+ this.__updated_since_last_read = __updated_since_last_read;
+ }
+
+ /**
* for use by Vorba agent to reflect state of vamsas Vobject to client
* application.
* Setting stored_in_document on a registerable Vobject without a
*
* @return Returns the __last_hash.
*/
- public long get__last_hash() {
+ public int get__last_hash() {
return __last_hash;
}
* TODO: FIX CYCLIC __ensure+instance_ids
* Implementation note for the todo:
* this works like a depth-first search over all vamsas objects in an vamsasDocument.
- * The doHash() function is used as the 'visited' flag -
+ * __visited is the visited flag, any Vobj who's flag is of a different parity
+ * to the visited argument will be recursed on.
+ * note - the doHash() function used to be used as the 'visited' flag -
* this *is not* a valid heuristic, although it will work "most of the time".
* TODO: LATER? Add another method for setDefaultProvenanceField (in the spirit of setInstanceIdField) using the info from the __vorba.getClient/User/Session methods
*/
protected void __ensure_instance_ids() {
+ __ensure_instance_ids(!__visited);
+ }
+ protected void __ensure_instance_ids(boolean visited) {
if (__vorba==null)
throw new Error("Improperly intialised org.vamsas.client.Vobject - no VorbaFactory given.");
log.debug("doing "+this.getClass()+".__ensure_instance_ids()");
if (!__stored_in_document && registerable)
setInstanceIdField();
- if (!doHash())
- return; // nothing has changed in this Vobject - probably visited it before.
+ if (__visited==visited)
+ return;
+ __visited=visited;
+ __vorba.updateHashValue(this);
+
Class descriptor = null;
XMLClassDescriptorImpl descimpl = null;
try {
vals[k].__vorba = __vorba; // propagate IVorbaIdFactory
if (vals[k].V_parent==null)
vals[k].V_parent=this; // propagate parent reference to this element.
- vals[k].__ensure_instance_ids();
+ vals[k].__ensure_instance_ids(visited);
}
}
}
vals[k].__vorba = __vorba; // propagate IVorbaIdFactory
if (vals[k].V_parent==null)
vals[k].V_parent=this; // propagate parent reference to this field object
- vals[k].__ensure_instance_ids();
+ vals[k].__ensure_instance_ids(visited);
}
}
catch (Exception e) {
rf.__vorba = __vorba; // propagate IVorbaIdFactory
if (rf.V_parent==null)
rf.V_parent=this; // propagate parent reference
- rf.__ensure_instance_ids();
+ rf.__ensure_instance_ids(visited);
}
}
catch (Exception e) {
--- /dev/null
+package org.vamsas.client;\r
+\r
+/**\r
+ * Holds information about Vobj instances that is held over between different writes to the document.\r
+ * @author JimP\r
+ *\r
+ */\r
+public class Vobjhash {\r
+ int hashvalue;\r
+ /**\r
+ * creates a record of the hash value for a vamsas document object\r
+ * @param tobemarshalled\r
+ */\r
+ public Vobjhash(Vobject tobemarshalled) {\r
+ hashvalue = tobemarshalled.get__last_hash();\r
+ }\r
+ /**\r
+ * compares the old hash value with the unmarshalled object's most recently computed hash value.\r
+ * @param unmarshalled\r
+ * @return true if the hash values differ\r
+ */\r
+ public boolean isUpdated(Vobject unmarshalled) {\r
+ return hashvalue==unmarshalled.get__last_hash();\r
+ }\r
+}\r
package org.vamsas.client;
import java.util.Hashtable;
+import java.util.Vector;
/**
* A VorbaIdFactory is constructed by an IClient instance.
* @author jimp
*/
public abstract class VorbaIdFactory implements IVorbaIdFactory {
+ /**
+ * hash of VorbaIds to Vobject.
+ */
protected Hashtable extantids=null;
/**
+ * hash of VorbaIds to persisted hash values
+ */
+ protected Hashtable extanthashv=null;
+ /**
+ * list of Vobjects added since last Document read.
+ */
+ protected Vector newobj=null;
+
+ /**
* construct a new id appropriate for this client in the vamsas session.
*
* @return valid VorbaId for session, or null if VorbaIdFactory not configured
protected void setNewIdHash(Hashtable idtable) {
extantids = idtable;
}
+
+ /* (non-Javadoc)
+ * @see org.vamsas.client.IVorbaIdFactory#updateHashValue(org.vamsas.client.Vobject)
+ */
+ public void updateHashValue(Vobject vobject) {
+ if (vobject.isRegisterable())
+ extanthashv.put(vobject.getVorbaId(), new Vobjhash(vobject));
+ }
+
/**
* TODO: decide if these are needed.
*
import java.util.Iterator;
import java.util.Vector;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.exolab.castor.mapping.FieldHandler;
import org.exolab.castor.mapping.GeneralizedFieldHandler;
import org.exolab.castor.mapping.ValidityException;
* Implements the Vamsas Vobject ID machinery for translating
* between non-volatile XML IDs and Vobject references. Use the
* marshalling and unmarshalling methods in this class in order
- * to avoid validation exceptions when marshalling new objects
+ * to add automatically computed values for required fields in objects,
+ * so as to avoid validation exceptions when marshalling new objects
* into the vamsas document.
*/
public class VorbaXmlBinder implements UnmarshalListener {
+ private static Log log = LogFactory.getLog(VorbaXmlBinder.class);
private final IVorbaIdFactory vorbafactory;
private final Vector obj;
-
+ private final Hashtable oldobjhashes;
private final Hashtable objrefs;
-
- public VorbaXmlBinder(IVorbaIdFactory vorbafactory, Vector obj, Hashtable objrefs) {
+ private final Vector updatedobjs;
+
+ public VorbaXmlBinder(IVorbaIdFactory vorbafactory, Vector obj, Hashtable objrefs, Hashtable oldobjhashes, Vector updatedobjs) {
this.vorbafactory = vorbafactory;
this.obj = obj;
this.objrefs = objrefs;
+ this.oldobjhashes = oldobjhashes;
+ this.updatedobjs = updatedobjs;
}
/*
nobj.set__stored_in_document(true);
try {
if (nobj.isRegisterable() && nobj.___id_field!=null) {
+ VorbaId nobj_id=null;
// look for the id field (should be an NCName string)
nobj.__vorba = vorbafactory;
// use the Vobject accessor method to avoid unpleasant security exceptions.
if (idstring!=null) {
if (idstring.length() > 0) {
nobj.setVorbaId(VorbaId.newId(idstring));
- if (objrefs.containsKey(nobj.getVorbaId()) && !objrefs.get(nobj.getVorbaId()).equals(nobj)) {
+ if (objrefs.containsKey(nobj_id=nobj.getVorbaId()) && !objrefs.get(nobj.getVorbaId()).equals(nobj)) {
System.err.println("Serious problem : duplicate id '"+idstring+"' found! expect badness.");
// TODO: HANDLE duplicate XML ids correctly
}
- objrefs.put(nobj.getVorbaId(), nobj);
+ objrefs.put(nobj_id, nobj);
} else {
// add to list of objects without a valid vorbaId
obj.add(nobj);
}
nobj.doHash();
+ // check to see if new object was present in old object hash
+ if (oldobjhashes.containsKey(nobj.getVorbaId())) {
+ Vobjhash oldhash = (Vobjhash) oldobjhashes.get(nobj.getVorbaId());
+ if (oldhash.isUpdated(nobj)) {
+ // mark the object as updated in this document read.
+ nobj.set__updated_since_last_read(true);
+ oldobjhashes.put(nobj_id, new Vobjhash(nobj));
+ updatedobjs.addElement(nobj);
+ }
+ }
}
} catch (Exception e) {
return;
throws IOException, MarshalException, ValidationException {
// Ensure references
if (vorba==null)
- throw new Error("Null VorbaIdVactory Parameter");
+ throw new Error("Null VorbaIdFactory Parameter");
if (doc.__vorba==null)
doc.__vorba = vorba;
doc.__ensure_instance_ids(); // this may take a while. Do we allow for cyclic references ?
doc.marshal(outstream);
+
}
-
+ /**
+ * creates new VorbaId references where necessary for newly unmarshalled objects
+ * @param unrefed
+ * @param objrefs
+ * @return false if any new object references were made
+ */
private static boolean ensure_references(Vector unrefed, Hashtable objrefs) {
boolean sync=true;
if (unrefed.size()>0) {
* were created. If sync is false, then the caller should ensure that the
* vamsasDocument is written back to disk to propagate the new VorbaIds.
* TODO: ensure that provenance is correct for newly registered objects
+ * as getVamsasObjects but will detect updated objects based on differing hash values
+ * obtained from the VorbaIdFactory's VorbaId, Vobject.get__last_Hash() pairs (if any)
* @param instream - the XML input stream
* @param factory - the SimpleClient's properly configured VorbaId factory to make new references.
* @param root the root element's org.vamsas.objects.core Vobject.
- * @return null or {(Object) VamsasDocument Vobject, (Object) Hashtable of Vobject references, (Object) Boolean(sync) }
+ * @return null or {(Object) VamsasDocument Vobject, (Object) Hashtable of Vobject references, (Object) Boolean(sync), (Object) Vector of updated objects in document }
*/
public static Object[] getVamsasObjects(Reader instream,
- VorbaIdFactory factory, Vobject root) {
- Unmarshaller unmarshaller = new Unmarshaller(root);
+ VorbaIdFactory factory, Vobject root) {
+ Unmarshaller unmarshaller = new Unmarshaller(root);
unmarshaller.setIDResolver(new IDResolver() {
public Object resolve(String id) {
- System.err.println("Warning - id " + id
- + " is not found in the VamsasDocument!");
+ VorbaXmlBinder.log.warn("Warning - id " + id
+ + " is not found in the Vamsas XML!");
return null;
}
});
- Hashtable refbase = new Hashtable();
- Vector unrefed = new Vector();
- final Hashtable objrefs = refbase;
+ final Hashtable objrefs = new Hashtable();
+ if (factory.extanthashv==null)
+ factory.extanthashv=new Hashtable();
+ final Hashtable oobjhashes=factory.extanthashv;
final VorbaIdFactory vorbafactory = factory;
- final Vector unrefedObj = unrefed;
- unmarshaller.setUnmarshalListener(new VorbaXmlBinder(vorbafactory, unrefedObj, objrefs));
+ final Vector unrefedObj = new Vector();
+ final Vector updatedObj = new Vector();
+ unmarshaller.setUnmarshalListener(new VorbaXmlBinder(vorbafactory, unrefedObj, objrefs, oobjhashes, updatedObj));
// Call the unmarshaller.
try {
while (instream.ready()) {
+ // TODO: mark objects in oobjhash prior to unmarshalling, to detect when objects have been lost through an update.
+ //tohere
Object obj = unmarshaller.unmarshal(instream);
- boolean sync=ensure_references(unrefed, objrefs);
+ boolean sync=ensure_references(unrefedObj, objrefs);
if (!(obj instanceof Vobject))
return null;
vorbafactory.setNewIdHash(objrefs); // update the Document IO Handler's set of vorbaId<>Object bindings.
- return new Object[] { obj, objrefs, new Boolean(sync)};
+ return new Object[] { obj, objrefs, new Boolean(sync),updatedObj};
}
} catch (MarshalException e) {
// TODO Auto-generated catch block
public boolean isModified() {
return isModified;
}
- private java.util.Hashtable objrefs=null;
+ private Vector updatedObjects=null;
/**
*
* prepare Application-side dataset from the vamsas Document archive
protected ClientDocument(VamsasDocument doc, VamsasArchive docHandler, IdFactory Factory, SimpleClient sclient) {
super(Factory.getVorbaIdHash(), Factory);
+
/**
* prepare Application-side dataset from the vamsas Document archive
*/
this.sclient = sclient;
archive = docHandler;
this.doc = doc;
- objrefs = Factory.getVorbaIdHash();
+ updatedObjects=null; /// TODO: correct this line
}
/*
* @see org.vamsas.client.IClientDocument#getObject(org.vamsas.client.VorbaId)
*/
public Vobject getObject(VorbaId id) {
- if (objrefs==null) {
+ if (vamsasObjects==null) {
log.debug("getObject called on null objrefs list.");
return null;
}
- if (objrefs.containsKey(id))
- return (Vobject) objrefs.get(id);
+ if (vamsasObjects.containsKey(id))
+ return (Vobject) vamsasObjects.get(id);
log.debug("Returning null Vobject reference for id "+id.getId());
return null;
}
* @see org.vamsas.client.IClientDocument#getObjects(org.vamsas.client.VorbaId[])
*/
public Vobject[] getObjects(VorbaId[] ids) {
- if (objrefs==null) {
- log.debug("getObject[] called on null objrefs list.");
+ if (vamsasObjects==null) {
+ log.debug("getObject[] called on null vamsasObjects list.");
return null;
}
Vobject[] vo = new Vobject[ids.length];
for (int i=0,j=ids.length; i<j;i++)
- if (objrefs.containsKey(ids[i]))
- vo[i] = (Vobject) objrefs.get(ids[i]);
+ if (vamsasObjects.containsKey(ids[i]))
+ vo[i] = (Vobject) vamsasObjects.get(ids[i]);
else
log.debug("Returning null Vobject reference for id "+ids[i].getId());
return vo;
log.warn("registerObjects[] called on null document.");
return null;
}
- if (objrefs==null) {
- log.warn("registerObjects[] called for null objrefs hasharray.");
+ if (vamsasObjects==null) {
+ log.warn("registerObjects[] called for null vamsasObjects hasharray.");
return null;
}
if (unregistered!=null) {
} else {
ids[i]=registerObject(unregistered[i]);
}
- log.debug("Registered "+unregistered.length+" objects - total of "+objrefs.size()+" ids.");
+ log.debug("Registered "+unregistered.length+" objects - total of "+vamsasObjects.size()+" ids.");
return ids;
}
return null;
log.warn("registerObjects called on null document.");
return null;
}
- if (objrefs==null) {
- log.warn("registerObjects called for null objrefs hasharray.");
+ if (vamsasObjects==null) {
+ log.warn("registerObjects called for null vamsasObjects hasharray.");
return null;
}
if (unregistered!=null) {
VorbaId id = _registerObject(unregistered);
- log.debug("Registered object - total of "+objrefs.size()+" ids.");
+ log.debug("Registered object - total of "+vamsasObjects.size()+" ids.");
return id;
}
log.warn("Null Vobject passed to registerObject.");
super.finalize();
}
-
+ public Vector getUpdatedObjects() {
+ return updatedObjects;
+ }
}
// TODO: Ensure format of URNs and use standard composition methods.
idstring = client.getClientName()+":"+unique.getValue()+".";
extantids=new Hashtable();
+ this.extanthashv=new Hashtable();
}
/**
* values for keys in this hash can be used to reference the org.vamsas.client.Vobject instance for the VorbaId string.
protected Hashtable getVorbaIdHash() {
return extantids;
}
-
+ /**
+ * values for keys in this hash are Vobjhash objects created for each Vobj with a VorbaId
+ * after this factory has been used to write a vamsas archive.
+ * @return the hash of all VorbaIds and their hash values.
+ */
+ protected Hashtable getVobjhashVals() {
+ return extanthashv;
+ }
/* (non-Javadoc)
* @see org.vamsas.client.VorbaIdFactory#makeVorbaId()
*/
protected EventGeneratorThread evgen = null;
protected ClientDocument cdocument = null;
/**
+ * object hash table that persists in each client holding vorbaIds and hash values after a document write
+ */
+ protected Hashtable extantobjects=null;
+ /**
* construct a transient IdFactory instance - this should last only as long as the
* SimpleClient object holds the lock on the vamsas document being created/manipulated.
* @return
org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
putVamsasDocument(doc, getVorba());
}
-
+ /**
+ *
+ * @param doc
+ * @param vorba
+ * @return (vorbaId string, Vobjhash) pairs for last hash of each object in document
+ * @throws IOException
+ * @throws org.exolab.castor.xml.MarshalException
+ * @throws org.exolab.castor.xml.ValidationException
+ */
public void putVamsasDocument(VamsasDocument doc, VorbaIdFactory vorba) throws IOException,
org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
if (vamsasdocument)
private boolean _has_aligned;
/**
- * Primary Key for vamsas object
- * referencing
+ * Primary Key for vamsas object referencing
*
*/
private java.lang.String _id;
/**
- * objects with modifiable=false will
- * not be modified by a vamsas client
- * update
- *
- */
- private boolean _modifiable = true;
-
- /**
- * keeps track of state for field: _modifiable
+ * Field _modifiable
*/
- private boolean _has_modifiable;
+ private java.lang.String _modifiable;
/**
- * This is annotation over the
- * coordinate frame defined by all
- * the columns in the alignment.
+ * This is annotation over the coordinate frame
+ * defined by all the columns in the alignment.
*
*/
private java.util.Vector _alignmentAnnotationList;
private java.util.Vector _alignmentSequenceList;
/**
- * typical properties may be
- * additional alignment score
- * objects
- *
+ * typical properties may be additional
+ * alignment score objects
*/
private java.util.Vector _propertyList;
} //-- void deleteAligned()
/**
- * Method deleteModifiable
- *
- */
- public void deleteModifiable()
- {
- this._has_modifiable= false;
- } //-- void deleteModifiable()
-
- /**
* Method enumerateAlignmentAnnotation
*
*
}
else if (temp._id != null)
return false;
- if (this._modifiable != temp._modifiable)
- return false;
- if (this._has_modifiable != temp._has_modifiable)
+ if (this._modifiable != null) {
+ if (temp._modifiable == null) return false;
+ else if (!(this._modifiable.equals(temp._modifiable)))
+ return false;
+ }
+ else if (temp._modifiable != null)
return false;
if (this._alignmentAnnotationList != null) {
if (temp._alignmentAnnotationList == null) return false;
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
+ * referencing
*
*
* @return String
} //-- java.lang.String getId()
/**
- * Returns the value of field 'modifiable'. The field
- * 'modifiable' has the following description: objects with
- * modifiable=false will
- * not be modified by a vamsas client
- * update
- *
+ * Returns the value of field 'modifiable'.
*
- * @return boolean
+ * @return String
* @return the value of field 'modifiable'.
*/
- public boolean getModifiable()
+ public java.lang.String getModifiable()
{
return this._modifiable;
- } //-- boolean getModifiable()
+ } //-- java.lang.String getModifiable()
/**
* Method getProperty
} //-- boolean hasAligned()
/**
- * Method hasModifiable
- *
- *
- *
- * @return boolean
- */
- public boolean hasModifiable()
- {
- return this._has_modifiable;
- } //-- boolean hasModifiable()
-
- /**
* Method isValid
*
*
/**
* Sets the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
+ * referencing
*
*
* @param id the value of field 'id'.
} //-- void setId(java.lang.String)
/**
- * Sets the value of field 'modifiable'. The field 'modifiable'
- * has the following description: objects with modifiable=false
- * will
- * not be modified by a vamsas client
- * update
- *
+ * Sets the value of field 'modifiable'.
*
* @param modifiable the value of field 'modifiable'.
*/
- public void setModifiable(boolean modifiable)
+ public void setModifiable(java.lang.String modifiable)
{
this._modifiable = modifiable;
- this._has_modifiable = true;
- } //-- void setModifiable(boolean)
+ } //-- void setModifiable(java.lang.String)
/**
* Method setProperty
import org.xml.sax.ContentHandler;\r
\r
/**\r
- * This is annotation over the\r
- * coordinate frame defined by all\r
- * the columns in the alignment.\r
+ * This is annotation over the coordinate frame\r
+ * defined by all the columns in the alignment.\r
* \r
* \r
* @version $Revision$ $Date$\r
//--------------------------/\r
\r
/**\r
- * TODO: decide if\r
- * this flag is\r
- * redundant - when\r
- * true it would\r
- * suggest that the\r
- * annotationElement\r
- * values together\r
- * form a graph\r
- * \r
+ * TODO: decide if this flag is\r
+ * redundant - when true it would suggest that\r
+ * the annotationElement values together form a\r
+ * graph \r
*/\r
private boolean _graph;\r
\r
\r
/**\r
* Returns the value of field 'graph'. The field 'graph' has\r
- * the following description: TODO: decide if\r
- * this flag is\r
- * redundant - when\r
- * true it would\r
- * suggest that the\r
- * annotationElement\r
- * values together\r
- * form a graph\r
- * \r
+ * the following description: TODO: decide if this flag is\r
+ * redundant - when true it would suggest that\r
+ * the annotationElement values together form a\r
+ * graph \r
* \r
* @return boolean\r
* @return the value of field 'graph'.\r
\r
/**\r
* Sets the value of field 'graph'. The field 'graph' has the\r
- * following description: TODO: decide if\r
- * this flag is\r
- * redundant - when\r
- * true it would\r
- * suggest that the\r
- * annotationElement\r
- * values together\r
- * form a graph\r
- * \r
+ * following description: TODO: decide if this flag is\r
+ * redundant - when true it would suggest that\r
+ * the annotationElement values together form a\r
+ * graph \r
* \r
* @param graph the value of field 'graph'.\r
*/\r
}
desc.setValidator(fieldValidator);
//-- _modifiable
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Alignment target = (Alignment) object;
- if(!target.hasModifiable())
- return null;
- return (target.getModifiable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ return target.getModifiable();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Alignment target = (Alignment) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteModifiable();
- return;
- }
- target.setModifiable( ((java.lang.Boolean)value).booleanValue());
+ target.setModifiable( (java.lang.String) value);
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
//-- validation code for: _modifiable
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- BooleanValidator typeValidator = new BooleanValidator();
+ StringValidator typeValidator = new StringValidator();
+ typeValidator.setWhiteSpace("preserve");
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
//--------------------------/
/**
- * Primary Key for
- * vamsas object
- * referencing
- *
+ * Primary Key for vamsas object
+ * referencing
*/
private java.lang.String _id;
/**
- * Dataset Sequence
- * from which this
- * alignment
- * sequence is
- * taken from
+ * Dataset Sequence from which
+ * this alignment sequence is taken from
*
*/
private java.lang.Object _refid;
/**
* Returns the value of field 'id'. The field 'id' has the
- * following description: Primary Key for
- * vamsas object
- * referencing
- *
+ * following description: Primary Key for vamsas object
+ * referencing
*
* @return String
* @return the value of field 'id'.
/**
* Returns the value of field 'refid'. The field 'refid' has
- * the following description: Dataset Sequence
- * from which this
- * alignment
- * sequence is
- * taken from
+ * the following description: Dataset Sequence from which
+ * this alignment sequence is taken from
*
*
* @return Object
/**
* Sets the value of field 'id'. The field 'id' has the
- * following description: Primary Key for
- * vamsas object
- * referencing
- *
+ * following description: Primary Key for vamsas object
+ * referencing
*
* @param id the value of field 'id'.
*/
/**
* Sets the value of field 'refid'. The field 'refid' has the
- * following description: Dataset Sequence
- * from which this
- * alignment
- * sequence is
- * taken from
+ * following description: Dataset Sequence from which
+ * this alignment sequence is taken from
*
*
* @param refid the value of field 'refid'.
\r
/**\r
* TODO:\r
- * decide\r
- * if\r
- * this\r
- * flag\r
- * is\r
- * redundant\r
- * -\r
- * when\r
- * true\r
- * it\r
- * would\r
- * suggest\r
- * that\r
- * the\r
- * annotationElement\r
- * values\r
- * together\r
- * form\r
- * a\r
- * graph\r
+ * decide if this flag is\r
+ * redundant - when true it\r
+ * would suggest that the\r
+ * annotationElement values\r
+ * together form a graph\r
* \r
*/\r
private boolean _graph;\r
/**\r
* Returns the value of field 'graph'. The field 'graph' has\r
* the following description: TODO:\r
- * decide\r
- * if\r
- * this\r
- * flag\r
- * is\r
- * redundant\r
- * -\r
- * when\r
- * true\r
- * it\r
- * would\r
- * suggest\r
- * that\r
- * the\r
- * annotationElement\r
- * values\r
- * together\r
- * form\r
- * a\r
- * graph\r
+ * decide if this flag is\r
+ * redundant - when true it\r
+ * would suggest that the\r
+ * annotationElement values\r
+ * together form a graph\r
* \r
* \r
* @return boolean\r
/**\r
* Sets the value of field 'graph'. The field 'graph' has the\r
* following description: TODO:\r
- * decide\r
- * if\r
- * this\r
- * flag\r
- * is\r
- * redundant\r
- * -\r
- * when\r
- * true\r
- * it\r
- * would\r
- * suggest\r
- * that\r
- * the\r
- * annotationElement\r
- * values\r
- * together\r
- * form\r
- * a\r
- * graph\r
+ * decide if this flag is\r
+ * redundant - when true it\r
+ * would suggest that the\r
+ * annotationElement values\r
+ * together form a graph\r
* \r
* \r
* @param graph the value of field 'graph'.\r
//--------------------------/
/**
- * position with respect to the coordinate frame
- * defined by a rangeType specification
- *
+ * position with respect to the coordinate frame defined by a
+ * rangeType specification
*/
private int _position;
private boolean _has_position;
/**
- * true means the annotation element appears
- * between the specified position and the next
- *
+ * true means the annotation element appears between the
+ * specified position and the next
*/
private boolean _after = false;
private boolean _has_after;
/**
- * Primary Key for vamsas object referencing
- *
+ * Primary Key for vamsas object referencing
*/
private java.lang.String _id;
/**
- * Free text at this position
- *
+ * Free text at this position
*/
private java.lang.String _description;
/**
- * Discrete symbol - possibly graphically
- * represented
+ * Discrete symbol - possibly graphically represented
*
*/
private java.util.Vector _glyphList;
/**
- * Ordered set of float values - an application
- * may treat the values together as a vector
- * with common support for a set of annotation
- * elements - but this is, again, not validated
- * so applications should deal gracefully with
- * varying numbers of dimensions
+ * Ordered set of float values - an application may treat
+ * the values together as a vector with common support for a
+ * set of
+ * annotation elements - but this is, again, not validated so
+ * applications
+ * should deal gracefully with varying numbers of dimensions
*
*/
private java.util.Vector _valueList;
/**
* Returns the value of field 'after'. The field 'after' has
* the following description: true means the annotation element
- * appears
- * between the specified position and the next
- *
+ * appears between the
+ * specified position and the next
*
* @return boolean
* @return the value of field 'after'.
/**
* Returns the value of field 'description'. The field
* 'description' has the following description: Free text at
- * this position
- *
+ * this position
*
* @return String
* @return the value of field 'description'.
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
- *
+ * referencing
*
* @return String
* @return the value of field 'id'.
/**
* Returns the value of field 'position'. The field 'position'
* has the following description: position with respect to the
- * coordinate frame
- * defined by a rangeType specification
- *
+ * coordinate frame defined by a
+ * rangeType specification
*
* @return int
* @return the value of field 'position'.
/**
* Sets the value of field 'after'. The field 'after' has the
* following description: true means the annotation element
- * appears
- * between the specified position and the next
- *
+ * appears between the
+ * specified position and the next
*
* @param after the value of field 'after'.
*/
/**
* Sets the value of field 'description'. The field
* 'description' has the following description: Free text at
- * this position
- *
+ * this position
*
* @param description the value of field 'description'.
*/
/**
* Sets the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
- *
+ * referencing
*
* @param id the value of field 'id'.
*/
/**
* Sets the value of field 'position'. The field 'position' has
* the following description: position with respect to the
- * coordinate frame
- * defined by a rangeType specification
- *
+ * coordinate frame defined by a
+ * rangeType specification
*
* @param position the value of field 'position'.
*/
//--------------------------/
/**
- * Version string describing the application specific data
- * storage version used
+ * Version string describing the application specific
+ * data storage version used
*/
private java.lang.String _version;
/**
- * Canonical name of application
- *
+ * Canonical name of application
*/
private java.lang.String _name;
/**
* Returns the value of field 'name'. The field 'name' has the
- * following description: Canonical name of application
- *
+ * following description: Canonical name of application
*
* @return String
* @return the value of field 'name'.
/**
* Returns the value of field 'version'. The field 'version'
* has the following description: Version string describing the
- * application specific data storage version used
+ * application specific
+ * data storage version used
*
* @return String
* @return the value of field 'version'.
/**
* Sets the value of field 'name'. The field 'name' has the
- * following description: Canonical name of application
- *
+ * following description: Canonical name of application
*
* @param name the value of field 'name'.
*/
/**
* Sets the value of field 'version'. The field 'version' has
* the following description: Version string describing the
- * application specific data storage version used
+ * application specific
+ * data storage version used
*
* @param version the value of field 'version'.
*/
//--------------------------/\r
\r
/**\r
- * true implies data will be decompresses\r
- * with Zip before presenting to\r
- * application\r
- * \r
+ * true implies data will be decompresses with Zip\r
+ * before presenting to application \r
*/\r
private boolean _compressed = false;\r
\r
private boolean _has_compressed;\r
\r
/**\r
- * Type of arbitrary data - TODO: decide\r
- * format - use (extended) MIME types ?\r
- * \r
+ * Type of arbitrary data - TODO: decide format - use\r
+ * (extended) MIME types ? \r
*/\r
private java.lang.String _type;\r
\r
/**\r
- * Object the arbitrary data is associated\r
- * with\r
+ * Object the arbitrary data is associated with\r
* \r
*/\r
private java.lang.Object _objectref;\r
\r
/**\r
- * Primary Key for vamsas object\r
- * referencing\r
+ * Primary Key for vamsas object referencing\r
* \r
*/\r
private java.lang.String _id;\r
/**\r
* Returns the value of field 'compressed'. The field\r
* 'compressed' has the following description: true implies\r
- * data will be decompresses\r
- * with Zip before presenting to\r
- * application\r
- * \r
+ * data will be decompresses with Zip\r
+ * before presenting to application \r
* \r
* @return boolean\r
* @return the value of field 'compressed'.\r
/**\r
* Returns the value of field 'id'. The field 'id' has the\r
* following description: Primary Key for vamsas object\r
- * referencing\r
+ * referencing\r
* \r
* \r
* @return String\r
/**\r
* Returns the value of field 'objectref'. The field\r
* 'objectref' has the following description: Object the\r
- * arbitrary data is associated\r
- * with\r
+ * arbitrary data is associated with\r
* \r
* \r
* @return Object\r
/**\r
* Returns the value of field 'type'. The field 'type' has the\r
* following description: Type of arbitrary data - TODO: decide\r
- * format - use (extended) MIME types ?\r
- * \r
+ * format - use\r
+ * (extended) MIME types ? \r
* \r
* @return String\r
* @return the value of field 'type'.\r
/**\r
* Sets the value of field 'compressed'. The field 'compressed'\r
* has the following description: true implies data will be\r
- * decompresses\r
- * with Zip before presenting to\r
- * application\r
- * \r
+ * decompresses with Zip\r
+ * before presenting to application \r
* \r
* @param compressed the value of field 'compressed'.\r
*/\r
/**\r
* Sets the value of field 'id'. The field 'id' has the\r
* following description: Primary Key for vamsas object\r
- * referencing\r
+ * referencing\r
* \r
* \r
* @param id the value of field 'id'.\r
/**\r
* Sets the value of field 'objectref'. The field 'objectref'\r
* has the following description: Object the arbitrary data is\r
- * associated\r
- * with\r
+ * associated with\r
* \r
* \r
* @param objectref the value of field 'objectref'.\r
/**\r
* Sets the value of field 'type'. The field 'type' has the\r
* following description: Type of arbitrary data - TODO: decide\r
- * format - use (extended) MIME types ?\r
- * \r
+ * format - use\r
+ * (extended) MIME types ? \r
* \r
* @param type the value of field 'type'.\r
*/\r
//--------------------------/
/**
- * Primary Key for vamsas object referencing
- *
+ * Primary Key for vamsas object referencing
*/
private java.lang.String _id;
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
- *
+ * referencing
*
* @return String
* @return the value of field 'id'.
/**
* Sets the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
- *
+ * referencing
*
* @param id the value of field 'id'.
*/
//--------------------------/
/**
- * annotation is associated
- * with a particular dataset
- * sequence
- *
+ * annotation is associated with a
+ * particular dataset sequence
*/
private java.lang.Object _seqRef;
/**
* Returns the value of field 'seqRef'. The field 'seqRef' has
- * the following description: annotation is associated
- * with a particular dataset
- * sequence
- *
+ * the following description: annotation is associated with a
+ * particular dataset sequence
*
* @return Object
* @return the value of field 'seqRef'.
/**
* Sets the value of field 'seqRef'. The field 'seqRef' has the
- * following description: annotation is associated
- * with a particular dataset
- * sequence
- *
+ * following description: annotation is associated with a
+ * particular dataset sequence
*
* @param seqRef the value of field 'seqRef'.
*/
import org.xml.sax.ContentHandler;
/**
- * Store a list of database
- * references for this
- * sequence record - with
- * optional mapping from
- * database sequence to the
- * given sequence record
- *
+ * Store a list of database references
+ * for this sequence record - with optional mapping
+ * from database sequence to the given sequence record
*
* @version $Revision$ $Date$
*/
//--------------------------/
/**
- * TODO Database
- * Naming
- * Convention:
- * either start
- * using LSID (so
- * change type to
- * URI) or leave
- * this as an
- * uncontrolled/unspecified
- * string ID
+ * TODO Database Naming
+ * Convention: either start using LSID (so
+ * change type to URI) or leave this as an
+ * uncontrolled/unspecified string ID
*
*/
private java.lang.String _source;
/**
- * Version must be
- * specified -
+ * Version must be specified -
*
*/
private java.lang.String _version;
/**
- * TODO: make some
- * specification of
- * the database
- * field from which
- * this accessionId
- * is taken from -
- * should that be a
- * special property
- * of the dbRef
- * object ?
+ * TODO: make some specification
+ * of the database field from which this
+ * accessionId is taken from - should that be a
+ * special property of the dbRef object ?
*
*/
private java.lang.String _accessionId;
/**
- * Primary Key for
- * vamsas object
- * referencing
- *
+ * Primary Key for vamsas object
+ * referencing
*/
private java.lang.String _id;
/**
- * Field _mapList
+ * From: Offset to first
+ * position in dataset sequence record that
+ * this database entry maps to To: Offset
+ * to last position in dataset sequence
+ * record that this database entry maps to
+ * Start: Offset to first last position in
+ * database entry that first (or offset)
+ * position in sequence maps to End: Offset
+ * to last position in database entry that
+ * last (offset) position in sequence maps
+ * to
*/
private java.util.Vector _mapList;
/**
* Returns the value of field 'accessionId'. The field
* 'accessionId' has the following description: TODO: make some
- * specification of
- * the database
- * field from which
- * this accessionId
- * is taken from -
- * should that be a
- * special property
- * of the dbRef
- * object ?
+ * specification
+ * of the database field from which this
+ * accessionId is taken from - should that be a
+ * special property of the dbRef object ?
*
*
* @return String
/**
* Returns the value of field 'id'. The field 'id' has the
- * following description: Primary Key for
- * vamsas object
- * referencing
- *
+ * following description: Primary Key for vamsas object
+ * referencing
*
* @return String
* @return the value of field 'id'.
/**
* Returns the value of field 'source'. The field 'source' has
- * the following description: TODO Database
- * Naming
- * Convention:
- * either start
- * using LSID (so
- * change type to
- * URI) or leave
- * this as an
- * uncontrolled/unspecified
- * string ID
+ * the following description: TODO Database Naming
+ * Convention: either start using LSID (so
+ * change type to URI) or leave this as an
+ * uncontrolled/unspecified string ID
*
*
* @return String
/**
* Returns the value of field 'version'. The field 'version'
- * has the following description: Version must be
- * specified -
+ * has the following description: Version must be specified -
*
*
* @return String
/**
* Sets the value of field 'accessionId'. The field
* 'accessionId' has the following description: TODO: make some
- * specification of
- * the database
- * field from which
- * this accessionId
- * is taken from -
- * should that be a
- * special property
- * of the dbRef
- * object ?
+ * specification
+ * of the database field from which this
+ * accessionId is taken from - should that be a
+ * special property of the dbRef object ?
*
*
* @param accessionId the value of field 'accessionId'.
/**
* Sets the value of field 'id'. The field 'id' has the
- * following description: Primary Key for
- * vamsas object
- * referencing
- *
+ * following description: Primary Key for vamsas object
+ * referencing
*
* @param id the value of field 'id'.
*/
/**
* Sets the value of field 'source'. The field 'source' has the
- * following description: TODO Database
- * Naming
- * Convention:
- * either start
- * using LSID (so
- * change type to
- * URI) or leave
- * this as an
- * uncontrolled/unspecified
- * string ID
+ * following description: TODO Database Naming
+ * Convention: either start using LSID (so
+ * change type to URI) or leave this as an
+ * uncontrolled/unspecified string ID
*
*
* @param source the value of field 'source'.
/**
* Sets the value of field 'version'. The field 'version' has
- * the following description: Version must be
- * specified -
+ * the following description: Version must be specified -
*
*
* @param version the value of field 'version'.
//--------------------------/
/**
- * Primary Key for vamsas object
- * referencing
+ * Primary Key for vamsas object referencing
*
*/
private java.lang.String _id;
/**
- * Who
- *
+ * Who
*/
private java.lang.String _user;
/**
- * With which application
- *
+ * With which application
*/
private java.lang.String _app;
/**
- * Did what
- *
+ * Did what
*/
private java.lang.String _action;
/**
- * When
- *
+ * When
*/
private org.exolab.castor.types.Date _date;
/**
- * additional information
- *
+ * additional information
*/
private java.util.Vector _propertyList;
/**
- * parameter for the action
- *
+ * parameter for the action
*/
private java.util.Vector _paramList;
/**
- * bioinformatic objects input to
- * action
+ * bioinformatic objects input to action
*
*/
private java.util.Vector _inputList;
/**
* Returns the value of field 'action'. The field 'action' has
- * the following description: Did what
- *
+ * the following description: Did what
*
* @return String
* @return the value of field 'action'.
/**
* Returns the value of field 'app'. The field 'app' has the
- * following description: With which application
- *
+ * following description: With which application
*
* @return String
* @return the value of field 'app'.
/**
* Returns the value of field 'date'. The field 'date' has the
- * following description: When
- *
+ * following description: When
*
* @return Date
* @return the value of field 'date'.
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
+ * referencing
*
*
* @return String
/**
* Returns the value of field 'user'. The field 'user' has the
- * following description: Who
- *
+ * following description: Who
*
* @return String
* @return the value of field 'user'.
/**
* Sets the value of field 'action'. The field 'action' has the
- * following description: Did what
- *
+ * following description: Did what
*
* @param action the value of field 'action'.
*/
/**
* Sets the value of field 'app'. The field 'app' has the
- * following description: With which application
- *
+ * following description: With which application
*
* @param app the value of field 'app'.
*/
/**
* Sets the value of field 'date'. The field 'date' has the
- * following description: When
- *
+ * following description: When
*
* @param date the value of field 'date'.
*/
/**
* Sets the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
+ * referencing
*
*
* @param id the value of field 'id'.
/**
* Sets the value of field 'user'. The field 'user' has the
- * following description: Who
- *
+ * following description: Who
*
* @param user the value of field 'user'.
*/
import org.xml.sax.ContentHandler;\r
\r
/**\r
- * Discrete symbol - possibly graphically\r
- * represented\r
+ * Discrete symbol - possibly graphically represented\r
* \r
* \r
* @version $Revision$ $Date$\r
private java.lang.String _content = "";\r
\r
/**\r
- * specifies the symbol\r
- * dictionary for this glyph -\r
- * eg utf8 (the default),\r
- * aasecstr_3 or\r
- * kd_hydrophobicity - the\r
- * content is not validated so\r
- * applications must ensure\r
- * they gracefully deal with\r
- * invalid entries here\r
- * \r
+ * specifies the symbol dictionary for this\r
+ * glyph - eg utf8 (the default), aasecstr_3 or\r
+ * kd_hydrophobicity - the content is not validated so\r
+ * applications must ensure they gracefully deal with\r
+ * invalid entries here \r
*/\r
private java.lang.String _dict = "utf8";\r
\r
\r
/**\r
* Returns the value of field 'dict'. The field 'dict' has the\r
- * following description: specifies the symbol\r
- * dictionary for this glyph -\r
- * eg utf8 (the default),\r
- * aasecstr_3 or\r
- * kd_hydrophobicity - the\r
- * content is not validated so\r
- * applications must ensure\r
- * they gracefully deal with\r
- * invalid entries here\r
- * \r
+ * following description: specifies the symbol dictionary for\r
+ * this\r
+ * glyph - eg utf8 (the default), aasecstr_3 or\r
+ * kd_hydrophobicity - the content is not validated so\r
+ * applications must ensure they gracefully deal with\r
+ * invalid entries here \r
* \r
* @return String\r
* @return the value of field 'dict'.\r
\r
/**\r
* Sets the value of field 'dict'. The field 'dict' has the\r
- * following description: specifies the symbol\r
- * dictionary for this glyph -\r
- * eg utf8 (the default),\r
- * aasecstr_3 or\r
- * kd_hydrophobicity - the\r
- * content is not validated so\r
- * applications must ensure\r
- * they gracefully deal with\r
- * invalid entries here\r
- * \r
+ * following description: specifies the symbol dictionary for\r
+ * this\r
+ * glyph - eg utf8 (the default), aasecstr_3 or\r
+ * kd_hydrophobicity - the content is not validated so\r
+ * applications must ensure they gracefully deal with\r
+ * invalid entries here \r
* \r
* @param dict the value of field 'dict'.\r
*/\r
private java.lang.String _name;\r
\r
/**\r
- * Reference Frame for rangeType\r
- * specfication\r
+ * Reference Frame for rangeType specfication\r
* \r
*/\r
private java.lang.Object _objRef;\r
/**\r
* Returns the value of field 'objRef'. The field 'objRef' has\r
* the following description: Reference Frame for rangeType\r
- * specfication\r
+ * specfication\r
* \r
* \r
* @return Object\r
/**\r
* Sets the value of field 'objRef'. The field 'objRef' has the\r
* following description: Reference Frame for rangeType\r
- * specfication\r
+ * specfication\r
* \r
* \r
* @param objRef the value of field 'objRef'.\r
import org.xml.sax.ContentHandler;\r
\r
/**\r
- * Class Map.\r
+ * From: Offset to first\r
+ * position in dataset sequence record that\r
+ * this database entry maps to To: Offset\r
+ * to last position in dataset sequence\r
+ * record that this database entry maps to\r
+ * Start: Offset to first last position in\r
+ * database entry that first (or offset)\r
+ * position in sequence maps to End: Offset\r
+ * to last position in database entry that\r
+ * last (offset) position in sequence maps\r
+ * to \r
* \r
* @version $Revision$ $Date$\r
*/\r
-public class Map extends org.vamsas.client.Vobject \r
+public class Map extends org.vamsas.objects.core.MapList \r
implements java.io.Serializable\r
{\r
\r
\r
- //--------------------------/\r
- //- Class/Member Variables -/\r
- //--------------------------/\r
-\r
- /**\r
- * Offset\r
- * to\r
- * first\r
- * position\r
- * in\r
- * dataset\r
- * sequence\r
- * record\r
- * that\r
- * this\r
- * database\r
- * entry\r
- * maps\r
- * to\r
- * \r
- */\r
- private int _from = 0;\r
-\r
- /**\r
- * keeps track of state for field: _from\r
- */\r
- private boolean _has_from;\r
-\r
- /**\r
- * Offset\r
- * to\r
- * last\r
- * position\r
- * in\r
- * dataset\r
- * sequence\r
- * record\r
- * that\r
- * this\r
- * database\r
- * entry\r
- * maps\r
- * to\r
- * \r
- */\r
- private int _to = 0;\r
-\r
- /**\r
- * keeps track of state for field: _to\r
- */\r
- private boolean _has_to;\r
-\r
- /**\r
- * Offset\r
- * to first\r
- * last\r
- * position\r
- * in\r
- * database\r
- * entry\r
- * that\r
- * first\r
- * (or\r
- * offset)\r
- * position\r
- * in\r
- * sequence\r
- * maps to\r
- * \r
- */\r
- private int _start;\r
-\r
- /**\r
- * keeps track of state for field: _start\r
- */\r
- private boolean _has_start;\r
-\r
- /**\r
- * Offset\r
- * to last\r
- * position\r
- * in\r
- * database\r
- * entry\r
- * that\r
- * last\r
- * (offset)\r
- * position\r
- * in\r
- * sequence\r
- * maps to\r
- * \r
- */\r
- private int _end;\r
-\r
- /**\r
- * keeps track of state for field: _end\r
- */\r
- private boolean _has_end;\r
-\r
-\r
//----------------/\r
//- Constructors -/\r
//----------------/\r
//-----------/\r
\r
/**\r
- * Method deleteEnd\r
- * \r
- */\r
- public void deleteEnd()\r
- {\r
- this._has_end= false;\r
- } //-- void deleteEnd() \r
-\r
- /**\r
- * Method deleteFrom\r
- * \r
- */\r
- public void deleteFrom()\r
- {\r
- this._has_from= false;\r
- } //-- void deleteFrom() \r
-\r
- /**\r
- * Method deleteStart\r
- * \r
- */\r
- public void deleteStart()\r
- {\r
- this._has_start= false;\r
- } //-- void deleteStart() \r
-\r
- /**\r
- * Method deleteTo\r
- * \r
- */\r
- public void deleteTo()\r
- {\r
- this._has_to= false;\r
- } //-- void deleteTo() \r
-\r
- /**\r
* Note: hashCode() has not been overriden\r
* \r
* @param obj\r
if (obj instanceof Map) {\r
\r
Map temp = (Map)obj;\r
- if (this._from != temp._from)\r
- return false;\r
- if (this._has_from != temp._has_from)\r
- return false;\r
- if (this._to != temp._to)\r
- return false;\r
- if (this._has_to != temp._has_to)\r
- return false;\r
- if (this._start != temp._start)\r
- return false;\r
- if (this._has_start != temp._has_start)\r
- return false;\r
- if (this._end != temp._end)\r
- return false;\r
- if (this._has_end != temp._has_end)\r
- return false;\r
return true;\r
}\r
return false;\r
} //-- boolean equals(java.lang.Object) \r
\r
/**\r
- * Returns the value of field 'end'. The field 'end' has the\r
- * following description: Offset\r
- * to last\r
- * position\r
- * in\r
- * database\r
- * entry\r
- * that\r
- * last\r
- * (offset)\r
- * position\r
- * in\r
- * sequence\r
- * maps to\r
- * \r
- * \r
- * @return int\r
- * @return the value of field 'end'.\r
- */\r
- public int getEnd()\r
- {\r
- return this._end;\r
- } //-- int getEnd() \r
-\r
- /**\r
- * Returns the value of field 'from'. The field 'from' has the\r
- * following description: Offset\r
- * to\r
- * first\r
- * position\r
- * in\r
- * dataset\r
- * sequence\r
- * record\r
- * that\r
- * this\r
- * database\r
- * entry\r
- * maps\r
- * to\r
- * \r
- * \r
- * @return int\r
- * @return the value of field 'from'.\r
- */\r
- public int getFrom()\r
- {\r
- return this._from;\r
- } //-- int getFrom() \r
-\r
- /**\r
- * Returns the value of field 'start'. The field 'start' has\r
- * the following description: Offset\r
- * to first\r
- * last\r
- * position\r
- * in\r
- * database\r
- * entry\r
- * that\r
- * first\r
- * (or\r
- * offset)\r
- * position\r
- * in\r
- * sequence\r
- * maps to\r
- * \r
- * \r
- * @return int\r
- * @return the value of field 'start'.\r
- */\r
- public int getStart()\r
- {\r
- return this._start;\r
- } //-- int getStart() \r
-\r
- /**\r
- * Returns the value of field 'to'. The field 'to' has the\r
- * following description: Offset\r
- * to\r
- * last\r
- * position\r
- * in\r
- * dataset\r
- * sequence\r
- * record\r
- * that\r
- * this\r
- * database\r
- * entry\r
- * maps\r
- * to\r
- * \r
- * \r
- * @return int\r
- * @return the value of field 'to'.\r
- */\r
- public int getTo()\r
- {\r
- return this._to;\r
- } //-- int getTo() \r
-\r
- /**\r
- * Method hasEnd\r
- * \r
- * \r
- * \r
- * @return boolean\r
- */\r
- public boolean hasEnd()\r
- {\r
- return this._has_end;\r
- } //-- boolean hasEnd() \r
-\r
- /**\r
- * Method hasFrom\r
- * \r
- * \r
- * \r
- * @return boolean\r
- */\r
- public boolean hasFrom()\r
- {\r
- return this._has_from;\r
- } //-- boolean hasFrom() \r
-\r
- /**\r
- * Method hasStart\r
- * \r
- * \r
- * \r
- * @return boolean\r
- */\r
- public boolean hasStart()\r
- {\r
- return this._has_start;\r
- } //-- boolean hasStart() \r
-\r
- /**\r
- * Method hasTo\r
- * \r
- * \r
- * \r
- * @return boolean\r
- */\r
- public boolean hasTo()\r
- {\r
- return this._has_to;\r
- } //-- boolean hasTo() \r
-\r
- /**\r
* Method isValid\r
* \r
* \r
} //-- void marshal(org.xml.sax.ContentHandler) \r
\r
/**\r
- * Sets the value of field 'end'. The field 'end' has the\r
- * following description: Offset\r
- * to last\r
- * position\r
- * in\r
- * database\r
- * entry\r
- * that\r
- * last\r
- * (offset)\r
- * position\r
- * in\r
- * sequence\r
- * maps to\r
- * \r
- * \r
- * @param end the value of field 'end'.\r
- */\r
- public void setEnd(int end)\r
- {\r
- this._end = end;\r
- this._has_end = true;\r
- } //-- void setEnd(int) \r
-\r
- /**\r
- * Sets the value of field 'from'. The field 'from' has the\r
- * following description: Offset\r
- * to\r
- * first\r
- * position\r
- * in\r
- * dataset\r
- * sequence\r
- * record\r
- * that\r
- * this\r
- * database\r
- * entry\r
- * maps\r
- * to\r
- * \r
- * \r
- * @param from the value of field 'from'.\r
- */\r
- public void setFrom(int from)\r
- {\r
- this._from = from;\r
- this._has_from = true;\r
- } //-- void setFrom(int) \r
-\r
- /**\r
- * Sets the value of field 'start'. The field 'start' has the\r
- * following description: Offset\r
- * to first\r
- * last\r
- * position\r
- * in\r
- * database\r
- * entry\r
- * that\r
- * first\r
- * (or\r
- * offset)\r
- * position\r
- * in\r
- * sequence\r
- * maps to\r
- * \r
- * \r
- * @param start the value of field 'start'.\r
- */\r
- public void setStart(int start)\r
- {\r
- this._start = start;\r
- this._has_start = true;\r
- } //-- void setStart(int) \r
-\r
- /**\r
- * Sets the value of field 'to'. The field 'to' has the\r
- * following description: Offset\r
- * to\r
- * last\r
- * position\r
- * in\r
- * dataset\r
- * sequence\r
- * record\r
- * that\r
- * this\r
- * database\r
- * entry\r
- * maps\r
- * to\r
- * \r
- * \r
- * @param to the value of field 'to'.\r
- */\r
- public void setTo(int to)\r
- {\r
- this._to = to;\r
- this._has_to = true;\r
- } //-- void setTo(int) \r
-\r
- /**\r
* Method unmarshal\r
* \r
* \r
* \r
* @param reader\r
- * @return Map\r
+ * @return MapList\r
*/\r
- public static org.vamsas.objects.core.Map unmarshal(java.io.Reader reader)\r
+ public static org.vamsas.objects.core.MapList unmarshal(java.io.Reader reader)\r
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
{\r
return (org.vamsas.objects.core.Map) Unmarshaller.unmarshal(org.vamsas.objects.core.Map.class, reader);\r
- } //-- org.vamsas.objects.core.Map unmarshal(java.io.Reader) \r
+ } //-- org.vamsas.objects.core.MapList unmarshal(java.io.Reader) \r
\r
/**\r
* Method validate\r
* \r
* @version $Revision$ $Date$\r
*/\r
-public class MapDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+public class MapDescriptor extends org.vamsas.objects.core.MapListDescriptor {\r
\r
\r
//--------------------------/\r
public MapDescriptor() \r
{\r
super();\r
+ setExtendsWithoutFlatten(new org.vamsas.objects.core.MapListDescriptor());\r
nsURI = "http://www.vamsas.org";\r
xmlName = "map";\r
- org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
- org.exolab.castor.mapping.FieldHandler handler = null;\r
- org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
- //-- initialize attribute descriptors\r
- \r
- //-- _from\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_from", "from", org.exolab.castor.xml.NodeType.Attribute);\r
- handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
- public java.lang.Object getValue( java.lang.Object object ) \r
- throws IllegalStateException\r
- {\r
- Map target = (Map) object;\r
- if(!target.hasFrom())\r
- return null;\r
- return new java.lang.Integer(target.getFrom());\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- Map target = (Map) object;\r
- // if null, use delete method for optional primitives \r
- if (value == null) {\r
- target.deleteFrom();\r
- return;\r
- }\r
- target.setFrom( ((java.lang.Integer)value).intValue());\r
- }\r
- catch (java.lang.Exception ex) {\r
- throw new IllegalStateException(ex.toString());\r
- }\r
- }\r
- public java.lang.Object newInstance( java.lang.Object parent ) {\r
- return null;\r
- }\r
- };\r
- desc.setHandler(handler);\r
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _from\r
- fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
- { //-- local scope\r
- IntegerValidator typeValidator = new IntegerValidator();\r
- fieldValidator.setValidator(typeValidator);\r
- }\r
- desc.setValidator(fieldValidator);\r
- //-- _to\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_to", "to", org.exolab.castor.xml.NodeType.Attribute);\r
- handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
- public java.lang.Object getValue( java.lang.Object object ) \r
- throws IllegalStateException\r
- {\r
- Map target = (Map) object;\r
- if(!target.hasTo())\r
- return null;\r
- return new java.lang.Integer(target.getTo());\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- Map target = (Map) object;\r
- // if null, use delete method for optional primitives \r
- if (value == null) {\r
- target.deleteTo();\r
- return;\r
- }\r
- target.setTo( ((java.lang.Integer)value).intValue());\r
- }\r
- catch (java.lang.Exception ex) {\r
- throw new IllegalStateException(ex.toString());\r
- }\r
- }\r
- public java.lang.Object newInstance( java.lang.Object parent ) {\r
- return null;\r
- }\r
- };\r
- desc.setHandler(handler);\r
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _to\r
- fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
- { //-- local scope\r
- IntegerValidator typeValidator = new IntegerValidator();\r
- fieldValidator.setValidator(typeValidator);\r
- }\r
- desc.setValidator(fieldValidator);\r
- //-- _start\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute);\r
- handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
- public java.lang.Object getValue( java.lang.Object object ) \r
- throws IllegalStateException\r
- {\r
- Map target = (Map) object;\r
- if(!target.hasStart())\r
- return null;\r
- return new java.lang.Integer(target.getStart());\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- Map target = (Map) object;\r
- // ignore null values for non optional primitives\r
- if (value == null) return;\r
- \r
- target.setStart( ((java.lang.Integer)value).intValue());\r
- }\r
- catch (java.lang.Exception ex) {\r
- throw new IllegalStateException(ex.toString());\r
- }\r
- }\r
- public java.lang.Object newInstance( java.lang.Object parent ) {\r
- return null;\r
- }\r
- };\r
- desc.setHandler(handler);\r
- desc.setRequired(true);\r
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _start\r
- fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
- fieldValidator.setMinOccurs(1);\r
- { //-- local scope\r
- IntegerValidator typeValidator = new IntegerValidator();\r
- fieldValidator.setValidator(typeValidator);\r
- }\r
- desc.setValidator(fieldValidator);\r
- //-- _end\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);\r
- handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
- public java.lang.Object getValue( java.lang.Object object ) \r
- throws IllegalStateException\r
- {\r
- Map target = (Map) object;\r
- if(!target.hasEnd())\r
- return null;\r
- return new java.lang.Integer(target.getEnd());\r
- }\r
- public void setValue( java.lang.Object object, java.lang.Object value) \r
- throws IllegalStateException, IllegalArgumentException\r
- {\r
- try {\r
- Map target = (Map) object;\r
- // ignore null values for non optional primitives\r
- if (value == null) return;\r
- \r
- target.setEnd( ((java.lang.Integer)value).intValue());\r
- }\r
- catch (java.lang.Exception ex) {\r
- throw new IllegalStateException(ex.toString());\r
- }\r
- }\r
- public java.lang.Object newInstance( java.lang.Object parent ) {\r
- return null;\r
- }\r
- };\r
- desc.setHandler(handler);\r
- desc.setRequired(true);\r
- desc.setMultivalued(false);\r
- addFieldDescriptor(desc);\r
- \r
- //-- validation code for: _end\r
- fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
- fieldValidator.setMinOccurs(1);\r
- { //-- local scope\r
- IntegerValidator typeValidator = new IntegerValidator();\r
- fieldValidator.setValidator(typeValidator);\r
- }\r
- desc.setValidator(fieldValidator);\r
- //-- initialize element descriptors\r
- \r
} //-- org.vamsas.objects.core.MapDescriptor()\r
\r
\r
*/\r
public org.exolab.castor.mapping.ClassDescriptor getExtends()\r
{\r
- return null;\r
+ return super.getExtends();\r
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends() \r
\r
/**\r
*/\r
public org.exolab.castor.mapping.FieldDescriptor getIdentity()\r
{\r
+ if (identity == null)\r
+ return super.getIdentity();\r
return identity;\r
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() \r
\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package org.vamsas.objects.core;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.Serializable;\r
+import java.io.Writer;\r
+import org.exolab.castor.xml.MarshalException;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+import org.exolab.castor.xml.ValidationException;\r
+import org.xml.sax.ContentHandler;\r
+\r
+/**\r
+ * Class MapList.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MapList extends org.vamsas.client.Vobject \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Offset to first position in dataset sequence record that\r
+ * start\r
+ * position on 'onto' maps to \r
+ */\r
+ private int _from = 0;\r
+\r
+ /**\r
+ * keeps track of state for field: _from\r
+ */\r
+ private boolean _has_from;\r
+\r
+ /**\r
+ * Offset to last position in dataset sequence record that end\r
+ * position on 'onto' maps to \r
+ */\r
+ private int _to = 0;\r
+\r
+ /**\r
+ * keeps track of state for field: _to\r
+ */\r
+ private boolean _has_to;\r
+\r
+ /**\r
+ * Offset to first position in database entry that first (or\r
+ * offset)\r
+ * position in sequence maps to \r
+ */\r
+ private int _start;\r
+\r
+ /**\r
+ * keeps track of state for field: _start\r
+ */\r
+ private boolean _has_start;\r
+\r
+ /**\r
+ * Offset to last position in database entry that last (offset)\r
+ * position in sequence maps to \r
+ */\r
+ private int _end;\r
+\r
+ /**\r
+ * keeps track of state for field: _end\r
+ */\r
+ private boolean _has_end;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public MapList() \r
+ {\r
+ super();\r
+ } //-- org.vamsas.objects.core.MapList()\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method deleteEnd\r
+ * \r
+ */\r
+ public void deleteEnd()\r
+ {\r
+ this._has_end= false;\r
+ } //-- void deleteEnd() \r
+\r
+ /**\r
+ * Method deleteFrom\r
+ * \r
+ */\r
+ public void deleteFrom()\r
+ {\r
+ this._has_from= false;\r
+ } //-- void deleteFrom() \r
+\r
+ /**\r
+ * Method deleteStart\r
+ * \r
+ */\r
+ public void deleteStart()\r
+ {\r
+ this._has_start= false;\r
+ } //-- void deleteStart() \r
+\r
+ /**\r
+ * Method deleteTo\r
+ * \r
+ */\r
+ public void deleteTo()\r
+ {\r
+ this._has_to= false;\r
+ } //-- void deleteTo() \r
+\r
+ /**\r
+ * Note: hashCode() has not been overriden\r
+ * \r
+ * @param obj\r
+ * @return boolean\r
+ */\r
+ public boolean equals(java.lang.Object obj)\r
+ {\r
+ if ( this == obj )\r
+ return true;\r
+ \r
+ if (super.equals(obj)==false)\r
+ return false;\r
+ \r
+ if (obj instanceof MapList) {\r
+ \r
+ MapList temp = (MapList)obj;\r
+ if (this._from != temp._from)\r
+ return false;\r
+ if (this._has_from != temp._has_from)\r
+ return false;\r
+ if (this._to != temp._to)\r
+ return false;\r
+ if (this._has_to != temp._has_to)\r
+ return false;\r
+ if (this._start != temp._start)\r
+ return false;\r
+ if (this._has_start != temp._has_start)\r
+ return false;\r
+ if (this._end != temp._end)\r
+ return false;\r
+ if (this._has_end != temp._has_end)\r
+ return false;\r
+ return true;\r
+ }\r
+ return false;\r
+ } //-- boolean equals(java.lang.Object) \r
+\r
+ /**\r
+ * Returns the value of field 'end'. The field 'end' has the\r
+ * following description: Offset to last position in database\r
+ * entry that last (offset)\r
+ * position in sequence maps to \r
+ * \r
+ * @return int\r
+ * @return the value of field 'end'.\r
+ */\r
+ public int getEnd()\r
+ {\r
+ return this._end;\r
+ } //-- int getEnd() \r
+\r
+ /**\r
+ * Returns the value of field 'from'. The field 'from' has the\r
+ * following description: Offset to first position in dataset\r
+ * sequence record that start\r
+ * position on 'onto' maps to \r
+ * \r
+ * @return int\r
+ * @return the value of field 'from'.\r
+ */\r
+ public int getFrom()\r
+ {\r
+ return this._from;\r
+ } //-- int getFrom() \r
+\r
+ /**\r
+ * Returns the value of field 'start'. The field 'start' has\r
+ * the following description: Offset to first position in\r
+ * database entry that first (or offset)\r
+ * position in sequence maps to \r
+ * \r
+ * @return int\r
+ * @return the value of field 'start'.\r
+ */\r
+ public int getStart()\r
+ {\r
+ return this._start;\r
+ } //-- int getStart() \r
+\r
+ /**\r
+ * Returns the value of field 'to'. The field 'to' has the\r
+ * following description: Offset to last position in dataset\r
+ * sequence record that end\r
+ * position on 'onto' maps to \r
+ * \r
+ * @return int\r
+ * @return the value of field 'to'.\r
+ */\r
+ public int getTo()\r
+ {\r
+ return this._to;\r
+ } //-- int getTo() \r
+\r
+ /**\r
+ * Method hasEnd\r
+ * \r
+ * \r
+ * \r
+ * @return boolean\r
+ */\r
+ public boolean hasEnd()\r
+ {\r
+ return this._has_end;\r
+ } //-- boolean hasEnd() \r
+\r
+ /**\r
+ * Method hasFrom\r
+ * \r
+ * \r
+ * \r
+ * @return boolean\r
+ */\r
+ public boolean hasFrom()\r
+ {\r
+ return this._has_from;\r
+ } //-- boolean hasFrom() \r
+\r
+ /**\r
+ * Method hasStart\r
+ * \r
+ * \r
+ * \r
+ * @return boolean\r
+ */\r
+ public boolean hasStart()\r
+ {\r
+ return this._has_start;\r
+ } //-- boolean hasStart() \r
+\r
+ /**\r
+ * Method hasTo\r
+ * \r
+ * \r
+ * \r
+ * @return boolean\r
+ */\r
+ public boolean hasTo()\r
+ {\r
+ return this._has_to;\r
+ } //-- boolean hasTo() \r
+\r
+ /**\r
+ * Method isValid\r
+ * \r
+ * \r
+ * \r
+ * @return boolean\r
+ */\r
+ public boolean isValid()\r
+ {\r
+ try {\r
+ validate();\r
+ }\r
+ catch (org.exolab.castor.xml.ValidationException vex) {\r
+ return false;\r
+ }\r
+ return true;\r
+ } //-- boolean isValid() \r
+\r
+ /**\r
+ * Method marshal\r
+ * \r
+ * \r
+ * \r
+ * @param out\r
+ */\r
+ public void marshal(java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+ {\r
+ \r
+ Marshaller.marshal(this, out);\r
+ } //-- void marshal(java.io.Writer) \r
+\r
+ /**\r
+ * Method marshal\r
+ * \r
+ * \r
+ * \r
+ * @param handler\r
+ */\r
+ public void marshal(org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+ {\r
+ \r
+ Marshaller.marshal(this, handler);\r
+ } //-- void marshal(org.xml.sax.ContentHandler) \r
+\r
+ /**\r
+ * Sets the value of field 'end'. The field 'end' has the\r
+ * following description: Offset to last position in database\r
+ * entry that last (offset)\r
+ * position in sequence maps to \r
+ * \r
+ * @param end the value of field 'end'.\r
+ */\r
+ public void setEnd(int end)\r
+ {\r
+ this._end = end;\r
+ this._has_end = true;\r
+ } //-- void setEnd(int) \r
+\r
+ /**\r
+ * Sets the value of field 'from'. The field 'from' has the\r
+ * following description: Offset to first position in dataset\r
+ * sequence record that start\r
+ * position on 'onto' maps to \r
+ * \r
+ * @param from the value of field 'from'.\r
+ */\r
+ public void setFrom(int from)\r
+ {\r
+ this._from = from;\r
+ this._has_from = true;\r
+ } //-- void setFrom(int) \r
+\r
+ /**\r
+ * Sets the value of field 'start'. The field 'start' has the\r
+ * following description: Offset to first position in database\r
+ * entry that first (or offset)\r
+ * position in sequence maps to \r
+ * \r
+ * @param start the value of field 'start'.\r
+ */\r
+ public void setStart(int start)\r
+ {\r
+ this._start = start;\r
+ this._has_start = true;\r
+ } //-- void setStart(int) \r
+\r
+ /**\r
+ * Sets the value of field 'to'. The field 'to' has the\r
+ * following description: Offset to last position in dataset\r
+ * sequence record that end\r
+ * position on 'onto' maps to \r
+ * \r
+ * @param to the value of field 'to'.\r
+ */\r
+ public void setTo(int to)\r
+ {\r
+ this._to = to;\r
+ this._has_to = true;\r
+ } //-- void setTo(int) \r
+\r
+ /**\r
+ * Method unmarshal\r
+ * \r
+ * \r
+ * \r
+ * @param reader\r
+ * @return MapList\r
+ */\r
+ public static org.vamsas.objects.core.MapList unmarshal(java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+ {\r
+ return (org.vamsas.objects.core.MapList) Unmarshaller.unmarshal(org.vamsas.objects.core.MapList.class, reader);\r
+ } //-- org.vamsas.objects.core.MapList unmarshal(java.io.Reader) \r
+\r
+ /**\r
+ * Method validate\r
+ * \r
+ */\r
+ public void validate()\r
+ throws org.exolab.castor.xml.ValidationException\r
+ {\r
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+ validator.validate(this);\r
+ } //-- void validate() \r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package org.vamsas.objects.core;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.mapping.AccessMode;\r
+import org.exolab.castor.xml.TypeValidator;\r
+import org.exolab.castor.xml.XMLFieldDescriptor;\r
+import org.exolab.castor.xml.validators.*;\r
+\r
+/**\r
+ * Class MapListDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MapListDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field nsPrefix\r
+ */\r
+ private java.lang.String nsPrefix;\r
+\r
+ /**\r
+ * Field nsURI\r
+ */\r
+ private java.lang.String nsURI;\r
+\r
+ /**\r
+ * Field xmlName\r
+ */\r
+ private java.lang.String xmlName;\r
+\r
+ /**\r
+ * Field identity\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public MapListDescriptor() \r
+ {\r
+ super();\r
+ nsURI = "http://www.vamsas.org";\r
+ xmlName = "mapList";\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _from\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_from", "from", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ MapList target = (MapList) object;\r
+ if(!target.hasFrom())\r
+ return null;\r
+ return new java.lang.Integer(target.getFrom());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ MapList target = (MapList) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteFrom();\r
+ return;\r
+ }\r
+ target.setFrom( ((java.lang.Integer)value).intValue());\r
+ }\r
+ catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance( java.lang.Object parent ) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _from\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ IntegerValidator typeValidator = new IntegerValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _to\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_to", "to", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ MapList target = (MapList) object;\r
+ if(!target.hasTo())\r
+ return null;\r
+ return new java.lang.Integer(target.getTo());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ MapList target = (MapList) object;\r
+ // if null, use delete method for optional primitives \r
+ if (value == null) {\r
+ target.deleteTo();\r
+ return;\r
+ }\r
+ target.setTo( ((java.lang.Integer)value).intValue());\r
+ }\r
+ catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance( java.lang.Object parent ) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _to\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ { //-- local scope\r
+ IntegerValidator typeValidator = new IntegerValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _start\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ MapList target = (MapList) object;\r
+ if(!target.hasStart())\r
+ return null;\r
+ return new java.lang.Integer(target.getStart());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ MapList target = (MapList) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) return;\r
+ \r
+ target.setStart( ((java.lang.Integer)value).intValue());\r
+ }\r
+ catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance( java.lang.Object parent ) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _start\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ IntegerValidator typeValidator = new IntegerValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- _end\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ MapList target = (MapList) object;\r
+ if(!target.hasEnd())\r
+ return null;\r
+ return new java.lang.Integer(target.getEnd());\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ MapList target = (MapList) object;\r
+ // ignore null values for non optional primitives\r
+ if (value == null) return;\r
+ \r
+ target.setEnd( ((java.lang.Integer)value).intValue());\r
+ }\r
+ catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance( java.lang.Object parent ) {\r
+ return null;\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _end\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ IntegerValidator typeValidator = new IntegerValidator();\r
+ fieldValidator.setValidator(typeValidator);\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ } //-- org.vamsas.objects.core.MapListDescriptor()\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode\r
+ * \r
+ * \r
+ * \r
+ * @return AccessMode\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode()\r
+ {\r
+ return null;\r
+ } //-- org.exolab.castor.mapping.AccessMode getAccessMode() \r
+\r
+ /**\r
+ * Method getExtends\r
+ * \r
+ * \r
+ * \r
+ * @return ClassDescriptor\r
+ */\r
+ public org.exolab.castor.mapping.ClassDescriptor getExtends()\r
+ {\r
+ return null;\r
+ } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() \r
+\r
+ /**\r
+ * Method getIdentity\r
+ * \r
+ * \r
+ * \r
+ * @return FieldDescriptor\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()\r
+ {\r
+ return identity;\r
+ } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() \r
+\r
+ /**\r
+ * Method getJavaClass\r
+ * \r
+ * \r
+ * \r
+ * @return Class\r
+ */\r
+ public java.lang.Class getJavaClass()\r
+ {\r
+ return org.vamsas.objects.core.MapList.class;\r
+ } //-- java.lang.Class getJavaClass() \r
+\r
+ /**\r
+ * Method getNameSpacePrefix\r
+ * \r
+ * \r
+ * \r
+ * @return String\r
+ */\r
+ public java.lang.String getNameSpacePrefix()\r
+ {\r
+ return nsPrefix;\r
+ } //-- java.lang.String getNameSpacePrefix() \r
+\r
+ /**\r
+ * Method getNameSpaceURI\r
+ * \r
+ * \r
+ * \r
+ * @return String\r
+ */\r
+ public java.lang.String getNameSpaceURI()\r
+ {\r
+ return nsURI;\r
+ } //-- java.lang.String getNameSpaceURI() \r
+\r
+ /**\r
+ * Method getValidator\r
+ * \r
+ * \r
+ * \r
+ * @return TypeValidator\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator()\r
+ {\r
+ return this;\r
+ } //-- org.exolab.castor.xml.TypeValidator getValidator() \r
+\r
+ /**\r
+ * Method getXMLName\r
+ * \r
+ * \r
+ * \r
+ * @return String\r
+ */\r
+ public java.lang.String getXMLName()\r
+ {\r
+ return xmlName;\r
+ } //-- java.lang.String getXMLName() \r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package org.vamsas.objects.core;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import java.io.IOException;\r
+import java.io.Reader;\r
+import java.io.Serializable;\r
+import java.io.Writer;\r
+import org.exolab.castor.xml.MarshalException;\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+import org.exolab.castor.xml.ValidationException;\r
+import org.xml.sax.ContentHandler;\r
+\r
+/**\r
+ * Class Mapping.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Mapping extends org.vamsas.objects.core.MapList \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * object to which the mapping is being mapped\r
+ * \r
+ */\r
+ private java.lang.Object _onto;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public Mapping() \r
+ {\r
+ super();\r
+ } //-- org.vamsas.objects.core.Mapping()\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Note: hashCode() has not been overriden\r
+ * \r
+ * @param obj\r
+ * @return boolean\r
+ */\r
+ public boolean equals(java.lang.Object obj)\r
+ {\r
+ if ( this == obj )\r
+ return true;\r
+ \r
+ if (super.equals(obj)==false)\r
+ return false;\r
+ \r
+ if (obj instanceof Mapping) {\r
+ \r
+ Mapping temp = (Mapping)obj;\r
+ if (this._onto != null) {\r
+ if (temp._onto == null) return false;\r
+ else if (!(this._onto.equals(temp._onto))) \r
+ return false;\r
+ }\r
+ else if (temp._onto != null)\r
+ return false;\r
+ return true;\r
+ }\r
+ return false;\r
+ } //-- boolean equals(java.lang.Object) \r
+\r
+ /**\r
+ * Returns the value of field 'onto'. The field 'onto' has the\r
+ * following description: object to which the mapping is being\r
+ * mapped\r
+ * \r
+ * \r
+ * @return Object\r
+ * @return the value of field 'onto'.\r
+ */\r
+ public java.lang.Object getOnto()\r
+ {\r
+ return this._onto;\r
+ } //-- java.lang.Object getOnto() \r
+\r
+ /**\r
+ * Method isValid\r
+ * \r
+ * \r
+ * \r
+ * @return boolean\r
+ */\r
+ public boolean isValid()\r
+ {\r
+ try {\r
+ validate();\r
+ }\r
+ catch (org.exolab.castor.xml.ValidationException vex) {\r
+ return false;\r
+ }\r
+ return true;\r
+ } //-- boolean isValid() \r
+\r
+ /**\r
+ * Method marshal\r
+ * \r
+ * \r
+ * \r
+ * @param out\r
+ */\r
+ public void marshal(java.io.Writer out)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+ {\r
+ \r
+ Marshaller.marshal(this, out);\r
+ } //-- void marshal(java.io.Writer) \r
+\r
+ /**\r
+ * Method marshal\r
+ * \r
+ * \r
+ * \r
+ * @param handler\r
+ */\r
+ public void marshal(org.xml.sax.ContentHandler handler)\r
+ throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+ {\r
+ \r
+ Marshaller.marshal(this, handler);\r
+ } //-- void marshal(org.xml.sax.ContentHandler) \r
+\r
+ /**\r
+ * Sets the value of field 'onto'. The field 'onto' has the\r
+ * following description: object to which the mapping is being\r
+ * mapped\r
+ * \r
+ * \r
+ * @param onto the value of field 'onto'.\r
+ */\r
+ public void setOnto(java.lang.Object onto)\r
+ {\r
+ this._onto = onto;\r
+ } //-- void setOnto(java.lang.Object) \r
+\r
+ /**\r
+ * Method unmarshal\r
+ * \r
+ * \r
+ * \r
+ * @param reader\r
+ * @return MapList\r
+ */\r
+ public static org.vamsas.objects.core.MapList unmarshal(java.io.Reader reader)\r
+ throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException\r
+ {\r
+ return (org.vamsas.objects.core.Mapping) Unmarshaller.unmarshal(org.vamsas.objects.core.Mapping.class, reader);\r
+ } //-- org.vamsas.objects.core.MapList unmarshal(java.io.Reader) \r
+\r
+ /**\r
+ * Method validate\r
+ * \r
+ */\r
+ public void validate()\r
+ throws org.exolab.castor.xml.ValidationException\r
+ {\r
+ org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+ validator.validate(this);\r
+ } //-- void validate() \r
+\r
+}\r
--- /dev/null
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package org.vamsas.objects.core;\r
+\r
+ //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.mapping.AccessMode;\r
+import org.exolab.castor.xml.TypeValidator;\r
+import org.exolab.castor.xml.XMLFieldDescriptor;\r
+import org.exolab.castor.xml.validators.*;\r
+\r
+/**\r
+ * Class MappingDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MappingDescriptor extends org.vamsas.objects.core.MapListDescriptor {\r
+\r
+\r
+ //--------------------------/\r
+ //- Class/Member Variables -/\r
+ //--------------------------/\r
+\r
+ /**\r
+ * Field nsPrefix\r
+ */\r
+ private java.lang.String nsPrefix;\r
+\r
+ /**\r
+ * Field nsURI\r
+ */\r
+ private java.lang.String nsURI;\r
+\r
+ /**\r
+ * Field xmlName\r
+ */\r
+ private java.lang.String xmlName;\r
+\r
+ /**\r
+ * Field identity\r
+ */\r
+ private org.exolab.castor.xml.XMLFieldDescriptor identity;\r
+\r
+\r
+ //----------------/\r
+ //- Constructors -/\r
+ //----------------/\r
+\r
+ public MappingDescriptor() \r
+ {\r
+ super();\r
+ setExtendsWithoutFlatten(new org.vamsas.objects.core.MapListDescriptor());\r
+ nsURI = "http://www.vamsas.org";\r
+ xmlName = "mapping";\r
+ org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;\r
+ org.exolab.castor.mapping.FieldHandler handler = null;\r
+ org.exolab.castor.xml.FieldValidator fieldValidator = null;\r
+ //-- initialize attribute descriptors\r
+ \r
+ //-- _onto\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_onto", "onto", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setReference(true);\r
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+ public java.lang.Object getValue( java.lang.Object object ) \r
+ throws IllegalStateException\r
+ {\r
+ Mapping target = (Mapping) object;\r
+ return target.getOnto();\r
+ }\r
+ public void setValue( java.lang.Object object, java.lang.Object value) \r
+ throws IllegalStateException, IllegalArgumentException\r
+ {\r
+ try {\r
+ Mapping target = (Mapping) object;\r
+ target.setOnto( (java.lang.Object) value);\r
+ }\r
+ catch (java.lang.Exception ex) {\r
+ throw new IllegalStateException(ex.toString());\r
+ }\r
+ }\r
+ public java.lang.Object newInstance( java.lang.Object parent ) {\r
+ return new java.lang.Object();\r
+ }\r
+ };\r
+ desc.setHandler(handler);\r
+ desc.setRequired(true);\r
+ desc.setMultivalued(false);\r
+ addFieldDescriptor(desc);\r
+ \r
+ //-- validation code for: _onto\r
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+ fieldValidator.setMinOccurs(1);\r
+ { //-- local scope\r
+ }\r
+ desc.setValidator(fieldValidator);\r
+ //-- initialize element descriptors\r
+ \r
+ } //-- org.vamsas.objects.core.MappingDescriptor()\r
+\r
+\r
+ //-----------/\r
+ //- Methods -/\r
+ //-----------/\r
+\r
+ /**\r
+ * Method getAccessMode\r
+ * \r
+ * \r
+ * \r
+ * @return AccessMode\r
+ */\r
+ public org.exolab.castor.mapping.AccessMode getAccessMode()\r
+ {\r
+ return null;\r
+ } //-- org.exolab.castor.mapping.AccessMode getAccessMode() \r
+\r
+ /**\r
+ * Method getExtends\r
+ * \r
+ * \r
+ * \r
+ * @return ClassDescriptor\r
+ */\r
+ public org.exolab.castor.mapping.ClassDescriptor getExtends()\r
+ {\r
+ return super.getExtends();\r
+ } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() \r
+\r
+ /**\r
+ * Method getIdentity\r
+ * \r
+ * \r
+ * \r
+ * @return FieldDescriptor\r
+ */\r
+ public org.exolab.castor.mapping.FieldDescriptor getIdentity()\r
+ {\r
+ if (identity == null)\r
+ return super.getIdentity();\r
+ return identity;\r
+ } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() \r
+\r
+ /**\r
+ * Method getJavaClass\r
+ * \r
+ * \r
+ * \r
+ * @return Class\r
+ */\r
+ public java.lang.Class getJavaClass()\r
+ {\r
+ return org.vamsas.objects.core.Mapping.class;\r
+ } //-- java.lang.Class getJavaClass() \r
+\r
+ /**\r
+ * Method getNameSpacePrefix\r
+ * \r
+ * \r
+ * \r
+ * @return String\r
+ */\r
+ public java.lang.String getNameSpacePrefix()\r
+ {\r
+ return nsPrefix;\r
+ } //-- java.lang.String getNameSpacePrefix() \r
+\r
+ /**\r
+ * Method getNameSpaceURI\r
+ * \r
+ * \r
+ * \r
+ * @return String\r
+ */\r
+ public java.lang.String getNameSpaceURI()\r
+ {\r
+ return nsURI;\r
+ } //-- java.lang.String getNameSpaceURI() \r
+\r
+ /**\r
+ * Method getValidator\r
+ * \r
+ * \r
+ * \r
+ * @return TypeValidator\r
+ */\r
+ public org.exolab.castor.xml.TypeValidator getValidator()\r
+ {\r
+ return this;\r
+ } //-- org.exolab.castor.xml.TypeValidator getValidator() \r
+\r
+ /**\r
+ * Method getXMLName\r
+ * \r
+ * \r
+ * \r
+ * @return String\r
+ */\r
+ public java.lang.String getXMLName()\r
+ {\r
+ return xmlName;\r
+ } //-- java.lang.String getXMLName() \r
+\r
+}\r
private java.lang.String _title;
/**
- * Primary Key for vamsas
- * object referencing
+ * Primary Key for vamsas object referencing
*
*/
private java.lang.String _id;
/**
- * objects with
- * modifiable=false will not be
- * modified by a vamsas client
- * update
- *
- */
- private boolean _modifiable = true;
-
- /**
- * keeps track of state for field: _modifiable
+ * Field _modifiable
*/
- private boolean _has_modifiable;
+ private java.lang.String _modifiable;
//----------------/
//-----------/
/**
- * Method deleteModifiable
- *
- */
- public void deleteModifiable()
- {
- this._has_modifiable= false;
- } //-- void deleteModifiable()
-
- /**
* Note: hashCode() has not been overriden
*
* @param obj
}
else if (temp._id != null)
return false;
- if (this._modifiable != temp._modifiable)
- return false;
- if (this._has_modifiable != temp._has_modifiable)
+ if (this._modifiable != null) {
+ if (temp._modifiable == null) return false;
+ else if (!(this._modifiable.equals(temp._modifiable)))
+ return false;
+ }
+ else if (temp._modifiable != null)
return false;
return true;
}
/**
* Returns the value of field 'id'. The field 'id' has the
- * following description: Primary Key for vamsas
- * object referencing
+ * following description: Primary Key for vamsas object
+ * referencing
*
*
* @return String
} //-- java.lang.String getId()
/**
- * Returns the value of field 'modifiable'. The field
- * 'modifiable' has the following description: objects with
- * modifiable=false will not be
- * modified by a vamsas client
- * update
- *
+ * Returns the value of field 'modifiable'.
*
- * @return boolean
+ * @return String
* @return the value of field 'modifiable'.
*/
- public boolean getModifiable()
+ public java.lang.String getModifiable()
{
return this._modifiable;
- } //-- boolean getModifiable()
+ } //-- java.lang.String getModifiable()
/**
* Returns the value of field 'title'.
} //-- java.lang.String getTitle()
/**
- * Method hasModifiable
- *
- *
- *
- * @return boolean
- */
- public boolean hasModifiable()
- {
- return this._has_modifiable;
- } //-- boolean hasModifiable()
-
- /**
* Method isValid
*
*
/**
* Sets the value of field 'id'. The field 'id' has the
- * following description: Primary Key for vamsas
- * object referencing
+ * following description: Primary Key for vamsas object
+ * referencing
*
*
* @param id the value of field 'id'.
} //-- void setId(java.lang.String)
/**
- * Sets the value of field 'modifiable'. The field 'modifiable'
- * has the following description: objects with
- * modifiable=false will not be
- * modified by a vamsas client
- * update
- *
+ * Sets the value of field 'modifiable'.
*
* @param modifiable the value of field 'modifiable'.
*/
- public void setModifiable(boolean modifiable)
+ public void setModifiable(java.lang.String modifiable)
{
this._modifiable = modifiable;
- this._has_modifiable = true;
- } //-- void setModifiable(boolean)
+ } //-- void setModifiable(java.lang.String)
/**
* Sets the value of field 'title'.
}
desc.setValidator(fieldValidator);
//-- _modifiable
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Newick target = (Newick) object;
- if(!target.hasModifiable())
- return null;
- return (target.getModifiable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ return target.getModifiable();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Newick target = (Newick) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteModifiable();
- return;
- }
- target.setModifiable( ((java.lang.Boolean)value).booleanValue());
+ target.setModifiable( (java.lang.String) value);
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
//-- validation code for: _modifiable
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- BooleanValidator typeValidator = new BooleanValidator();
+ StringValidator typeValidator = new StringValidator();
+ typeValidator.setWhiteSpace("preserve");
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
private java.lang.String _name;\r
\r
/**\r
- * The type specifies how the property will\r
- * be parsed. Empty property strings are\r
- * allowed, and can be used to prototype\r
- * the input to a document. TODO: specify\r
- * allowed types\r
- * \r
+ * The type specifies how the property will be parsed.\r
+ * Empty property strings are allowed, and can be used to\r
+ * prototype the\r
+ * input to a document. TODO: specify allowed types \r
*/\r
private java.lang.String _type;\r
\r
/**\r
* Returns the value of field 'type'. The field 'type' has the\r
* following description: The type specifies how the property\r
- * will\r
- * be parsed. Empty property strings are\r
- * allowed, and can be used to prototype\r
- * the input to a document. TODO: specify\r
- * allowed types\r
- * \r
+ * will be parsed.\r
+ * Empty property strings are allowed, and can be used to\r
+ * prototype the\r
+ * input to a document. TODO: specify allowed types \r
* \r
* @return String\r
* @return the value of field 'type'.\r
/**\r
* Sets the value of field 'type'. The field 'type' has the\r
* following description: The type specifies how the property\r
- * will\r
- * be parsed. Empty property strings are\r
- * allowed, and can be used to prototype\r
- * the input to a document. TODO: specify\r
- * allowed types\r
- * \r
+ * will be parsed.\r
+ * Empty property strings are allowed, and can be used to\r
+ * prototype the\r
+ * input to a document. TODO: specify allowed types \r
* \r
* @param type the value of field 'type'.\r
*/\r
import org.xml.sax.ContentHandler;\r
\r
/**\r
- * a position within the associated object's\r
- * coordinate system\r
+ * a position within the associated object's coordinate system\r
* \r
* \r
* @version $Revision$ $Date$\r
private java.lang.String _name;\r
\r
/**\r
- * The type specifies how the property will\r
- * be parsed. Empty property strings are\r
- * allowed, and can be used to prototype\r
- * the input to a document. TODO: specify\r
- * allowed types\r
- * \r
+ * The type specifies how the property will be parsed.\r
+ * Empty property strings are allowed, and can be used to\r
+ * prototype the\r
+ * input to a document. TODO: specify allowed types \r
*/\r
private java.lang.String _type;\r
\r
/**\r
* Returns the value of field 'type'. The field 'type' has the\r
* following description: The type specifies how the property\r
- * will\r
- * be parsed. Empty property strings are\r
- * allowed, and can be used to prototype\r
- * the input to a document. TODO: specify\r
- * allowed types\r
- * \r
+ * will be parsed.\r
+ * Empty property strings are allowed, and can be used to\r
+ * prototype the\r
+ * input to a document. TODO: specify allowed types \r
* \r
* @return String\r
* @return the value of field 'type'.\r
/**\r
* Sets the value of field 'type'. The field 'type' has the\r
* following description: The type specifies how the property\r
- * will\r
- * be parsed. Empty property strings are\r
- * allowed, and can be used to prototype\r
- * the input to a document. TODO: specify\r
- * allowed types\r
- * \r
+ * will be parsed.\r
+ * Empty property strings are allowed, and can be used to\r
+ * prototype the\r
+ * input to a document. TODO: specify allowed types \r
* \r
* @param type the value of field 'type'.\r
*/\r
\r
/**\r
* Annotation for a rangeSpec - values can be attached for the\r
- * whole specification, and to each position within the spec.\r
- * following the orientation specified by the ordered set of\r
- * rangeSpec (pos, seg) elements.\r
- * \r
+ * whole\r
+ * specification, and to each position within the spec. following\r
+ * the orientation\r
+ * specified by the ordered set of rangeSpec (pos, seg) elements. \r
* \r
* @version $Revision$ $Date$\r
*/\r
private java.lang.String _id;\r
\r
/**\r
- * objects with modifiable=false will not be\r
- * modified by a vamsas client update\r
- * \r
+ * Field _modifiable\r
*/\r
- private boolean _modifiable = true;\r
+ private java.lang.String _modifiable;\r
\r
/**\r
- * keeps track of state for field: _modifiable\r
- */\r
- private boolean _has_modifiable;\r
-\r
- /**\r
- * Annotation with the same non-empty group\r
- * name are grouped together\r
- * \r
+ * Annotation with the same non-empty group name are grouped\r
+ * together \r
*/\r
private java.lang.String _group = "";\r
\r
/**\r
- * A Das Feature has both a type and a Type ID.\r
- * We go the route of requiring the type string\r
- * to be taken from a controlled vocabulary if\r
- * an application expects others to make sense\r
- * of it. \r
- * The type may qualified - so uniprot:CHAIN is a valid type\r
- * name, \r
- * and considered distinct from someotherDB:CHAIN\r
- * \r
+ * A Das Feature has both a type and a Type ID. We go the\r
+ * route of requiring the type string to be taken from a\r
+ * controlled\r
+ * vocabulary if an application expects others to make sense\r
+ * of it. The\r
+ * type may qualified - so uniprot:CHAIN is a valid type name,\r
+ * and\r
+ * considered distinct from someotherDB:CHAIN \r
*/\r
private java.lang.String _type;\r
\r
/**\r
- * Short, meaningful name for the annotation - if this is\r
- * absent, then the type string should be used in its place.\r
+ * Short, meaningful name for the annotation - if this\r
+ * is absent, then the type string should be used in its\r
+ * place.\r
* \r
*/\r
private java.lang.String _label;\r
\r
/**\r
* TODO: specify this - we have considered taking the GO\r
- * evidence codes as a model for assessing a measure of quality\r
- * to an annotation.\r
- * \r
+ * evidence codes as a model for assessing a measure of\r
+ * quality to an\r
+ * annotation. \r
*/\r
private java.lang.String _status;\r
\r
/**\r
- * Annotation Element position maps to\r
- * ordered positions defined by the\r
- * sequence of rangeType pos positions or\r
- * concatenated seg start/end segments.\r
- * \r
+ * Annotation Element position maps to ordered positions\r
+ * defined by the sequence of rangeType pos positions or\r
+ * concatenated\r
+ * seg start/end segments. \r
*/\r
private java.util.Vector _annotationElementList;\r
\r
/**\r
- * Ordered set of optionally named float\r
- * values for the whole annotation\r
- * \r
+ * Ordered set of optionally named float values for the\r
+ * whole annotation \r
*/\r
private java.util.Vector _scoreList;\r
\r
private java.util.Vector _linkList;\r
\r
/**\r
- * Note:These are mutable so an application\r
- * should check them each time.\r
- * \r
+ * Note:These are mutable so an application should check\r
+ * them each time. \r
*/\r
private java.util.Vector _propertyList;\r
\r
} //-- void addScore(int, org.vamsas.objects.core.Score) \r
\r
/**\r
- * Method deleteModifiable\r
- * \r
- */\r
- public void deleteModifiable()\r
- {\r
- this._has_modifiable= false;\r
- } //-- void deleteModifiable() \r
-\r
- /**\r
* Method enumerateAnnotationElement\r
* \r
* \r
}\r
else if (temp._id != null)\r
return false;\r
- if (this._modifiable != temp._modifiable)\r
- return false;\r
- if (this._has_modifiable != temp._has_modifiable)\r
+ if (this._modifiable != null) {\r
+ if (temp._modifiable == null) return false;\r
+ else if (!(this._modifiable.equals(temp._modifiable))) \r
+ return false;\r
+ }\r
+ else if (temp._modifiable != null)\r
return false;\r
if (this._group != null) {\r
if (temp._group == null) return false;\r
/**\r
* Returns the value of field 'group'. The field 'group' has\r
* the following description: Annotation with the same\r
- * non-empty group\r
- * name are grouped together\r
- * \r
+ * non-empty group name are grouped\r
+ * together \r
* \r
* @return String\r
* @return the value of field 'group'.\r
/**\r
* Returns the value of field 'label'. The field 'label' has\r
* the following description: Short, meaningful name for the\r
- * annotation - if this is absent, then the type string should\r
- * be used in its place.\r
+ * annotation - if this\r
+ * is absent, then the type string should be used in its\r
+ * place.\r
* \r
* \r
* @return String\r
} //-- int getLinkCount() \r
\r
/**\r
- * Returns the value of field 'modifiable'. The field\r
- * 'modifiable' has the following description: objects with\r
- * modifiable=false will not be\r
- * modified by a vamsas client update\r
- * \r
+ * Returns the value of field 'modifiable'.\r
* \r
- * @return boolean\r
+ * @return String\r
* @return the value of field 'modifiable'.\r
*/\r
- public boolean getModifiable()\r
+ public java.lang.String getModifiable()\r
{\r
return this._modifiable;\r
- } //-- boolean getModifiable() \r
+ } //-- java.lang.String getModifiable() \r
\r
/**\r
* Method getProperty\r
/**\r
* Returns the value of field 'status'. The field 'status' has\r
* the following description: TODO: specify this - we have\r
- * considered taking the GO evidence codes as a model for\r
- * assessing a measure of quality to an annotation.\r
- * \r
+ * considered taking the GO\r
+ * evidence codes as a model for assessing a measure of\r
+ * quality to an\r
+ * annotation. \r
* \r
* @return String\r
* @return the value of field 'status'.\r
/**\r
* Returns the value of field 'type'. The field 'type' has the\r
* following description: A Das Feature has both a type and a\r
- * Type ID.\r
- * We go the route of requiring the type string\r
- * to be taken from a controlled vocabulary if\r
- * an application expects others to make sense\r
- * of it. \r
- * The type may qualified - so uniprot:CHAIN is a valid type\r
- * name, \r
- * and considered distinct from someotherDB:CHAIN\r
- * \r
+ * Type ID. We go the\r
+ * route of requiring the type string to be taken from a\r
+ * controlled\r
+ * vocabulary if an application expects others to make sense\r
+ * of it. The\r
+ * type may qualified - so uniprot:CHAIN is a valid type name,\r
+ * and\r
+ * considered distinct from someotherDB:CHAIN \r
* \r
* @return String\r
* @return the value of field 'type'.\r
} //-- java.lang.String getType() \r
\r
/**\r
- * Method hasModifiable\r
- * \r
- * \r
- * \r
- * @return boolean\r
- */\r
- public boolean hasModifiable()\r
- {\r
- return this._has_modifiable;\r
- } //-- boolean hasModifiable() \r
-\r
- /**\r
* Method isValid\r
* \r
* \r
/**\r
* Sets the value of field 'group'. The field 'group' has the\r
* following description: Annotation with the same non-empty\r
- * group\r
- * name are grouped together\r
- * \r
+ * group name are grouped\r
+ * together \r
* \r
* @param group the value of field 'group'.\r
*/\r
/**\r
* Sets the value of field 'label'. The field 'label' has the\r
* following description: Short, meaningful name for the\r
- * annotation - if this is absent, then the type string should\r
- * be used in its place.\r
+ * annotation - if this\r
+ * is absent, then the type string should be used in its\r
+ * place.\r
* \r
* \r
* @param label the value of field 'label'.\r
} //-- void setLink(org.vamsas.objects.core.Link) \r
\r
/**\r
- * Sets the value of field 'modifiable'. The field 'modifiable'\r
- * has the following description: objects with modifiable=false\r
- * will not be\r
- * modified by a vamsas client update\r
- * \r
+ * Sets the value of field 'modifiable'.\r
* \r
* @param modifiable the value of field 'modifiable'.\r
*/\r
- public void setModifiable(boolean modifiable)\r
+ public void setModifiable(java.lang.String modifiable)\r
{\r
this._modifiable = modifiable;\r
- this._has_modifiable = true;\r
- } //-- void setModifiable(boolean) \r
+ } //-- void setModifiable(java.lang.String) \r
\r
/**\r
* Method setProperty\r
/**\r
* Sets the value of field 'status'. The field 'status' has the\r
* following description: TODO: specify this - we have\r
- * considered taking the GO evidence codes as a model for\r
- * assessing a measure of quality to an annotation.\r
- * \r
+ * considered taking the GO\r
+ * evidence codes as a model for assessing a measure of\r
+ * quality to an\r
+ * annotation. \r
* \r
* @param status the value of field 'status'.\r
*/\r
/**\r
* Sets the value of field 'type'. The field 'type' has the\r
* following description: A Das Feature has both a type and a\r
- * Type ID.\r
- * We go the route of requiring the type string\r
- * to be taken from a controlled vocabulary if\r
- * an application expects others to make sense\r
- * of it. \r
- * The type may qualified - so uniprot:CHAIN is a valid type\r
- * name, \r
- * and considered distinct from someotherDB:CHAIN\r
- * \r
+ * Type ID. We go the\r
+ * route of requiring the type string to be taken from a\r
+ * controlled\r
+ * vocabulary if an application expects others to make sense\r
+ * of it. The\r
+ * type may qualified - so uniprot:CHAIN is a valid type name,\r
+ * and\r
+ * considered distinct from someotherDB:CHAIN \r
* \r
* @param type the value of field 'type'.\r
*/\r
}\r
desc.setValidator(fieldValidator);\r
//-- _modifiable\r
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);\r
+ desc.setImmutable(true);\r
handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
public java.lang.Object getValue( java.lang.Object object ) \r
throws IllegalStateException\r
{\r
RangeAnnotation target = (RangeAnnotation) object;\r
- if(!target.hasModifiable())\r
- return null;\r
- return (target.getModifiable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);\r
+ return target.getModifiable();\r
}\r
public void setValue( java.lang.Object object, java.lang.Object value) \r
throws IllegalStateException, IllegalArgumentException\r
{\r
try {\r
RangeAnnotation target = (RangeAnnotation) object;\r
- // if null, use delete method for optional primitives \r
- if (value == null) {\r
- target.deleteModifiable();\r
- return;\r
- }\r
- target.setModifiable( ((java.lang.Boolean)value).booleanValue());\r
+ target.setModifiable( (java.lang.String) value);\r
}\r
catch (java.lang.Exception ex) {\r
throw new IllegalStateException(ex.toString());\r
//-- validation code for: _modifiable\r
fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
{ //-- local scope\r
- BooleanValidator typeValidator = new BooleanValidator();\r
+ StringValidator typeValidator = new StringValidator();\r
+ typeValidator.setWhiteSpace("preserve");\r
fieldValidator.setValidator(typeValidator);\r
}\r
desc.setValidator(fieldValidator);\r
/**\r
* Specify an ordered set of positions and/or regions on the\r
* principle\r
- * dimension of some associated vamsas object\r
- * \r
- * Keeping to jaxb-1.0 specification for the moment - this\r
- * choice should become a substitution group when we use\r
- * jaxb-2.0 capable bindings\r
+ * dimension of some associated vamsas object Keeping to jaxb-1.0\r
+ * specification for the moment - this choice should\r
+ * become a substitution group when we use jaxb-2.0 capable\r
+ * bindings\r
* \r
* \r
* @version $Revision$ $Date$\r
private java.lang.Object _choiceValue;\r
\r
/**\r
- * a position within the associated object's\r
- * coordinate system\r
+ * a position within the associated object's coordinate system\r
* \r
*/\r
private java.util.Vector _posList;\r
\r
/**\r
- * a region from start to end, with flag for\r
- * inclusivity of terminii\r
- * \r
+ * a region from start to end, with flag for inclusivity of\r
+ * terminii \r
*/\r
private java.util.Vector _segList;\r
\r
import org.xml.sax.ContentHandler;\r
\r
/**\r
- * Ordered set of optionally named float\r
- * values for the whole annotation\r
- * \r
+ * Ordered set of optionally named float values for the\r
+ * whole annotation \r
* \r
* @version $Revision$ $Date$\r
*/\r
import org.xml.sax.ContentHandler;\r
\r
/**\r
- * a region from start to end, with flag for\r
- * inclusivity of terminii\r
- * \r
+ * a region from start to end, with flag for inclusivity of\r
+ * terminii \r
* \r
* @version $Revision$ $Date$\r
*/\r
private boolean _has_end;\r
\r
/**\r
- * when false, a consecutive range like\r
- * 'start=1, end=2' means the region lying\r
- * after position 1 and before position 2\r
+ * when false, a consecutive range like 'start=1, end=2'\r
+ * means the region lying after position 1 and before position\r
+ * 2\r
* \r
*/\r
private boolean _inclusive;\r
/**\r
* Returns the value of field 'inclusive'. The field\r
* 'inclusive' has the following description: when false, a\r
- * consecutive range like\r
- * 'start=1, end=2' means the region lying\r
- * after position 1 and before position 2\r
+ * consecutive range like 'start=1, end=2'\r
+ * means the region lying after position 1 and before position\r
+ * 2\r
* \r
* \r
* @return boolean\r
/**\r
* Sets the value of field 'inclusive'. The field 'inclusive'\r
* has the following description: when false, a consecutive\r
- * range like\r
- * 'start=1, end=2' means the region lying\r
- * after position 1 and before position 2\r
+ * range like 'start=1, end=2'\r
+ * means the region lying after position 1 and before position\r
+ * 2\r
* \r
* \r
* @param inclusive the value of field 'inclusive'.\r
//--------------------------/
/**
- * Primary Key for vamsas
- * object referencing
+ * Primary Key for vamsas object referencing
*
*/
private java.lang.String _id;
private java.lang.String _dictionary;
/**
- * Store a list of database
- * references for this
- * sequence record - with
- * optional mapping from
- * database sequence to the
- * given sequence record
- *
+ * Store a list of database references
+ * for this sequence record - with optional mapping
+ * from database sequence to the given sequence record
*/
private java.util.Vector _dbRefList;
/**
* Returns the value of field 'id'. The field 'id' has the
- * following description: Primary Key for vamsas
- * object referencing
+ * following description: Primary Key for vamsas object
+ * referencing
*
*
* @return String
/**
* Sets the value of field 'id'. The field 'id' has the
- * following description: Primary Key for vamsas
- * object referencing
+ * following description: Primary Key for vamsas object
+ * referencing
*
*
* @param id the value of field 'id'.
private java.lang.String _description;
/**
- * additional typed properties
- *
+ * additional typed properties
*/
private java.util.Vector _propertyList;
+ /**
+ * Field _mappingList
+ */
+ private java.util.Vector _mappingList;
+
//----------------/
//- Constructors -/
{
super();
_propertyList = new Vector();
+ _mappingList = new Vector();
} //-- org.vamsas.objects.core.SequenceType()
//-----------/
/**
+ * Method addMapping
+ *
+ *
+ *
+ * @param vMapping
+ */
+ public void addMapping(org.vamsas.objects.core.Mapping vMapping)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _mappingList.addElement(vMapping);
+ } //-- void addMapping(org.vamsas.objects.core.Mapping)
+
+ /**
+ * Method addMapping
+ *
+ *
+ *
+ * @param index
+ * @param vMapping
+ */
+ public void addMapping(int index, org.vamsas.objects.core.Mapping vMapping)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ _mappingList.insertElementAt(vMapping, index);
+ } //-- void addMapping(int, org.vamsas.objects.core.Mapping)
+
+ /**
* Method addProperty
*
*
} //-- void deleteStart()
/**
+ * Method enumerateMapping
+ *
+ *
+ *
+ * @return Enumeration
+ */
+ public java.util.Enumeration enumerateMapping()
+ {
+ return _mappingList.elements();
+ } //-- java.util.Enumeration enumerateMapping()
+
+ /**
* Method enumerateProperty
*
*
}
else if (temp._propertyList != null)
return false;
+ if (this._mappingList != null) {
+ if (temp._mappingList == null) return false;
+ else if (!(this._mappingList.equals(temp._mappingList)))
+ return false;
+ }
+ else if (temp._mappingList != null)
+ return false;
return true;
}
return false;
} //-- int getEnd()
/**
+ * Method getMapping
+ *
+ *
+ *
+ * @param index
+ * @return Mapping
+ */
+ public org.vamsas.objects.core.Mapping getMapping(int index)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _mappingList.size())) {
+ throw new IndexOutOfBoundsException("getMapping: Index value '"+index+"' not in range [0.."+_mappingList.size()+ "]");
+ }
+
+ return (org.vamsas.objects.core.Mapping) _mappingList.elementAt(index);
+ } //-- org.vamsas.objects.core.Mapping getMapping(int)
+
+ /**
+ * Method getMapping
+ *
+ *
+ *
+ * @return Mapping
+ */
+ public org.vamsas.objects.core.Mapping[] getMapping()
+ {
+ int size = _mappingList.size();
+ org.vamsas.objects.core.Mapping[] mArray = new org.vamsas.objects.core.Mapping[size];
+ for (int index = 0; index < size; index++) {
+ mArray[index] = (org.vamsas.objects.core.Mapping) _mappingList.elementAt(index);
+ }
+ return mArray;
+ } //-- org.vamsas.objects.core.Mapping[] getMapping()
+
+ /**
+ * Method getMappingCount
+ *
+ *
+ *
+ * @return int
+ */
+ public int getMappingCount()
+ {
+ return _mappingList.size();
+ } //-- int getMappingCount()
+
+ /**
* Returns the value of field 'name'.
*
* @return String
} //-- void marshal(org.xml.sax.ContentHandler)
/**
+ * Method removeAllMapping
+ *
+ */
+ public void removeAllMapping()
+ {
+ _mappingList.removeAllElements();
+ } //-- void removeAllMapping()
+
+ /**
* Method removeAllProperty
*
*/
} //-- void removeAllProperty()
/**
+ * Method removeMapping
+ *
+ *
+ *
+ * @param index
+ * @return Mapping
+ */
+ public org.vamsas.objects.core.Mapping removeMapping(int index)
+ {
+ java.lang.Object obj = _mappingList.elementAt(index);
+ _mappingList.removeElementAt(index);
+ return (org.vamsas.objects.core.Mapping) obj;
+ } //-- org.vamsas.objects.core.Mapping removeMapping(int)
+
+ /**
* Method removeProperty
*
*
} //-- void setEnd(int)
/**
+ * Method setMapping
+ *
+ *
+ *
+ * @param index
+ * @param vMapping
+ */
+ public void setMapping(int index, org.vamsas.objects.core.Mapping vMapping)
+ throws java.lang.IndexOutOfBoundsException
+ {
+ //-- check bounds for index
+ if ((index < 0) || (index > _mappingList.size())) {
+ throw new IndexOutOfBoundsException("setMapping: Index value '"+index+"' not in range [0.."+_mappingList.size()+ "]");
+ }
+ _mappingList.setElementAt(vMapping, index);
+ } //-- void setMapping(int, org.vamsas.objects.core.Mapping)
+
+ /**
+ * Method setMapping
+ *
+ *
+ *
+ * @param mappingArray
+ */
+ public void setMapping(org.vamsas.objects.core.Mapping[] mappingArray)
+ {
+ //-- copy array
+ _mappingList.removeAllElements();
+ for (int i = 0; i < mappingArray.length; i++) {
+ _mappingList.addElement(mappingArray[i]);
+ }
+ } //-- void setMapping(org.vamsas.objects.core.Mapping)
+
+ /**
* Sets the value of field 'name'.
*
* @param name the value of field 'name'.
{ //-- local scope
}
desc.setValidator(fieldValidator);
+ //-- _mappingList
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Mapping.class, "_mappingList", "mapping", org.exolab.castor.xml.NodeType.Element);
+ handler = new org.exolab.castor.xml.XMLFieldHandler() {
+ public java.lang.Object getValue( java.lang.Object object )
+ throws IllegalStateException
+ {
+ SequenceType target = (SequenceType) object;
+ return target.getMapping();
+ }
+ public void setValue( java.lang.Object object, java.lang.Object value)
+ throws IllegalStateException, IllegalArgumentException
+ {
+ try {
+ SequenceType target = (SequenceType) object;
+ target.addMapping( (org.vamsas.objects.core.Mapping) value);
+ }
+ catch (java.lang.Exception ex) {
+ throw new IllegalStateException(ex.toString());
+ }
+ }
+ public java.lang.Object newInstance( java.lang.Object parent ) {
+ return new org.vamsas.objects.core.Mapping();
+ }
+ };
+ desc.setHandler(handler);
+ desc.setNameSpaceURI("http://www.vamsas.org");
+ desc.setMultivalued(true);
+ addFieldDescriptor(desc);
+
+ //-- validation code for: _mappingList
+ fieldValidator = new org.exolab.castor.xml.FieldValidator();
+ fieldValidator.setMinOccurs(0);
+ { //-- local scope
+ }
+ desc.setValidator(fieldValidator);
} //-- org.vamsas.objects.core.SequenceTypeDescriptor()
//--------------------------/
/**
- * Primary Key for vamsas object referencing
- *
+ * Primary Key for vamsas object referencing
*/
private java.lang.String _id;
/**
- * objects with modifiable=false will not be
- * modified by a vamsas client update
- *
+ * Field _modifiable
*/
- private boolean _modifiable = true;
-
- /**
- * keeps track of state for field: _modifiable
- */
- private boolean _has_modifiable;
+ private java.lang.String _modifiable;
/**
* Field _title
} //-- void addProperty(int, org.vamsas.objects.core.Property)
/**
- * Method deleteModifiable
- *
- */
- public void deleteModifiable()
- {
- this._has_modifiable= false;
- } //-- void deleteModifiable()
-
- /**
* Method enumerateNewick
*
*
}
else if (temp._id != null)
return false;
- if (this._modifiable != temp._modifiable)
- return false;
- if (this._has_modifiable != temp._has_modifiable)
+ if (this._modifiable != null) {
+ if (temp._modifiable == null) return false;
+ else if (!(this._modifiable.equals(temp._modifiable)))
+ return false;
+ }
+ else if (temp._modifiable != null)
return false;
if (this._title != null) {
if (temp._title == null) return false;
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
- *
+ * referencing
*
* @return String
* @return the value of field 'id'.
} //-- java.lang.String getId()
/**
- * Returns the value of field 'modifiable'. The field
- * 'modifiable' has the following description: objects with
- * modifiable=false will not be
- * modified by a vamsas client update
- *
+ * Returns the value of field 'modifiable'.
*
- * @return boolean
+ * @return String
* @return the value of field 'modifiable'.
*/
- public boolean getModifiable()
+ public java.lang.String getModifiable()
{
return this._modifiable;
- } //-- boolean getModifiable()
+ } //-- java.lang.String getModifiable()
/**
* Method getNewick
} //-- java.lang.String getTitle()
/**
- * Method hasModifiable
- *
- *
- *
- * @return boolean
- */
- public boolean hasModifiable()
- {
- return this._has_modifiable;
- } //-- boolean hasModifiable()
-
- /**
* Method isValid
*
*
/**
* Sets the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
- *
+ * referencing
*
* @param id the value of field 'id'.
*/
} //-- void setId(java.lang.String)
/**
- * Sets the value of field 'modifiable'. The field 'modifiable'
- * has the following description: objects with modifiable=false
- * will not be
- * modified by a vamsas client update
- *
+ * Sets the value of field 'modifiable'.
*
* @param modifiable the value of field 'modifiable'.
*/
- public void setModifiable(boolean modifiable)
+ public void setModifiable(java.lang.String modifiable)
{
this._modifiable = modifiable;
- this._has_modifiable = true;
- } //-- void setModifiable(boolean)
+ } //-- void setModifiable(java.lang.String)
/**
* Method setNewick
}
desc.setValidator(fieldValidator);
//-- _modifiable
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
Tree target = (Tree) object;
- if(!target.hasModifiable())
- return null;
- return (target.getModifiable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ return target.getModifiable();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
Tree target = (Tree) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteModifiable();
- return;
- }
- target.setModifiable( ((java.lang.Boolean)value).booleanValue());
+ target.setModifiable( (java.lang.String) value);
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
//-- validation code for: _modifiable
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- BooleanValidator typeValidator = new BooleanValidator();
+ StringValidator typeValidator = new StringValidator();
+ typeValidator.setWhiteSpace("preserve");
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
import org.xml.sax.ContentHandler;
/**
- * contains unassociated trees and a number of analysis
- * sets
+ * contains unassociated trees and a number of analysis sets
*
*
* @version $Revision$ $Date$
//--------------------------/
/**
- * Primary Key for vamsas object referencing
- *
+ * Primary Key for vamsas object referencing
*/
private java.lang.String _id;
/**
- * objects with modifiable=false will not be
- * modified by a vamsas client update
- *
+ * Field _modifiable
*/
- private boolean _modifiable = true;
-
- /**
- * keeps track of state for field: _modifiable
- */
- private boolean _has_modifiable;
+ private java.lang.String _modifiable;
/**
* Field _treeList
} //-- void addTree(int, org.vamsas.objects.core.Tree)
/**
- * Method deleteModifiable
- *
- */
- public void deleteModifiable()
- {
- this._has_modifiable= false;
- } //-- void deleteModifiable()
-
- /**
* Method enumerateDataSet
*
*
}
else if (temp._id != null)
return false;
- if (this._modifiable != temp._modifiable)
- return false;
- if (this._has_modifiable != temp._has_modifiable)
+ if (this._modifiable != null) {
+ if (temp._modifiable == null) return false;
+ else if (!(this._modifiable.equals(temp._modifiable)))
+ return false;
+ }
+ else if (temp._modifiable != null)
return false;
if (this._treeList != null) {
if (temp._treeList == null) return false;
/**
* Returns the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
- *
+ * referencing
*
* @return String
* @return the value of field 'id'.
} //-- java.lang.String getId()
/**
- * Returns the value of field 'modifiable'. The field
- * 'modifiable' has the following description: objects with
- * modifiable=false will not be
- * modified by a vamsas client update
- *
+ * Returns the value of field 'modifiable'.
*
- * @return boolean
+ * @return String
* @return the value of field 'modifiable'.
*/
- public boolean getModifiable()
+ public java.lang.String getModifiable()
{
return this._modifiable;
- } //-- boolean getModifiable()
+ } //-- java.lang.String getModifiable()
/**
* Method getTree
} //-- int getTreeCount()
/**
- * Method hasModifiable
- *
- *
- *
- * @return boolean
- */
- public boolean hasModifiable()
- {
- return this._has_modifiable;
- } //-- boolean hasModifiable()
-
- /**
* Method isValid
*
*
/**
* Sets the value of field 'id'. The field 'id' has the
* following description: Primary Key for vamsas object
- * referencing
- *
+ * referencing
*
* @param id the value of field 'id'.
*/
} //-- void setId(java.lang.String)
/**
- * Sets the value of field 'modifiable'. The field 'modifiable'
- * has the following description: objects with modifiable=false
- * will not be
- * modified by a vamsas client update
- *
+ * Sets the value of field 'modifiable'.
*
* @param modifiable the value of field 'modifiable'.
*/
- public void setModifiable(boolean modifiable)
+ public void setModifiable(java.lang.String modifiable)
{
this._modifiable = modifiable;
- this._has_modifiable = true;
- } //-- void setModifiable(boolean)
+ } //-- void setModifiable(java.lang.String)
/**
* Method setTree
}
desc.setValidator(fieldValidator);
//-- _modifiable
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute);
+ desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
VAMSAS target = (VAMSAS) object;
- if(!target.hasModifiable())
- return null;
- return (target.getModifiable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
+ return target.getModifiable();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
VAMSAS target = (VAMSAS) object;
- // if null, use delete method for optional primitives
- if (value == null) {
- target.deleteModifiable();
- return;
- }
- target.setModifiable( ((java.lang.Boolean)value).booleanValue());
+ target.setModifiable( (java.lang.String) value);
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
//-- validation code for: _modifiable
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
- BooleanValidator typeValidator = new BooleanValidator();
+ StringValidator typeValidator = new StringValidator();
+ typeValidator.setWhiteSpace("preserve");
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
private Provenance _provenance;
/**
- * contains unassociated trees and a number of analysis
- * sets
+ * contains unassociated trees and a number of analysis sets
*
*/
private java.util.Vector _VAMSASList;