From: jprocter Date: Fri, 1 Sep 2006 16:57:38 +0000 (+0000) Subject: Java binding for new document schema (from 1st hinxton vamsas Meeting) X-Git-Tag: Release_0.2~289 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8102c1325cac1288977f498c87924264d3037151;hp=d4199f5cfea3a90baeb956c4beaa2f3e8c0597c6;p=vamsas.git Java binding for new document schema (from 1st hinxton vamsas Meeting) git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@231 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/org/vamsas/objects/core/.castor.cdr b/src/org/vamsas/objects/core/.castor.cdr index 8c7d2cf..8ec2cf3 100644 --- a/src/org/vamsas/objects/core/.castor.cdr +++ b/src/org/vamsas/objects/core/.castor.cdr @@ -1,3 +1,3 @@ --- listing properties -- -org.vamsas.objects.core.LockFile=org.vamsas.objects.core.LockFileDescr... -org.vamsas.objects.core.VamsasDocument=org.vamsas.objects.core.VamsasDocumen... +-- listing properties -- +org.vamsas.objects.core.LockFile=org.vamsas.objects.core.LockFileDescr... +org.vamsas.objects.core.VamsasDocument=org.vamsas.objects.core.VamsasDocumen... diff --git a/src/org/vamsas/objects/core/AlignmentAnnotation.java b/src/org/vamsas/objects/core/AlignmentAnnotation.java index 0bfc7f0..884c390 100644 --- a/src/org/vamsas/objects/core/AlignmentAnnotation.java +++ b/src/org/vamsas/objects/core/AlignmentAnnotation.java @@ -1,265 +1,265 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * This is annotation over the - * coordinate frame defined by all - * the columns in the alignment. - * - * - * @version $Revision$ $Date$ - */ -public class AlignmentAnnotation extends org.vamsas.objects.core.RangeAnnotation -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * TODO: decide if - * this flag is - * redundant - when - * true it would - * suggest that the - * annotationElement - * values together - * form a graph - * - */ - private boolean _graph; - - /** - * keeps track of state for field: _graph - */ - private boolean _has_graph; - - /** - * Field _provenance - */ - private org.vamsas.objects.core.Provenance _provenance; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AlignmentAnnotation() - { - super(); - } //-- org.vamsas.objects.core.AlignmentAnnotation() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteGraph - * - */ - public void deleteGraph() - { - this._has_graph= false; - } //-- void deleteGraph() - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof AlignmentAnnotation) { - - AlignmentAnnotation temp = (AlignmentAnnotation)obj; - if (this._graph != temp._graph) - return false; - if (this._has_graph != temp._has_graph) - return false; - if (this._provenance != null) { - if (temp._provenance == null) return false; - else if (!(this._provenance.equals(temp._provenance))) - return false; - } - else if (temp._provenance != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'graph'. The field 'graph' has - * the following description: TODO: decide if - * this flag is - * redundant - when - * true it would - * suggest that the - * annotationElement - * values together - * form a graph - * - * - * @return boolean - * @return the value of field 'graph'. - */ - public boolean getGraph() - { - return this._graph; - } //-- boolean getGraph() - - /** - * Returns the value of field 'provenance'. - * - * @return Provenance - * @return the value of field 'provenance'. - */ - public org.vamsas.objects.core.Provenance getProvenance() - { - return this._provenance; - } //-- org.vamsas.objects.core.Provenance getProvenance() - - /** - * Method hasGraph - * - * - * - * @return boolean - */ - public boolean hasGraph() - { - return this._has_graph; - } //-- boolean hasGraph() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'graph'. The field 'graph' has the - * following description: TODO: decide if - * this flag is - * redundant - when - * true it would - * suggest that the - * annotationElement - * values together - * form a graph - * - * - * @param graph the value of field 'graph'. - */ - public void setGraph(boolean graph) - { - this._graph = graph; - this._has_graph = true; - } //-- void setGraph(boolean) - - /** - * Sets the value of field 'provenance'. - * - * @param provenance the value of field 'provenance'. - */ - public void setProvenance(org.vamsas.objects.core.Provenance provenance) - { - this._provenance = provenance; - } //-- void setProvenance(org.vamsas.objects.core.Provenance) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return RangeType - */ - public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.AlignmentAnnotation) Unmarshaller.unmarshal(org.vamsas.objects.core.AlignmentAnnotation.class, reader); - } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * This is annotation over the + * coordinate frame defined by all + * the columns in the alignment. + * + * + * @version $Revision$ $Date$ + */ +public class AlignmentAnnotation extends org.vamsas.objects.core.RangeAnnotation +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * TODO: decide if + * this flag is + * redundant - when + * true it would + * suggest that the + * annotationElement + * values together + * form a graph + * + */ + private boolean _graph; + + /** + * keeps track of state for field: _graph + */ + private boolean _has_graph; + + /** + * Field _provenance + */ + private org.vamsas.objects.core.Provenance _provenance; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlignmentAnnotation() + { + super(); + } //-- org.vamsas.objects.core.AlignmentAnnotation() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteGraph + * + */ + public void deleteGraph() + { + this._has_graph= false; + } //-- void deleteGraph() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof AlignmentAnnotation) { + + AlignmentAnnotation temp = (AlignmentAnnotation)obj; + if (this._graph != temp._graph) + return false; + if (this._has_graph != temp._has_graph) + return false; + if (this._provenance != null) { + if (temp._provenance == null) return false; + else if (!(this._provenance.equals(temp._provenance))) + return false; + } + else if (temp._provenance != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'graph'. The field 'graph' has + * the following description: TODO: decide if + * this flag is + * redundant - when + * true it would + * suggest that the + * annotationElement + * values together + * form a graph + * + * + * @return boolean + * @return the value of field 'graph'. + */ + public boolean getGraph() + { + return this._graph; + } //-- boolean getGraph() + + /** + * Returns the value of field 'provenance'. + * + * @return Provenance + * @return the value of field 'provenance'. + */ + public org.vamsas.objects.core.Provenance getProvenance() + { + return this._provenance; + } //-- org.vamsas.objects.core.Provenance getProvenance() + + /** + * Method hasGraph + * + * + * + * @return boolean + */ + public boolean hasGraph() + { + return this._has_graph; + } //-- boolean hasGraph() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'graph'. The field 'graph' has the + * following description: TODO: decide if + * this flag is + * redundant - when + * true it would + * suggest that the + * annotationElement + * values together + * form a graph + * + * + * @param graph the value of field 'graph'. + */ + public void setGraph(boolean graph) + { + this._graph = graph; + this._has_graph = true; + } //-- void setGraph(boolean) + + /** + * Sets the value of field 'provenance'. + * + * @param provenance the value of field 'provenance'. + */ + public void setProvenance(org.vamsas.objects.core.Provenance provenance) + { + this._provenance = provenance; + } //-- void setProvenance(org.vamsas.objects.core.Provenance) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return RangeType + */ + public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.AlignmentAnnotation) Unmarshaller.unmarshal(org.vamsas.objects.core.AlignmentAnnotation.class, reader); + } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/AlignmentAnnotationDescriptor.java b/src/org/vamsas/objects/core/AlignmentAnnotationDescriptor.java index da72105..fb81a9a 100644 --- a/src/org/vamsas/objects/core/AlignmentAnnotationDescriptor.java +++ b/src/org/vamsas/objects/core/AlignmentAnnotationDescriptor.java @@ -1,255 +1,255 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class AlignmentAnnotationDescriptor. - * - * @version $Revision$ $Date$ - */ -public class AlignmentAnnotationDescriptor extends org.vamsas.objects.core.RangeAnnotationDescriptor { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AlignmentAnnotationDescriptor() - { - super(); - setExtendsWithoutFlatten(new org.vamsas.objects.core.RangeAnnotationDescriptor()); - nsURI = "http://www.vamsas.org"; - xmlName = "AlignmentAnnotation"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _graph - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_graph", "graph", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AlignmentAnnotation target = (AlignmentAnnotation) object; - if(!target.hasGraph()) - return null; - return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AlignmentAnnotation target = (AlignmentAnnotation) object; - // ignore null values for non optional primitives - if (value == null) return; - - target.setGraph( ((java.lang.Boolean)value).booleanValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _graph - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _provenance - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AlignmentAnnotation target = (AlignmentAnnotation) object; - return target.getProvenance(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AlignmentAnnotation target = (AlignmentAnnotation) object; - target.setProvenance( (org.vamsas.objects.core.Provenance) 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.Provenance(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _provenance - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- org.vamsas.objects.core.AlignmentAnnotationDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) - return super.getIdentity(); - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.AlignmentAnnotation.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class AlignmentAnnotationDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AlignmentAnnotationDescriptor extends org.vamsas.objects.core.RangeAnnotationDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlignmentAnnotationDescriptor() + { + super(); + setExtendsWithoutFlatten(new org.vamsas.objects.core.RangeAnnotationDescriptor()); + nsURI = "http://www.vamsas.org"; + xmlName = "AlignmentAnnotation"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _graph + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_graph", "graph", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AlignmentAnnotation target = (AlignmentAnnotation) object; + if(!target.hasGraph()) + return null; + return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AlignmentAnnotation target = (AlignmentAnnotation) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setGraph( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _graph + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _provenance + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AlignmentAnnotation target = (AlignmentAnnotation) object; + return target.getProvenance(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AlignmentAnnotation target = (AlignmentAnnotation) object; + target.setProvenance( (org.vamsas.objects.core.Provenance) 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.Provenance(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _provenance + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } //-- org.vamsas.objects.core.AlignmentAnnotationDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.AlignmentAnnotation.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/AlignmentSequenceAnnotation.java b/src/org/vamsas/objects/core/AlignmentSequenceAnnotation.java index 7c747d1..fe4deda 100644 --- a/src/org/vamsas/objects/core/AlignmentSequenceAnnotation.java +++ b/src/org/vamsas/objects/core/AlignmentSequenceAnnotation.java @@ -1,301 +1,301 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class AlignmentSequenceAnnotation. - * - * @version $Revision$ $Date$ - */ -public class AlignmentSequenceAnnotation extends org.vamsas.objects.core.RangeAnnotation -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * TODO: - * decide - * if - * this - * flag - * is - * redundant - * - - * when - * true - * it - * would - * suggest - * that - * the - * annotationElement - * values - * together - * form - * a - * graph - * - */ - private boolean _graph; - - /** - * keeps track of state for field: _graph - */ - private boolean _has_graph; - - /** - * Field _provenance - */ - private org.vamsas.objects.core.Provenance _provenance; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AlignmentSequenceAnnotation() - { - super(); - } //-- org.vamsas.objects.core.AlignmentSequenceAnnotation() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteGraph - * - */ - public void deleteGraph() - { - this._has_graph= false; - } //-- void deleteGraph() - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof AlignmentSequenceAnnotation) { - - AlignmentSequenceAnnotation temp = (AlignmentSequenceAnnotation)obj; - if (this._graph != temp._graph) - return false; - if (this._has_graph != temp._has_graph) - return false; - if (this._provenance != null) { - if (temp._provenance == null) return false; - else if (!(this._provenance.equals(temp._provenance))) - return false; - } - else if (temp._provenance != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'graph'. The field 'graph' has - * the following description: TODO: - * decide - * if - * this - * flag - * is - * redundant - * - - * when - * true - * it - * would - * suggest - * that - * the - * annotationElement - * values - * together - * form - * a - * graph - * - * - * @return boolean - * @return the value of field 'graph'. - */ - public boolean getGraph() - { - return this._graph; - } //-- boolean getGraph() - - /** - * Returns the value of field 'provenance'. - * - * @return Provenance - * @return the value of field 'provenance'. - */ - public org.vamsas.objects.core.Provenance getProvenance() - { - return this._provenance; - } //-- org.vamsas.objects.core.Provenance getProvenance() - - /** - * Method hasGraph - * - * - * - * @return boolean - */ - public boolean hasGraph() - { - return this._has_graph; - } //-- boolean hasGraph() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'graph'. The field 'graph' has the - * following description: TODO: - * decide - * if - * this - * flag - * is - * redundant - * - - * when - * true - * it - * would - * suggest - * that - * the - * annotationElement - * values - * together - * form - * a - * graph - * - * - * @param graph the value of field 'graph'. - */ - public void setGraph(boolean graph) - { - this._graph = graph; - this._has_graph = true; - } //-- void setGraph(boolean) - - /** - * Sets the value of field 'provenance'. - * - * @param provenance the value of field 'provenance'. - */ - public void setProvenance(org.vamsas.objects.core.Provenance provenance) - { - this._provenance = provenance; - } //-- void setProvenance(org.vamsas.objects.core.Provenance) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return RangeType - */ - public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.AlignmentSequenceAnnotation) Unmarshaller.unmarshal(org.vamsas.objects.core.AlignmentSequenceAnnotation.class, reader); - } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class AlignmentSequenceAnnotation. + * + * @version $Revision$ $Date$ + */ +public class AlignmentSequenceAnnotation extends org.vamsas.objects.core.RangeAnnotation +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * TODO: + * decide + * if + * this + * flag + * is + * redundant + * - + * when + * true + * it + * would + * suggest + * that + * the + * annotationElement + * values + * together + * form + * a + * graph + * + */ + private boolean _graph; + + /** + * keeps track of state for field: _graph + */ + private boolean _has_graph; + + /** + * Field _provenance + */ + private org.vamsas.objects.core.Provenance _provenance; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlignmentSequenceAnnotation() + { + super(); + } //-- org.vamsas.objects.core.AlignmentSequenceAnnotation() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteGraph + * + */ + public void deleteGraph() + { + this._has_graph= false; + } //-- void deleteGraph() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof AlignmentSequenceAnnotation) { + + AlignmentSequenceAnnotation temp = (AlignmentSequenceAnnotation)obj; + if (this._graph != temp._graph) + return false; + if (this._has_graph != temp._has_graph) + return false; + if (this._provenance != null) { + if (temp._provenance == null) return false; + else if (!(this._provenance.equals(temp._provenance))) + return false; + } + else if (temp._provenance != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'graph'. The field 'graph' has + * the following description: TODO: + * decide + * if + * this + * flag + * is + * redundant + * - + * when + * true + * it + * would + * suggest + * that + * the + * annotationElement + * values + * together + * form + * a + * graph + * + * + * @return boolean + * @return the value of field 'graph'. + */ + public boolean getGraph() + { + return this._graph; + } //-- boolean getGraph() + + /** + * Returns the value of field 'provenance'. + * + * @return Provenance + * @return the value of field 'provenance'. + */ + public org.vamsas.objects.core.Provenance getProvenance() + { + return this._provenance; + } //-- org.vamsas.objects.core.Provenance getProvenance() + + /** + * Method hasGraph + * + * + * + * @return boolean + */ + public boolean hasGraph() + { + return this._has_graph; + } //-- boolean hasGraph() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'graph'. The field 'graph' has the + * following description: TODO: + * decide + * if + * this + * flag + * is + * redundant + * - + * when + * true + * it + * would + * suggest + * that + * the + * annotationElement + * values + * together + * form + * a + * graph + * + * + * @param graph the value of field 'graph'. + */ + public void setGraph(boolean graph) + { + this._graph = graph; + this._has_graph = true; + } //-- void setGraph(boolean) + + /** + * Sets the value of field 'provenance'. + * + * @param provenance the value of field 'provenance'. + */ + public void setProvenance(org.vamsas.objects.core.Provenance provenance) + { + this._provenance = provenance; + } //-- void setProvenance(org.vamsas.objects.core.Provenance) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return RangeType + */ + public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.AlignmentSequenceAnnotation) Unmarshaller.unmarshal(org.vamsas.objects.core.AlignmentSequenceAnnotation.class, reader); + } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/AlignmentSequenceAnnotationDescriptor.java b/src/org/vamsas/objects/core/AlignmentSequenceAnnotationDescriptor.java index 722269d..a4aa126 100644 --- a/src/org/vamsas/objects/core/AlignmentSequenceAnnotationDescriptor.java +++ b/src/org/vamsas/objects/core/AlignmentSequenceAnnotationDescriptor.java @@ -1,255 +1,255 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class AlignmentSequenceAnnotationDescriptor. - * - * @version $Revision$ $Date$ - */ -public class AlignmentSequenceAnnotationDescriptor extends org.vamsas.objects.core.RangeAnnotationDescriptor { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AlignmentSequenceAnnotationDescriptor() - { - super(); - setExtendsWithoutFlatten(new org.vamsas.objects.core.RangeAnnotationDescriptor()); - nsURI = "http://www.vamsas.org"; - xmlName = "AlignmentSequenceAnnotation"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _graph - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_graph", "graph", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object; - if(!target.hasGraph()) - return null; - return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object; - // ignore null values for non optional primitives - if (value == null) return; - - target.setGraph( ((java.lang.Boolean)value).booleanValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _graph - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _provenance - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object; - return target.getProvenance(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object; - target.setProvenance( (org.vamsas.objects.core.Provenance) 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.Provenance(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _provenance - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- org.vamsas.objects.core.AlignmentSequenceAnnotationDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) - return super.getIdentity(); - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.AlignmentSequenceAnnotation.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class AlignmentSequenceAnnotationDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AlignmentSequenceAnnotationDescriptor extends org.vamsas.objects.core.RangeAnnotationDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AlignmentSequenceAnnotationDescriptor() + { + super(); + setExtendsWithoutFlatten(new org.vamsas.objects.core.RangeAnnotationDescriptor()); + nsURI = "http://www.vamsas.org"; + xmlName = "AlignmentSequenceAnnotation"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _graph + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_graph", "graph", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object; + if(!target.hasGraph()) + return null; + return (target.getGraph() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setGraph( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _graph + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _provenance + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object; + return target.getProvenance(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AlignmentSequenceAnnotation target = (AlignmentSequenceAnnotation) object; + target.setProvenance( (org.vamsas.objects.core.Provenance) 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.Provenance(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _provenance + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } //-- org.vamsas.objects.core.AlignmentSequenceAnnotationDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.AlignmentSequenceAnnotation.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/AppData.java b/src/org/vamsas/objects/core/AppData.java index 95a51d6..168bc6b 100644 --- a/src/org/vamsas/objects/core/AppData.java +++ b/src/org/vamsas/objects/core/AppData.java @@ -1,239 +1,239 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class AppData. - * - * @version $Revision$ $Date$ - */ -public class AppData extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Internal choice value storage - */ - private java.lang.Object _choiceValue; - - /** - * Field _data - */ - private byte[] _data; - - /** - * Field _dataReference - */ - private java.lang.String _dataReference; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AppData() - { - super(); - } //-- org.vamsas.objects.core.AppData() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof AppData) { - - AppData temp = (AppData)obj; - if (this._choiceValue != null) { - if (temp._choiceValue == null) return false; - else if (!(this._choiceValue.equals(temp._choiceValue))) - return false; - } - else if (temp._choiceValue != null) - return false; - if (this._data != null) { - if (temp._data == null) return false; - else if (!(this._data.equals(temp._data))) - return false; - } - else if (temp._data != null) - return false; - if (this._dataReference != null) { - if (temp._dataReference == null) return false; - else if (!(this._dataReference.equals(temp._dataReference))) - return false; - } - else if (temp._dataReference != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'choiceValue'. The field - * 'choiceValue' has the following description: Internal choice - * value storage - * - * @return Object - * @return the value of field 'choiceValue'. - */ - public java.lang.Object getChoiceValue() - { - return this._choiceValue; - } //-- java.lang.Object getChoiceValue() - - /** - * Returns the value of field 'data'. - * - * @return byte - * @return the value of field 'data'. - */ - public byte[] getData() - { - return this._data; - } //-- byte[] getData() - - /** - * Returns the value of field 'dataReference'. - * - * @return String - * @return the value of field 'dataReference'. - */ - public java.lang.String getDataReference() - { - return this._dataReference; - } //-- java.lang.String getDataReference() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'data'. - * - * @param data the value of field 'data'. - */ - public void setData(byte[] data) - { - this._data = data; - this._choiceValue = data; - } //-- void setData(byte) - - /** - * Sets the value of field 'dataReference'. - * - * @param dataReference the value of field 'dataReference'. - */ - public void setDataReference(java.lang.String dataReference) - { - this._dataReference = dataReference; - this._choiceValue = dataReference; - } //-- void setDataReference(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return AppData - */ - public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.AppData) Unmarshaller.unmarshal(org.vamsas.objects.core.AppData.class, reader); - } //-- org.vamsas.objects.core.AppData unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class AppData. + * + * @version $Revision$ $Date$ + */ +public class AppData extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Internal choice value storage + */ + private java.lang.Object _choiceValue; + + /** + * Field _data + */ + private byte[] _data; + + /** + * Field _dataReference + */ + private java.lang.String _dataReference; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AppData() + { + super(); + } //-- org.vamsas.objects.core.AppData() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof AppData) { + + AppData temp = (AppData)obj; + if (this._choiceValue != null) { + if (temp._choiceValue == null) return false; + else if (!(this._choiceValue.equals(temp._choiceValue))) + return false; + } + else if (temp._choiceValue != null) + return false; + if (this._data != null) { + if (temp._data == null) return false; + else if (!(this._data.equals(temp._data))) + return false; + } + else if (temp._data != null) + return false; + if (this._dataReference != null) { + if (temp._dataReference == null) return false; + else if (!(this._dataReference.equals(temp._dataReference))) + return false; + } + else if (temp._dataReference != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'choiceValue'. The field + * 'choiceValue' has the following description: Internal choice + * value storage + * + * @return Object + * @return the value of field 'choiceValue'. + */ + public java.lang.Object getChoiceValue() + { + return this._choiceValue; + } //-- java.lang.Object getChoiceValue() + + /** + * Returns the value of field 'data'. + * + * @return byte + * @return the value of field 'data'. + */ + public byte[] getData() + { + return this._data; + } //-- byte[] getData() + + /** + * Returns the value of field 'dataReference'. + * + * @return String + * @return the value of field 'dataReference'. + */ + public java.lang.String getDataReference() + { + return this._dataReference; + } //-- java.lang.String getDataReference() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'data'. + * + * @param data the value of field 'data'. + */ + public void setData(byte[] data) + { + this._data = data; + this._choiceValue = data; + } //-- void setData(byte) + + /** + * Sets the value of field 'dataReference'. + * + * @param dataReference the value of field 'dataReference'. + */ + public void setDataReference(java.lang.String dataReference) + { + this._dataReference = dataReference; + this._choiceValue = dataReference; + } //-- void setDataReference(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return AppData + */ + public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.AppData) Unmarshaller.unmarshal(org.vamsas.objects.core.AppData.class, reader); + } //-- org.vamsas.objects.core.AppData unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/AppDataDescriptor.java b/src/org/vamsas/objects/core/AppDataDescriptor.java index 50377d3..d0eeab9 100644 --- a/src/org/vamsas/objects/core/AppDataDescriptor.java +++ b/src/org/vamsas/objects/core/AppDataDescriptor.java @@ -1,250 +1,250 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class AppDataDescriptor. - * - * @version $Revision$ $Date$ - */ -public class AppDataDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AppDataDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "appData"; - - //-- set grouping compositor - setCompositorAsChoice(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- initialize element descriptors - - //-- _data - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(byte[].class, "_data", "data", org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AppData target = (AppData) object; - return target.getData(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AppData target = (AppData) object; - target.setData( (byte[]) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _data - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _dataReference - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dataReference", "dataReference", org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - AppData target = (AppData) object; - return target.getDataReference(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - AppData target = (AppData) object; - target.setDataReference( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _dataReference - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - } //-- org.vamsas.objects.core.AppDataDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.AppData.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class AppDataDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AppDataDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AppDataDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "appData"; + + //-- set grouping compositor + setCompositorAsChoice(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _data + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(byte[].class, "_data", "data", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AppData target = (AppData) object; + return target.getData(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AppData target = (AppData) object; + target.setData( (byte[]) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _data + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _dataReference + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dataReference", "dataReference", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + AppData target = (AppData) object; + return target.getDataReference(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + AppData target = (AppData) object; + target.setDataReference( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _dataReference + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + } //-- org.vamsas.objects.core.AppDataDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.AppData.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Attachment.java b/src/org/vamsas/objects/core/Attachment.java index a906c00..198f046 100644 --- a/src/org/vamsas/objects/core/Attachment.java +++ b/src/org/vamsas/objects/core/Attachment.java @@ -1,341 +1,341 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class Attachment. - * - * @version $Revision$ $Date$ - */ -public class Attachment extends org.vamsas.objects.core.AppData -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * true implies data will be decompresses - * with Zip before presenting to - * application - * - */ - private boolean _compressed = false; - - /** - * keeps track of state for field: _compressed - */ - private boolean _has_compressed; - - /** - * Type of arbitrary data - TODO: decide - * format - use (extended) MIME types ? - * - */ - private java.lang.String _type; - - /** - * Object the arbitrary data is associated - * with - * - */ - private java.lang.Object _objectref; - - /** - * Primary Key for vamsas object - * referencing - * - */ - private java.lang.String _id; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Attachment() - { - super(); - } //-- org.vamsas.objects.core.Attachment() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteCompressed - * - */ - public void deleteCompressed() - { - this._has_compressed= false; - } //-- void deleteCompressed() - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Attachment) { - - Attachment temp = (Attachment)obj; - if (this._compressed != temp._compressed) - return false; - if (this._has_compressed != temp._has_compressed) - return false; - if (this._type != null) { - if (temp._type == null) return false; - else if (!(this._type.equals(temp._type))) - return false; - } - else if (temp._type != null) - return false; - if (this._objectref != null) { - if (temp._objectref == null) return false; - else if (!(this._objectref.equals(temp._objectref))) - return false; - } - else if (temp._objectref != null) - return false; - if (this._id != null) { - if (temp._id == null) return false; - else if (!(this._id.equals(temp._id))) - return false; - } - else if (temp._id != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'compressed'. The field - * 'compressed' has the following description: true implies - * data will be decompresses - * with Zip before presenting to - * application - * - * - * @return boolean - * @return the value of field 'compressed'. - */ - public boolean getCompressed() - { - return this._compressed; - } //-- boolean getCompressed() - - /** - * Returns the value of field 'id'. The field 'id' has the - * following description: Primary Key for vamsas object - * referencing - * - * - * @return String - * @return the value of field 'id'. - */ - public java.lang.String getId() - { - return this._id; - } //-- java.lang.String getId() - - /** - * Returns the value of field 'objectref'. The field - * 'objectref' has the following description: Object the - * arbitrary data is associated - * with - * - * - * @return Object - * @return the value of field 'objectref'. - */ - public java.lang.Object getObjectref() - { - return this._objectref; - } //-- java.lang.Object getObjectref() - - /** - * Returns the value of field 'type'. The field 'type' has the - * following description: Type of arbitrary data - TODO: decide - * format - use (extended) MIME types ? - * - * - * @return String - * @return the value of field 'type'. - */ - public java.lang.String getType() - { - return this._type; - } //-- java.lang.String getType() - - /** - * Method hasCompressed - * - * - * - * @return boolean - */ - public boolean hasCompressed() - { - return this._has_compressed; - } //-- boolean hasCompressed() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'compressed'. The field 'compressed' - * has the following description: true implies data will be - * decompresses - * with Zip before presenting to - * application - * - * - * @param compressed the value of field 'compressed'. - */ - public void setCompressed(boolean compressed) - { - this._compressed = compressed; - this._has_compressed = true; - } //-- void setCompressed(boolean) - - /** - * Sets the value of field 'id'. The field 'id' has the - * following description: Primary Key for vamsas object - * referencing - * - * - * @param id the value of field 'id'. - */ - public void setId(java.lang.String id) - { - this._id = id; - } //-- void setId(java.lang.String) - - /** - * Sets the value of field 'objectref'. The field 'objectref' - * has the following description: Object the arbitrary data is - * associated - * with - * - * - * @param objectref the value of field 'objectref'. - */ - public void setObjectref(java.lang.Object objectref) - { - this._objectref = objectref; - } //-- void setObjectref(java.lang.Object) - - /** - * Sets the value of field 'type'. The field 'type' has the - * following description: Type of arbitrary data - TODO: decide - * format - use (extended) MIME types ? - * - * - * @param type the value of field 'type'. - */ - public void setType(java.lang.String type) - { - this._type = type; - } //-- void setType(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return AppData - */ - public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Attachment) Unmarshaller.unmarshal(org.vamsas.objects.core.Attachment.class, reader); - } //-- org.vamsas.objects.core.AppData unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Attachment. + * + * @version $Revision$ $Date$ + */ +public class Attachment extends org.vamsas.objects.core.AppData +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * true implies data will be decompresses + * with Zip before presenting to + * application + * + */ + private boolean _compressed = false; + + /** + * keeps track of state for field: _compressed + */ + private boolean _has_compressed; + + /** + * Type of arbitrary data - TODO: decide + * format - use (extended) MIME types ? + * + */ + private java.lang.String _type; + + /** + * Object the arbitrary data is associated + * with + * + */ + private java.lang.Object _objectref; + + /** + * Primary Key for vamsas object + * referencing + * + */ + private java.lang.String _id; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Attachment() + { + super(); + } //-- org.vamsas.objects.core.Attachment() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteCompressed + * + */ + public void deleteCompressed() + { + this._has_compressed= false; + } //-- void deleteCompressed() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Attachment) { + + Attachment temp = (Attachment)obj; + if (this._compressed != temp._compressed) + return false; + if (this._has_compressed != temp._has_compressed) + return false; + if (this._type != null) { + if (temp._type == null) return false; + else if (!(this._type.equals(temp._type))) + return false; + } + else if (temp._type != null) + return false; + if (this._objectref != null) { + if (temp._objectref == null) return false; + else if (!(this._objectref.equals(temp._objectref))) + return false; + } + else if (temp._objectref != null) + return false; + if (this._id != null) { + if (temp._id == null) return false; + else if (!(this._id.equals(temp._id))) + return false; + } + else if (temp._id != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'compressed'. The field + * 'compressed' has the following description: true implies + * data will be decompresses + * with Zip before presenting to + * application + * + * + * @return boolean + * @return the value of field 'compressed'. + */ + public boolean getCompressed() + { + return this._compressed; + } //-- boolean getCompressed() + + /** + * Returns the value of field 'id'. The field 'id' has the + * following description: Primary Key for vamsas object + * referencing + * + * + * @return String + * @return the value of field 'id'. + */ + public java.lang.String getId() + { + return this._id; + } //-- java.lang.String getId() + + /** + * Returns the value of field 'objectref'. The field + * 'objectref' has the following description: Object the + * arbitrary data is associated + * with + * + * + * @return Object + * @return the value of field 'objectref'. + */ + public java.lang.Object getObjectref() + { + return this._objectref; + } //-- java.lang.Object getObjectref() + + /** + * Returns the value of field 'type'. The field 'type' has the + * following description: Type of arbitrary data - TODO: decide + * format - use (extended) MIME types ? + * + * + * @return String + * @return the value of field 'type'. + */ + public java.lang.String getType() + { + return this._type; + } //-- java.lang.String getType() + + /** + * Method hasCompressed + * + * + * + * @return boolean + */ + public boolean hasCompressed() + { + return this._has_compressed; + } //-- boolean hasCompressed() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'compressed'. The field 'compressed' + * has the following description: true implies data will be + * decompresses + * with Zip before presenting to + * application + * + * + * @param compressed the value of field 'compressed'. + */ + public void setCompressed(boolean compressed) + { + this._compressed = compressed; + this._has_compressed = true; + } //-- void setCompressed(boolean) + + /** + * Sets the value of field 'id'. The field 'id' has the + * following description: Primary Key for vamsas object + * referencing + * + * + * @param id the value of field 'id'. + */ + public void setId(java.lang.String id) + { + this._id = id; + } //-- void setId(java.lang.String) + + /** + * Sets the value of field 'objectref'. The field 'objectref' + * has the following description: Object the arbitrary data is + * associated + * with + * + * + * @param objectref the value of field 'objectref'. + */ + public void setObjectref(java.lang.Object objectref) + { + this._objectref = objectref; + } //-- void setObjectref(java.lang.Object) + + /** + * Sets the value of field 'type'. The field 'type' has the + * following description: Type of arbitrary data - TODO: decide + * format - use (extended) MIME types ? + * + * + * @param type the value of field 'type'. + */ + public void setType(java.lang.String type) + { + this._type = type; + } //-- void setType(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return AppData + */ + public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Attachment) Unmarshaller.unmarshal(org.vamsas.objects.core.Attachment.class, reader); + } //-- org.vamsas.objects.core.AppData unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/AttachmentDescriptor.java b/src/org/vamsas/objects/core/AttachmentDescriptor.java index d22591c..e2669da 100644 --- a/src/org/vamsas/objects/core/AttachmentDescriptor.java +++ b/src/org/vamsas/objects/core/AttachmentDescriptor.java @@ -1,325 +1,325 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class AttachmentDescriptor. - * - * @version $Revision$ $Date$ - */ -public class AttachmentDescriptor extends org.vamsas.objects.core.AppDataDescriptor { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public AttachmentDescriptor() - { - super(); - setExtendsWithoutFlatten(new org.vamsas.objects.core.AppDataDescriptor()); - nsURI = "http://www.vamsas.org"; - xmlName = "Attachment"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _compressed - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_compressed", "compressed", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Attachment target = (Attachment) object; - if(!target.hasCompressed()) - return null; - return (target.getCompressed() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Attachment target = (Attachment) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteCompressed(); - return; - } - target.setCompressed( ((java.lang.Boolean)value).booleanValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _compressed - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _type - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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 - { - Attachment target = (Attachment) object; - return target.getType(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Attachment target = (Attachment) object; - target.setType( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _type - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _objectref - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_objectref", "objectref", org.exolab.castor.xml.NodeType.Attribute); - desc.setReference(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Attachment target = (Attachment) object; - return target.getObjectref(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Attachment target = (Attachment) object; - target.setObjectref( (java.lang.Object) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return new java.lang.Object(); - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _objectref - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _id - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); - this.identity = desc; - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Attachment target = (Attachment) object; - return target.getId(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Attachment target = (Attachment) object; - target.setId( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return new java.lang.String(); - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _id - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.AttachmentDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) - return super.getIdentity(); - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Attachment.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class AttachmentDescriptor. + * + * @version $Revision$ $Date$ + */ +public class AttachmentDescriptor extends org.vamsas.objects.core.AppDataDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public AttachmentDescriptor() + { + super(); + setExtendsWithoutFlatten(new org.vamsas.objects.core.AppDataDescriptor()); + nsURI = "http://www.vamsas.org"; + xmlName = "Attachment"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _compressed + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_compressed", "compressed", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Attachment target = (Attachment) object; + if(!target.hasCompressed()) + return null; + return (target.getCompressed() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Attachment target = (Attachment) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteCompressed(); + return; + } + target.setCompressed( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _compressed + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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 + { + Attachment target = (Attachment) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Attachment target = (Attachment) object; + target.setType( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _objectref + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_objectref", "objectref", org.exolab.castor.xml.NodeType.Attribute); + desc.setReference(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Attachment target = (Attachment) object; + return target.getObjectref(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Attachment target = (Attachment) object; + target.setObjectref( (java.lang.Object) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new java.lang.Object(); + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _objectref + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + this.identity = desc; + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Attachment target = (Attachment) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Attachment target = (Attachment) object; + target.setId( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new java.lang.String(); + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _id + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.AttachmentDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Attachment.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Common.java b/src/org/vamsas/objects/core/Common.java index 15fa948..3fdab82 100644 --- a/src/org/vamsas/objects/core/Common.java +++ b/src/org/vamsas/objects/core/Common.java @@ -1,141 +1,141 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class Common. - * - * @version $Revision$ $Date$ - */ -public class Common extends org.vamsas.objects.core.AppData -implements java.io.Serializable -{ - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Common() - { - super(); - } //-- org.vamsas.objects.core.Common() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Common) { - - Common temp = (Common)obj; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return AppData - */ - public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Common) Unmarshaller.unmarshal(org.vamsas.objects.core.Common.class, reader); - } //-- org.vamsas.objects.core.AppData unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Common. + * + * @version $Revision$ $Date$ + */ +public class Common extends org.vamsas.objects.core.AppData +implements java.io.Serializable +{ + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Common() + { + super(); + } //-- org.vamsas.objects.core.Common() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Common) { + + Common temp = (Common)obj; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return AppData + */ + public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Common) Unmarshaller.unmarshal(org.vamsas.objects.core.Common.class, reader); + } //-- org.vamsas.objects.core.AppData unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/CommonDescriptor.java b/src/org/vamsas/objects/core/CommonDescriptor.java index 4fe6efa..c7bc7e0 100644 --- a/src/org/vamsas/objects/core/CommonDescriptor.java +++ b/src/org/vamsas/objects/core/CommonDescriptor.java @@ -1,167 +1,167 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class CommonDescriptor. - * - * @version $Revision$ $Date$ - */ -public class CommonDescriptor extends org.vamsas.objects.core.AppDataDescriptor { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public CommonDescriptor() - { - super(); - setExtendsWithoutFlatten(new org.vamsas.objects.core.AppDataDescriptor()); - nsURI = "http://www.vamsas.org"; - xmlName = "Common"; - } //-- org.vamsas.objects.core.CommonDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) - return super.getIdentity(); - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Common.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class CommonDescriptor. + * + * @version $Revision$ $Date$ + */ +public class CommonDescriptor extends org.vamsas.objects.core.AppDataDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public CommonDescriptor() + { + super(); + setExtendsWithoutFlatten(new org.vamsas.objects.core.AppDataDescriptor()); + nsURI = "http://www.vamsas.org"; + xmlName = "Common"; + } //-- org.vamsas.objects.core.CommonDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Common.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Glyph.java b/src/org/vamsas/objects/core/Glyph.java index 0340435..8fcc98e 100644 --- a/src/org/vamsas/objects/core/Glyph.java +++ b/src/org/vamsas/objects/core/Glyph.java @@ -1,247 +1,247 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Discrete symbol - possibly graphically - * represented - * - * - * @version $Revision$ $Date$ - */ -public class Glyph extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * internal content storage - */ - private java.lang.String _content = ""; - - /** - * specifies the symbol - * dictionary for this glyph - - * eg utf8 (the default), - * aasecstr_3 or - * kd_hydrophobicity - the - * content is not validated so - * applications must ensure - * they gracefully deal with - * invalid entries here - * - */ - private java.lang.String _dict = "utf8"; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Glyph() - { - super(); - setContent(""); - setDict("utf8"); - } //-- org.vamsas.objects.core.Glyph() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Glyph) { - - Glyph temp = (Glyph)obj; - if (this._content != null) { - if (temp._content == null) return false; - else if (!(this._content.equals(temp._content))) - return false; - } - else if (temp._content != null) - return false; - if (this._dict != null) { - if (temp._dict == null) return false; - else if (!(this._dict.equals(temp._dict))) - return false; - } - else if (temp._dict != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'content'. The field 'content' - * has the following description: internal content storage - * - * @return String - * @return the value of field 'content'. - */ - public java.lang.String getContent() - { - return this._content; - } //-- java.lang.String getContent() - - /** - * Returns the value of field 'dict'. The field 'dict' has the - * following description: specifies the symbol - * dictionary for this glyph - - * eg utf8 (the default), - * aasecstr_3 or - * kd_hydrophobicity - the - * content is not validated so - * applications must ensure - * they gracefully deal with - * invalid entries here - * - * - * @return String - * @return the value of field 'dict'. - */ - public java.lang.String getDict() - { - return this._dict; - } //-- java.lang.String getDict() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'content'. The field 'content' has - * the following description: internal content storage - * - * @param content the value of field 'content'. - */ - public void setContent(java.lang.String content) - { - this._content = content; - } //-- void setContent(java.lang.String) - - /** - * Sets the value of field 'dict'. The field 'dict' has the - * following description: specifies the symbol - * dictionary for this glyph - - * eg utf8 (the default), - * aasecstr_3 or - * kd_hydrophobicity - the - * content is not validated so - * applications must ensure - * they gracefully deal with - * invalid entries here - * - * - * @param dict the value of field 'dict'. - */ - public void setDict(java.lang.String dict) - { - this._dict = dict; - } //-- void setDict(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return Glyph - */ - public static org.vamsas.objects.core.Glyph unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Glyph) Unmarshaller.unmarshal(org.vamsas.objects.core.Glyph.class, reader); - } //-- org.vamsas.objects.core.Glyph unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Discrete symbol - possibly graphically + * represented + * + * + * @version $Revision$ $Date$ + */ +public class Glyph extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * internal content storage + */ + private java.lang.String _content = ""; + + /** + * specifies the symbol + * dictionary for this glyph - + * eg utf8 (the default), + * aasecstr_3 or + * kd_hydrophobicity - the + * content is not validated so + * applications must ensure + * they gracefully deal with + * invalid entries here + * + */ + private java.lang.String _dict = "utf8"; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Glyph() + { + super(); + setContent(""); + setDict("utf8"); + } //-- org.vamsas.objects.core.Glyph() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Glyph) { + + Glyph temp = (Glyph)obj; + if (this._content != null) { + if (temp._content == null) return false; + else if (!(this._content.equals(temp._content))) + return false; + } + else if (temp._content != null) + return false; + if (this._dict != null) { + if (temp._dict == null) return false; + else if (!(this._dict.equals(temp._dict))) + return false; + } + else if (temp._dict != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'content'. The field 'content' + * has the following description: internal content storage + * + * @return String + * @return the value of field 'content'. + */ + public java.lang.String getContent() + { + return this._content; + } //-- java.lang.String getContent() + + /** + * Returns the value of field 'dict'. The field 'dict' has the + * following description: specifies the symbol + * dictionary for this glyph - + * eg utf8 (the default), + * aasecstr_3 or + * kd_hydrophobicity - the + * content is not validated so + * applications must ensure + * they gracefully deal with + * invalid entries here + * + * + * @return String + * @return the value of field 'dict'. + */ + public java.lang.String getDict() + { + return this._dict; + } //-- java.lang.String getDict() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'content'. The field 'content' has + * the following description: internal content storage + * + * @param content the value of field 'content'. + */ + public void setContent(java.lang.String content) + { + this._content = content; + } //-- void setContent(java.lang.String) + + /** + * Sets the value of field 'dict'. The field 'dict' has the + * following description: specifies the symbol + * dictionary for this glyph - + * eg utf8 (the default), + * aasecstr_3 or + * kd_hydrophobicity - the + * content is not validated so + * applications must ensure + * they gracefully deal with + * invalid entries here + * + * + * @param dict the value of field 'dict'. + */ + public void setDict(java.lang.String dict) + { + this._dict = dict; + } //-- void setDict(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Glyph + */ + public static org.vamsas.objects.core.Glyph unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Glyph) Unmarshaller.unmarshal(org.vamsas.objects.core.Glyph.class, reader); + } //-- org.vamsas.objects.core.Glyph unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/GlyphDescriptor.java b/src/org/vamsas/objects/core/GlyphDescriptor.java index 9ee3c8c..e1d6966 100644 --- a/src/org/vamsas/objects/core/GlyphDescriptor.java +++ b/src/org/vamsas/objects/core/GlyphDescriptor.java @@ -1,244 +1,244 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class GlyphDescriptor. - * - * @version $Revision$ $Date$ - */ -public class GlyphDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public GlyphDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "glyph"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- _content - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Glyph target = (Glyph) object; - return target.getContent(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Glyph target = (Glyph) object; - target.setContent( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _content - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize attribute descriptors - - //-- _dict - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dict", "dict", 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 - { - Glyph target = (Glyph) object; - return target.getDict(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Glyph target = (Glyph) object; - target.setDict( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _dict - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.GlyphDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Glyph.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class GlyphDescriptor. + * + * @version $Revision$ $Date$ + */ +public class GlyphDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public GlyphDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "glyph"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- _content + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Glyph target = (Glyph) object; + return target.getContent(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Glyph target = (Glyph) object; + target.setContent( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _content + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize attribute descriptors + + //-- _dict + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_dict", "dict", 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 + { + Glyph target = (Glyph) object; + return target.getDict(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Glyph target = (Glyph) object; + target.setDict( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _dict + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.GlyphDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Glyph.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Input.java b/src/org/vamsas/objects/core/Input.java index 9b737dd..e60a564 100644 --- a/src/org/vamsas/objects/core/Input.java +++ b/src/org/vamsas/objects/core/Input.java @@ -1,220 +1,220 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class Input. - * - * @version $Revision$ $Date$ - */ -public class Input extends org.vamsas.objects.core.RangeType -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _name - */ - private java.lang.String _name; - - /** - * Reference Frame for rangeType - * specfication - * - */ - private java.lang.Object _objRef; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Input() - { - super(); - } //-- org.vamsas.objects.core.Input() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Input) { - - Input temp = (Input)obj; - if (this._name != null) { - if (temp._name == null) return false; - else if (!(this._name.equals(temp._name))) - return false; - } - else if (temp._name != null) - return false; - if (this._objRef != null) { - if (temp._objRef == null) return false; - else if (!(this._objRef.equals(temp._objRef))) - return false; - } - else if (temp._objRef != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'name'. - * - * @return String - * @return the value of field 'name'. - */ - public java.lang.String getName() - { - return this._name; - } //-- java.lang.String getName() - - /** - * Returns the value of field 'objRef'. The field 'objRef' has - * the following description: Reference Frame for rangeType - * specfication - * - * - * @return Object - * @return the value of field 'objRef'. - */ - public java.lang.Object getObjRef() - { - return this._objRef; - } //-- java.lang.Object getObjRef() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'name'. - * - * @param name the value of field 'name'. - */ - public void setName(java.lang.String name) - { - this._name = name; - } //-- void setName(java.lang.String) - - /** - * Sets the value of field 'objRef'. The field 'objRef' has the - * following description: Reference Frame for rangeType - * specfication - * - * - * @param objRef the value of field 'objRef'. - */ - public void setObjRef(java.lang.Object objRef) - { - this._objRef = objRef; - } //-- void setObjRef(java.lang.Object) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return RangeType - */ - public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Input) Unmarshaller.unmarshal(org.vamsas.objects.core.Input.class, reader); - } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Input. + * + * @version $Revision$ $Date$ + */ +public class Input extends org.vamsas.objects.core.RangeType +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _name + */ + private java.lang.String _name; + + /** + * Reference Frame for rangeType + * specfication + * + */ + private java.lang.Object _objRef; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Input() + { + super(); + } //-- org.vamsas.objects.core.Input() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Input) { + + Input temp = (Input)obj; + if (this._name != null) { + if (temp._name == null) return false; + else if (!(this._name.equals(temp._name))) + return false; + } + else if (temp._name != null) + return false; + if (this._objRef != null) { + if (temp._objRef == null) return false; + else if (!(this._objRef.equals(temp._objRef))) + return false; + } + else if (temp._objRef != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'name'. + * + * @return String + * @return the value of field 'name'. + */ + public java.lang.String getName() + { + return this._name; + } //-- java.lang.String getName() + + /** + * Returns the value of field 'objRef'. The field 'objRef' has + * the following description: Reference Frame for rangeType + * specfication + * + * + * @return Object + * @return the value of field 'objRef'. + */ + public java.lang.Object getObjRef() + { + return this._objRef; + } //-- java.lang.Object getObjRef() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName(java.lang.String name) + { + this._name = name; + } //-- void setName(java.lang.String) + + /** + * Sets the value of field 'objRef'. The field 'objRef' has the + * following description: Reference Frame for rangeType + * specfication + * + * + * @param objRef the value of field 'objRef'. + */ + public void setObjRef(java.lang.Object objRef) + { + this._objRef = objRef; + } //-- void setObjRef(java.lang.Object) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return RangeType + */ + public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Input) Unmarshaller.unmarshal(org.vamsas.objects.core.Input.class, reader); + } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/InputDescriptor.java b/src/org/vamsas/objects/core/InputDescriptor.java index e4d1130..56cc4b5 100644 --- a/src/org/vamsas/objects/core/InputDescriptor.java +++ b/src/org/vamsas/objects/core/InputDescriptor.java @@ -1,247 +1,247 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class InputDescriptor. - * - * @version $Revision$ $Date$ - */ -public class InputDescriptor extends org.vamsas.objects.core.RangeTypeDescriptor { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public InputDescriptor() - { - super(); - setExtendsWithoutFlatten(new org.vamsas.objects.core.RangeTypeDescriptor()); - nsURI = "http://www.vamsas.org"; - xmlName = "input"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _name - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", 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 - { - Input target = (Input) object; - return target.getName(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Input target = (Input) object; - target.setName( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _name - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _objRef - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_objRef", "objRef", org.exolab.castor.xml.NodeType.Attribute); - desc.setReference(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Input target = (Input) object; - return target.getObjRef(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Input target = (Input) object; - target.setObjRef( (java.lang.Object) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return new java.lang.Object(); - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _objRef - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.InputDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) - return super.getIdentity(); - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Input.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class InputDescriptor. + * + * @version $Revision$ $Date$ + */ +public class InputDescriptor extends org.vamsas.objects.core.RangeTypeDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public InputDescriptor() + { + super(); + setExtendsWithoutFlatten(new org.vamsas.objects.core.RangeTypeDescriptor()); + nsURI = "http://www.vamsas.org"; + xmlName = "input"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", 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 + { + Input target = (Input) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Input target = (Input) object; + target.setName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _objRef + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_objRef", "objRef", org.exolab.castor.xml.NodeType.Attribute); + desc.setReference(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Input target = (Input) object; + return target.getObjRef(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Input target = (Input) object; + target.setObjRef( (java.lang.Object) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new java.lang.Object(); + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _objRef + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.InputDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Input.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Instance.java b/src/org/vamsas/objects/core/Instance.java index 56193ef..037d035 100644 --- a/src/org/vamsas/objects/core/Instance.java +++ b/src/org/vamsas/objects/core/Instance.java @@ -1,179 +1,179 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class Instance. - * - * @version $Revision$ $Date$ - */ -public class Instance extends org.vamsas.objects.core.AppData -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _urn - */ - private java.lang.String _urn; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Instance() - { - super(); - } //-- org.vamsas.objects.core.Instance() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Instance) { - - Instance temp = (Instance)obj; - if (this._urn != null) { - if (temp._urn == null) return false; - else if (!(this._urn.equals(temp._urn))) - return false; - } - else if (temp._urn != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'urn'. - * - * @return String - * @return the value of field 'urn'. - */ - public java.lang.String getUrn() - { - return this._urn; - } //-- java.lang.String getUrn() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'urn'. - * - * @param urn the value of field 'urn'. - */ - public void setUrn(java.lang.String urn) - { - this._urn = urn; - } //-- void setUrn(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return AppData - */ - public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Instance) Unmarshaller.unmarshal(org.vamsas.objects.core.Instance.class, reader); - } //-- org.vamsas.objects.core.AppData unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Instance. + * + * @version $Revision$ $Date$ + */ +public class Instance extends org.vamsas.objects.core.AppData +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _urn + */ + private java.lang.String _urn; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Instance() + { + super(); + } //-- org.vamsas.objects.core.Instance() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Instance) { + + Instance temp = (Instance)obj; + if (this._urn != null) { + if (temp._urn == null) return false; + else if (!(this._urn.equals(temp._urn))) + return false; + } + else if (temp._urn != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'urn'. + * + * @return String + * @return the value of field 'urn'. + */ + public java.lang.String getUrn() + { + return this._urn; + } //-- java.lang.String getUrn() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'urn'. + * + * @param urn the value of field 'urn'. + */ + public void setUrn(java.lang.String urn) + { + this._urn = urn; + } //-- void setUrn(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return AppData + */ + public static org.vamsas.objects.core.AppData unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Instance) Unmarshaller.unmarshal(org.vamsas.objects.core.Instance.class, reader); + } //-- org.vamsas.objects.core.AppData unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/InstanceDescriptor.java b/src/org/vamsas/objects/core/InstanceDescriptor.java index ad7297d..0fdec55 100644 --- a/src/org/vamsas/objects/core/InstanceDescriptor.java +++ b/src/org/vamsas/objects/core/InstanceDescriptor.java @@ -1,213 +1,213 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class InstanceDescriptor. - * - * @version $Revision$ $Date$ - */ -public class InstanceDescriptor extends org.vamsas.objects.core.AppDataDescriptor { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public InstanceDescriptor() - { - super(); - setExtendsWithoutFlatten(new org.vamsas.objects.core.AppDataDescriptor()); - nsURI = "http://www.vamsas.org"; - xmlName = "Instance"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _urn - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_urn", "urn", 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 - { - Instance target = (Instance) object; - return target.getUrn(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Instance target = (Instance) object; - target.setUrn( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _urn - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.InstanceDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) - return super.getIdentity(); - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Instance.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class InstanceDescriptor. + * + * @version $Revision$ $Date$ + */ +public class InstanceDescriptor extends org.vamsas.objects.core.AppDataDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public InstanceDescriptor() + { + super(); + setExtendsWithoutFlatten(new org.vamsas.objects.core.AppDataDescriptor()); + nsURI = "http://www.vamsas.org"; + xmlName = "Instance"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _urn + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_urn", "urn", 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 + { + Instance target = (Instance) object; + return target.getUrn(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Instance target = (Instance) object; + target.setUrn( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _urn + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.InstanceDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Instance.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Link.java b/src/org/vamsas/objects/core/Link.java index 9d798ee..1330cff 100644 --- a/src/org/vamsas/objects/core/Link.java +++ b/src/org/vamsas/objects/core/Link.java @@ -1,217 +1,217 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class Link. - * - * @version $Revision$ $Date$ - */ -public class Link extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * internal content storage - */ - private java.lang.String _content = ""; - - /** - * The URI - */ - private java.lang.String _href; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Link() - { - super(); - setContent(""); - } //-- org.vamsas.objects.core.Link() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Link) { - - Link temp = (Link)obj; - if (this._content != null) { - if (temp._content == null) return false; - else if (!(this._content.equals(temp._content))) - return false; - } - else if (temp._content != null) - return false; - if (this._href != null) { - if (temp._href == null) return false; - else if (!(this._href.equals(temp._href))) - return false; - } - else if (temp._href != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'content'. The field 'content' - * has the following description: internal content storage - * - * @return String - * @return the value of field 'content'. - */ - public java.lang.String getContent() - { - return this._content; - } //-- java.lang.String getContent() - - /** - * Returns the value of field 'href'. The field 'href' has the - * following description: The URI - * - * @return String - * @return the value of field 'href'. - */ - public java.lang.String getHref() - { - return this._href; - } //-- java.lang.String getHref() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'content'. The field 'content' has - * the following description: internal content storage - * - * @param content the value of field 'content'. - */ - public void setContent(java.lang.String content) - { - this._content = content; - } //-- void setContent(java.lang.String) - - /** - * Sets the value of field 'href'. The field 'href' has the - * following description: The URI - * - * @param href the value of field 'href'. - */ - public void setHref(java.lang.String href) - { - this._href = href; - } //-- void setHref(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return Link - */ - public static org.vamsas.objects.core.Link unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Link) Unmarshaller.unmarshal(org.vamsas.objects.core.Link.class, reader); - } //-- org.vamsas.objects.core.Link unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Link. + * + * @version $Revision$ $Date$ + */ +public class Link extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * internal content storage + */ + private java.lang.String _content = ""; + + /** + * The URI + */ + private java.lang.String _href; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Link() + { + super(); + setContent(""); + } //-- org.vamsas.objects.core.Link() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Link) { + + Link temp = (Link)obj; + if (this._content != null) { + if (temp._content == null) return false; + else if (!(this._content.equals(temp._content))) + return false; + } + else if (temp._content != null) + return false; + if (this._href != null) { + if (temp._href == null) return false; + else if (!(this._href.equals(temp._href))) + return false; + } + else if (temp._href != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'content'. The field 'content' + * has the following description: internal content storage + * + * @return String + * @return the value of field 'content'. + */ + public java.lang.String getContent() + { + return this._content; + } //-- java.lang.String getContent() + + /** + * Returns the value of field 'href'. The field 'href' has the + * following description: The URI + * + * @return String + * @return the value of field 'href'. + */ + public java.lang.String getHref() + { + return this._href; + } //-- java.lang.String getHref() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'content'. The field 'content' has + * the following description: internal content storage + * + * @param content the value of field 'content'. + */ + public void setContent(java.lang.String content) + { + this._content = content; + } //-- void setContent(java.lang.String) + + /** + * Sets the value of field 'href'. The field 'href' has the + * following description: The URI + * + * @param href the value of field 'href'. + */ + public void setHref(java.lang.String href) + { + this._href = href; + } //-- void setHref(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Link + */ + public static org.vamsas.objects.core.Link unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Link) Unmarshaller.unmarshal(org.vamsas.objects.core.Link.class, reader); + } //-- org.vamsas.objects.core.Link unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/LinkDescriptor.java b/src/org/vamsas/objects/core/LinkDescriptor.java index a778c21..659278d 100644 --- a/src/org/vamsas/objects/core/LinkDescriptor.java +++ b/src/org/vamsas/objects/core/LinkDescriptor.java @@ -1,240 +1,240 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class LinkDescriptor. - * - * @version $Revision$ $Date$ - */ -public class LinkDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public LinkDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "link"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- _content - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Link target = (Link) object; - return target.getContent(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Link target = (Link) object; - target.setContent( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _content - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize attribute descriptors - - //-- _href - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_href", "href", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Link target = (Link) object; - return target.getHref(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Link target = (Link) object; - target.setHref( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return new java.lang.String(); - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _href - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.LinkDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Link.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class LinkDescriptor. + * + * @version $Revision$ $Date$ + */ +public class LinkDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public LinkDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "link"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- _content + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Link target = (Link) object; + return target.getContent(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Link target = (Link) object; + target.setContent( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _content + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize attribute descriptors + + //-- _href + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_href", "href", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Link target = (Link) object; + return target.getHref(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Link target = (Link) object; + target.setHref( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new java.lang.String(); + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _href + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.LinkDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Link.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Map.java b/src/org/vamsas/objects/core/Map.java index d0722a8..1a7d84e 100644 --- a/src/org/vamsas/objects/core/Map.java +++ b/src/org/vamsas/objects/core/Map.java @@ -1,550 +1,550 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class Map. - * - * @version $Revision$ $Date$ - */ -public class Map extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Offset - * to - * first - * position - * in - * dataset - * sequence - * record - * that - * this - * database - * entry - * maps - * to - * - */ - private int _from = 0; - - /** - * keeps track of state for field: _from - */ - private boolean _has_from; - - /** - * Offset - * to - * last - * position - * in - * dataset - * sequence - * record - * that - * this - * database - * entry - * maps - * to - * - */ - private int _to = 0; - - /** - * keeps track of state for field: _to - */ - private boolean _has_to; - - /** - * Offset - * to first - * last - * position - * in - * database - * entry - * that - * first - * (or - * offset) - * position - * in - * sequence - * maps to - * - */ - private int _start; - - /** - * keeps track of state for field: _start - */ - private boolean _has_start; - - /** - * Offset - * to last - * position - * in - * database - * entry - * that - * last - * (offset) - * position - * in - * sequence - * maps to - * - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Map() - { - super(); - } //-- org.vamsas.objects.core.Map() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteEnd - * - */ - public void deleteEnd() - { - this._has_end= false; - } //-- void deleteEnd() - - /** - * Method deleteFrom - * - */ - public void deleteFrom() - { - this._has_from= false; - } //-- void deleteFrom() - - /** - * Method deleteStart - * - */ - public void deleteStart() - { - this._has_start= false; - } //-- void deleteStart() - - /** - * Method deleteTo - * - */ - public void deleteTo() - { - this._has_to= false; - } //-- void deleteTo() - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Map) { - - Map temp = (Map)obj; - if (this._from != temp._from) - return false; - if (this._has_from != temp._has_from) - return false; - if (this._to != temp._to) - return false; - if (this._has_to != temp._has_to) - return false; - if (this._start != temp._start) - return false; - if (this._has_start != temp._has_start) - return false; - if (this._end != temp._end) - return false; - if (this._has_end != temp._has_end) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'end'. The field 'end' has the - * following description: Offset - * to last - * position - * in - * database - * entry - * that - * last - * (offset) - * position - * in - * sequence - * maps to - * - * - * @return int - * @return the value of field 'end'. - */ - public int getEnd() - { - return this._end; - } //-- int getEnd() - - /** - * Returns the value of field 'from'. The field 'from' has the - * following description: Offset - * to - * first - * position - * in - * dataset - * sequence - * record - * that - * this - * database - * entry - * maps - * to - * - * - * @return int - * @return the value of field 'from'. - */ - public int getFrom() - { - return this._from; - } //-- int getFrom() - - /** - * Returns the value of field 'start'. The field 'start' has - * the following description: Offset - * to first - * last - * position - * in - * database - * entry - * that - * first - * (or - * offset) - * position - * in - * sequence - * maps to - * - * - * @return int - * @return the value of field 'start'. - */ - public int getStart() - { - return this._start; - } //-- int getStart() - - /** - * Returns the value of field 'to'. The field 'to' has the - * following description: Offset - * to - * last - * position - * in - * dataset - * sequence - * record - * that - * this - * database - * entry - * maps - * to - * - * - * @return int - * @return the value of field 'to'. - */ - public int getTo() - { - return this._to; - } //-- int getTo() - - /** - * Method hasEnd - * - * - * - * @return boolean - */ - public boolean hasEnd() - { - return this._has_end; - } //-- boolean hasEnd() - - /** - * Method hasFrom - * - * - * - * @return boolean - */ - public boolean hasFrom() - { - return this._has_from; - } //-- boolean hasFrom() - - /** - * Method hasStart - * - * - * - * @return boolean - */ - public boolean hasStart() - { - return this._has_start; - } //-- boolean hasStart() - - /** - * Method hasTo - * - * - * - * @return boolean - */ - public boolean hasTo() - { - return this._has_to; - } //-- boolean hasTo() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'end'. The field 'end' has the - * following description: Offset - * to last - * position - * in - * database - * entry - * that - * last - * (offset) - * position - * in - * sequence - * maps to - * - * - * @param end the value of field 'end'. - */ - public void setEnd(int end) - { - this._end = end; - this._has_end = true; - } //-- void setEnd(int) - - /** - * Sets the value of field 'from'. The field 'from' has the - * following description: Offset - * to - * first - * position - * in - * dataset - * sequence - * record - * that - * this - * database - * entry - * maps - * to - * - * - * @param from the value of field 'from'. - */ - public void setFrom(int from) - { - this._from = from; - this._has_from = true; - } //-- void setFrom(int) - - /** - * Sets the value of field 'start'. The field 'start' has the - * following description: Offset - * to first - * last - * position - * in - * database - * entry - * that - * first - * (or - * offset) - * position - * in - * sequence - * maps to - * - * - * @param start the value of field 'start'. - */ - public void setStart(int start) - { - this._start = start; - this._has_start = true; - } //-- void setStart(int) - - /** - * Sets the value of field 'to'. The field 'to' has the - * following description: Offset - * to - * last - * position - * in - * dataset - * sequence - * record - * that - * this - * database - * entry - * maps - * to - * - * - * @param to the value of field 'to'. - */ - public void setTo(int to) - { - this._to = to; - this._has_to = true; - } //-- void setTo(int) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return Map - */ - public static org.vamsas.objects.core.Map unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Map) Unmarshaller.unmarshal(org.vamsas.objects.core.Map.class, reader); - } //-- org.vamsas.objects.core.Map unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Map. + * + * @version $Revision$ $Date$ + */ +public class Map extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Offset + * to + * first + * position + * in + * dataset + * sequence + * record + * that + * this + * database + * entry + * maps + * to + * + */ + private int _from = 0; + + /** + * keeps track of state for field: _from + */ + private boolean _has_from; + + /** + * Offset + * to + * last + * position + * in + * dataset + * sequence + * record + * that + * this + * database + * entry + * maps + * to + * + */ + private int _to = 0; + + /** + * keeps track of state for field: _to + */ + private boolean _has_to; + + /** + * Offset + * to first + * last + * position + * in + * database + * entry + * that + * first + * (or + * offset) + * position + * in + * sequence + * maps to + * + */ + private int _start; + + /** + * keeps track of state for field: _start + */ + private boolean _has_start; + + /** + * Offset + * to last + * position + * in + * database + * entry + * that + * last + * (offset) + * position + * in + * sequence + * maps to + * + */ + private int _end; + + /** + * keeps track of state for field: _end + */ + private boolean _has_end; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Map() + { + super(); + } //-- org.vamsas.objects.core.Map() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteEnd + * + */ + public void deleteEnd() + { + this._has_end= false; + } //-- void deleteEnd() + + /** + * Method deleteFrom + * + */ + public void deleteFrom() + { + this._has_from= false; + } //-- void deleteFrom() + + /** + * Method deleteStart + * + */ + public void deleteStart() + { + this._has_start= false; + } //-- void deleteStart() + + /** + * Method deleteTo + * + */ + public void deleteTo() + { + this._has_to= false; + } //-- void deleteTo() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Map) { + + Map temp = (Map)obj; + if (this._from != temp._from) + return false; + if (this._has_from != temp._has_from) + return false; + if (this._to != temp._to) + return false; + if (this._has_to != temp._has_to) + return false; + if (this._start != temp._start) + return false; + if (this._has_start != temp._has_start) + return false; + if (this._end != temp._end) + return false; + if (this._has_end != temp._has_end) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'end'. The field 'end' has the + * following description: Offset + * to last + * position + * in + * database + * entry + * that + * last + * (offset) + * position + * in + * sequence + * maps to + * + * + * @return int + * @return the value of field 'end'. + */ + public int getEnd() + { + return this._end; + } //-- int getEnd() + + /** + * Returns the value of field 'from'. The field 'from' has the + * following description: Offset + * to + * first + * position + * in + * dataset + * sequence + * record + * that + * this + * database + * entry + * maps + * to + * + * + * @return int + * @return the value of field 'from'. + */ + public int getFrom() + { + return this._from; + } //-- int getFrom() + + /** + * Returns the value of field 'start'. The field 'start' has + * the following description: Offset + * to first + * last + * position + * in + * database + * entry + * that + * first + * (or + * offset) + * position + * in + * sequence + * maps to + * + * + * @return int + * @return the value of field 'start'. + */ + public int getStart() + { + return this._start; + } //-- int getStart() + + /** + * Returns the value of field 'to'. The field 'to' has the + * following description: Offset + * to + * last + * position + * in + * dataset + * sequence + * record + * that + * this + * database + * entry + * maps + * to + * + * + * @return int + * @return the value of field 'to'. + */ + public int getTo() + { + return this._to; + } //-- int getTo() + + /** + * Method hasEnd + * + * + * + * @return boolean + */ + public boolean hasEnd() + { + return this._has_end; + } //-- boolean hasEnd() + + /** + * Method hasFrom + * + * + * + * @return boolean + */ + public boolean hasFrom() + { + return this._has_from; + } //-- boolean hasFrom() + + /** + * Method hasStart + * + * + * + * @return boolean + */ + public boolean hasStart() + { + return this._has_start; + } //-- boolean hasStart() + + /** + * Method hasTo + * + * + * + * @return boolean + */ + public boolean hasTo() + { + return this._has_to; + } //-- boolean hasTo() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'end'. The field 'end' has the + * following description: Offset + * to last + * position + * in + * database + * entry + * that + * last + * (offset) + * position + * in + * sequence + * maps to + * + * + * @param end the value of field 'end'. + */ + public void setEnd(int end) + { + this._end = end; + this._has_end = true; + } //-- void setEnd(int) + + /** + * Sets the value of field 'from'. The field 'from' has the + * following description: Offset + * to + * first + * position + * in + * dataset + * sequence + * record + * that + * this + * database + * entry + * maps + * to + * + * + * @param from the value of field 'from'. + */ + public void setFrom(int from) + { + this._from = from; + this._has_from = true; + } //-- void setFrom(int) + + /** + * Sets the value of field 'start'. The field 'start' has the + * following description: Offset + * to first + * last + * position + * in + * database + * entry + * that + * first + * (or + * offset) + * position + * in + * sequence + * maps to + * + * + * @param start the value of field 'start'. + */ + public void setStart(int start) + { + this._start = start; + this._has_start = true; + } //-- void setStart(int) + + /** + * Sets the value of field 'to'. The field 'to' has the + * following description: Offset + * to + * last + * position + * in + * dataset + * sequence + * record + * that + * this + * database + * entry + * maps + * to + * + * + * @param to the value of field 'to'. + */ + public void setTo(int to) + { + this._to = to; + this._has_to = true; + } //-- void setTo(int) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Map + */ + public static org.vamsas.objects.core.Map unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Map) Unmarshaller.unmarshal(org.vamsas.objects.core.Map.class, reader); + } //-- org.vamsas.objects.core.Map unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/MapDescriptor.java b/src/org/vamsas/objects/core/MapDescriptor.java index d8e2980..1f44ba4 100644 --- a/src/org/vamsas/objects/core/MapDescriptor.java +++ b/src/org/vamsas/objects/core/MapDescriptor.java @@ -1,339 +1,339 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class MapDescriptor. - * - * @version $Revision$ $Date$ - */ -public class MapDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public MapDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "map"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _from - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_from", "from", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Map target = (Map) object; - if(!target.hasFrom()) - return null; - return new java.lang.Integer(target.getFrom()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Map target = (Map) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteFrom(); - return; - } - target.setFrom( ((java.lang.Integer)value).intValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _from - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _to - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_to", "to", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Map target = (Map) object; - if(!target.hasTo()) - return null; - return new java.lang.Integer(target.getTo()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Map target = (Map) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteTo(); - return; - } - target.setTo( ((java.lang.Integer)value).intValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _to - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _start - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Map target = (Map) object; - if(!target.hasStart()) - return null; - return new java.lang.Integer(target.getStart()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Map target = (Map) object; - // ignore null values for non optional primitives - if (value == null) return; - - target.setStart( ((java.lang.Integer)value).intValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _start - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _end - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Map target = (Map) object; - if(!target.hasEnd()) - return null; - return new java.lang.Integer(target.getEnd()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Map target = (Map) object; - // ignore null values for non optional primitives - if (value == null) return; - - target.setEnd( ((java.lang.Integer)value).intValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _end - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator = new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.MapDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Map.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class MapDescriptor. + * + * @version $Revision$ $Date$ + */ +public class MapDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public MapDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "map"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _from + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_from", "from", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Map target = (Map) object; + if(!target.hasFrom()) + return null; + return new java.lang.Integer(target.getFrom()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Map target = (Map) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteFrom(); + return; + } + target.setFrom( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _from + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator = new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _to + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_to", "to", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Map target = (Map) object; + if(!target.hasTo()) + return null; + return new java.lang.Integer(target.getTo()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Map target = (Map) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteTo(); + return; + } + target.setTo( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _to + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + IntegerValidator typeValidator = new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _start + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Map target = (Map) object; + if(!target.hasStart()) + return null; + return new java.lang.Integer(target.getStart()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Map target = (Map) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setStart( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _start + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator = new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _end + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Map target = (Map) object; + if(!target.hasEnd()) + return null; + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Map target = (Map) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setEnd( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator = new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.MapDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Map.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Param.java b/src/org/vamsas/objects/core/Param.java index 68ee98f..5e001db 100644 --- a/src/org/vamsas/objects/core/Param.java +++ b/src/org/vamsas/objects/core/Param.java @@ -1,267 +1,267 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class Param. - * - * @version $Revision$ $Date$ - */ -public class Param extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * internal content storage - */ - private java.lang.String _content = ""; - - /** - * Field _name - */ - private java.lang.String _name; - - /** - * The type specifies how the property will - * be parsed. Empty property strings are - * allowed, and can be used to prototype - * the input to a document. TODO: specify - * allowed types - * - */ - private java.lang.String _type; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Param() - { - super(); - setContent(""); - } //-- org.vamsas.objects.core.Param() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Param) { - - Param temp = (Param)obj; - if (this._content != null) { - if (temp._content == null) return false; - else if (!(this._content.equals(temp._content))) - return false; - } - else if (temp._content != null) - return false; - if (this._name != null) { - if (temp._name == null) return false; - else if (!(this._name.equals(temp._name))) - return false; - } - else if (temp._name != null) - return false; - if (this._type != null) { - if (temp._type == null) return false; - else if (!(this._type.equals(temp._type))) - return false; - } - else if (temp._type != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'content'. The field 'content' - * has the following description: internal content storage - * - * @return String - * @return the value of field 'content'. - */ - public java.lang.String getContent() - { - return this._content; - } //-- java.lang.String getContent() - - /** - * Returns the value of field 'name'. - * - * @return String - * @return the value of field 'name'. - */ - public java.lang.String getName() - { - return this._name; - } //-- java.lang.String getName() - - /** - * Returns the value of field 'type'. The field 'type' has the - * following description: The type specifies how the property - * will - * be parsed. Empty property strings are - * allowed, and can be used to prototype - * the input to a document. TODO: specify - * allowed types - * - * - * @return String - * @return the value of field 'type'. - */ - public java.lang.String getType() - { - return this._type; - } //-- java.lang.String getType() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'content'. The field 'content' has - * the following description: internal content storage - * - * @param content the value of field 'content'. - */ - public void setContent(java.lang.String content) - { - this._content = content; - } //-- void setContent(java.lang.String) - - /** - * Sets the value of field 'name'. - * - * @param name the value of field 'name'. - */ - public void setName(java.lang.String name) - { - this._name = name; - } //-- void setName(java.lang.String) - - /** - * Sets the value of field 'type'. The field 'type' has the - * following description: The type specifies how the property - * will - * be parsed. Empty property strings are - * allowed, and can be used to prototype - * the input to a document. TODO: specify - * allowed types - * - * - * @param type the value of field 'type'. - */ - public void setType(java.lang.String type) - { - this._type = type; - } //-- void setType(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return Param - */ - public static org.vamsas.objects.core.Param unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Param) Unmarshaller.unmarshal(org.vamsas.objects.core.Param.class, reader); - } //-- org.vamsas.objects.core.Param unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Param. + * + * @version $Revision$ $Date$ + */ +public class Param extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * internal content storage + */ + private java.lang.String _content = ""; + + /** + * Field _name + */ + private java.lang.String _name; + + /** + * The type specifies how the property will + * be parsed. Empty property strings are + * allowed, and can be used to prototype + * the input to a document. TODO: specify + * allowed types + * + */ + private java.lang.String _type; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Param() + { + super(); + setContent(""); + } //-- org.vamsas.objects.core.Param() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Param) { + + Param temp = (Param)obj; + if (this._content != null) { + if (temp._content == null) return false; + else if (!(this._content.equals(temp._content))) + return false; + } + else if (temp._content != null) + return false; + if (this._name != null) { + if (temp._name == null) return false; + else if (!(this._name.equals(temp._name))) + return false; + } + else if (temp._name != null) + return false; + if (this._type != null) { + if (temp._type == null) return false; + else if (!(this._type.equals(temp._type))) + return false; + } + else if (temp._type != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'content'. The field 'content' + * has the following description: internal content storage + * + * @return String + * @return the value of field 'content'. + */ + public java.lang.String getContent() + { + return this._content; + } //-- java.lang.String getContent() + + /** + * Returns the value of field 'name'. + * + * @return String + * @return the value of field 'name'. + */ + public java.lang.String getName() + { + return this._name; + } //-- java.lang.String getName() + + /** + * Returns the value of field 'type'. The field 'type' has the + * following description: The type specifies how the property + * will + * be parsed. Empty property strings are + * allowed, and can be used to prototype + * the input to a document. TODO: specify + * allowed types + * + * + * @return String + * @return the value of field 'type'. + */ + public java.lang.String getType() + { + return this._type; + } //-- java.lang.String getType() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'content'. The field 'content' has + * the following description: internal content storage + * + * @param content the value of field 'content'. + */ + public void setContent(java.lang.String content) + { + this._content = content; + } //-- void setContent(java.lang.String) + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName(java.lang.String name) + { + this._name = name; + } //-- void setName(java.lang.String) + + /** + * Sets the value of field 'type'. The field 'type' has the + * following description: The type specifies how the property + * will + * be parsed. Empty property strings are + * allowed, and can be used to prototype + * the input to a document. TODO: specify + * allowed types + * + * + * @param type the value of field 'type'. + */ + public void setType(java.lang.String type) + { + this._type = type; + } //-- void setType(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Param + */ + public static org.vamsas.objects.core.Param unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Param) Unmarshaller.unmarshal(org.vamsas.objects.core.Param.class, reader); + } //-- org.vamsas.objects.core.Param unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/ParamDescriptor.java b/src/org/vamsas/objects/core/ParamDescriptor.java index 565f497..d049192 100644 --- a/src/org/vamsas/objects/core/ParamDescriptor.java +++ b/src/org/vamsas/objects/core/ParamDescriptor.java @@ -1,285 +1,285 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class ParamDescriptor. - * - * @version $Revision$ $Date$ - */ -public class ParamDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public ParamDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "param"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- _content - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Param target = (Param) object; - return target.getContent(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Param target = (Param) object; - target.setContent( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _content - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize attribute descriptors - - //-- _name - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", 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 - { - Param target = (Param) object; - return target.getName(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Param target = (Param) object; - target.setName( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _name - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _type - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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 - { - Param target = (Param) object; - return target.getType(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Param target = (Param) object; - target.setType( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _type - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.ParamDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Param.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class ParamDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ParamDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ParamDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "param"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- _content + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Param target = (Param) object; + return target.getContent(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Param target = (Param) object; + target.setContent( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _content + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", 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 + { + Param target = (Param) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Param target = (Param) object; + target.setName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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 + { + Param target = (Param) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Param target = (Param) object; + target.setType( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.ParamDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Param.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Pos.java b/src/org/vamsas/objects/core/Pos.java index a59146d..51a5410 100644 --- a/src/org/vamsas/objects/core/Pos.java +++ b/src/org/vamsas/objects/core/Pos.java @@ -1,205 +1,205 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * a position within the associated object's - * coordinate system - * - * - * @version $Revision$ $Date$ - */ -public class Pos extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _i - */ - private int _i; - - /** - * keeps track of state for field: _i - */ - private boolean _has_i; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Pos() - { - super(); - } //-- org.vamsas.objects.core.Pos() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteI - * - */ - public void deleteI() - { - this._has_i= false; - } //-- void deleteI() - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Pos) { - - Pos temp = (Pos)obj; - if (this._i != temp._i) - return false; - if (this._has_i != temp._has_i) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'i'. - * - * @return int - * @return the value of field 'i'. - */ - public int getI() - { - return this._i; - } //-- int getI() - - /** - * Method hasI - * - * - * - * @return boolean - */ - public boolean hasI() - { - return this._has_i; - } //-- boolean hasI() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'i'. - * - * @param i the value of field 'i'. - */ - public void setI(int i) - { - this._i = i; - this._has_i = true; - } //-- void setI(int) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return Pos - */ - public static org.vamsas.objects.core.Pos unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Pos) Unmarshaller.unmarshal(org.vamsas.objects.core.Pos.class, reader); - } //-- org.vamsas.objects.core.Pos unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * a position within the associated object's + * coordinate system + * + * + * @version $Revision$ $Date$ + */ +public class Pos extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _i + */ + private int _i; + + /** + * keeps track of state for field: _i + */ + private boolean _has_i; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Pos() + { + super(); + } //-- org.vamsas.objects.core.Pos() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteI + * + */ + public void deleteI() + { + this._has_i= false; + } //-- void deleteI() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Pos) { + + Pos temp = (Pos)obj; + if (this._i != temp._i) + return false; + if (this._has_i != temp._has_i) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'i'. + * + * @return int + * @return the value of field 'i'. + */ + public int getI() + { + return this._i; + } //-- int getI() + + /** + * Method hasI + * + * + * + * @return boolean + */ + public boolean hasI() + { + return this._has_i; + } //-- boolean hasI() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'i'. + * + * @param i the value of field 'i'. + */ + public void setI(int i) + { + this._i = i; + this._has_i = true; + } //-- void setI(int) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Pos + */ + public static org.vamsas.objects.core.Pos unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Pos) Unmarshaller.unmarshal(org.vamsas.objects.core.Pos.class, reader); + } //-- org.vamsas.objects.core.Pos unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/PosDescriptor.java b/src/org/vamsas/objects/core/PosDescriptor.java index 273f1ee..fdfffc7 100644 --- a/src/org/vamsas/objects/core/PosDescriptor.java +++ b/src/org/vamsas/objects/core/PosDescriptor.java @@ -1,213 +1,213 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class PosDescriptor. - * - * @version $Revision$ $Date$ - */ -public class PosDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public PosDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "pos"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _i - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_i", "i", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Pos target = (Pos) object; - if(!target.hasI()) - return null; - return new java.lang.Integer(target.getI()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Pos target = (Pos) object; - // ignore null values for non optional primitives - if (value == null) return; - - target.setI( ((java.lang.Integer)value).intValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _i - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator= new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.PosDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Pos.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class PosDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PosDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PosDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "pos"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _i + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_i", "i", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Pos target = (Pos) object; + if(!target.hasI()) + return null; + return new java.lang.Integer(target.getI()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Pos target = (Pos) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setI( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _i + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.PosDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Pos.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Property.java b/src/org/vamsas/objects/core/Property.java index 1b52866..261a52b 100644 --- a/src/org/vamsas/objects/core/Property.java +++ b/src/org/vamsas/objects/core/Property.java @@ -1,267 +1,267 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Class Property. - * - * @version $Revision$ $Date$ - */ -public class Property extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * internal content storage - */ - private java.lang.String _content = ""; - - /** - * Field _name - */ - private java.lang.String _name; - - /** - * The type specifies how the property will - * be parsed. Empty property strings are - * allowed, and can be used to prototype - * the input to a document. TODO: specify - * allowed types - * - */ - private java.lang.String _type; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Property() - { - super(); - setContent(""); - } //-- org.vamsas.objects.core.Property() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Property) { - - Property temp = (Property)obj; - if (this._content != null) { - if (temp._content == null) return false; - else if (!(this._content.equals(temp._content))) - return false; - } - else if (temp._content != null) - return false; - if (this._name != null) { - if (temp._name == null) return false; - else if (!(this._name.equals(temp._name))) - return false; - } - else if (temp._name != null) - return false; - if (this._type != null) { - if (temp._type == null) return false; - else if (!(this._type.equals(temp._type))) - return false; - } - else if (temp._type != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'content'. The field 'content' - * has the following description: internal content storage - * - * @return String - * @return the value of field 'content'. - */ - public java.lang.String getContent() - { - return this._content; - } //-- java.lang.String getContent() - - /** - * Returns the value of field 'name'. - * - * @return String - * @return the value of field 'name'. - */ - public java.lang.String getName() - { - return this._name; - } //-- java.lang.String getName() - - /** - * Returns the value of field 'type'. The field 'type' has the - * following description: The type specifies how the property - * will - * be parsed. Empty property strings are - * allowed, and can be used to prototype - * the input to a document. TODO: specify - * allowed types - * - * - * @return String - * @return the value of field 'type'. - */ - public java.lang.String getType() - { - return this._type; - } //-- java.lang.String getType() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'content'. The field 'content' has - * the following description: internal content storage - * - * @param content the value of field 'content'. - */ - public void setContent(java.lang.String content) - { - this._content = content; - } //-- void setContent(java.lang.String) - - /** - * Sets the value of field 'name'. - * - * @param name the value of field 'name'. - */ - public void setName(java.lang.String name) - { - this._name = name; - } //-- void setName(java.lang.String) - - /** - * Sets the value of field 'type'. The field 'type' has the - * following description: The type specifies how the property - * will - * be parsed. Empty property strings are - * allowed, and can be used to prototype - * the input to a document. TODO: specify - * allowed types - * - * - * @param type the value of field 'type'. - */ - public void setType(java.lang.String type) - { - this._type = type; - } //-- void setType(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return Property - */ - public static org.vamsas.objects.core.Property unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Property) Unmarshaller.unmarshal(org.vamsas.objects.core.Property.class, reader); - } //-- org.vamsas.objects.core.Property unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Class Property. + * + * @version $Revision$ $Date$ + */ +public class Property extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * internal content storage + */ + private java.lang.String _content = ""; + + /** + * Field _name + */ + private java.lang.String _name; + + /** + * The type specifies how the property will + * be parsed. Empty property strings are + * allowed, and can be used to prototype + * the input to a document. TODO: specify + * allowed types + * + */ + private java.lang.String _type; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Property() + { + super(); + setContent(""); + } //-- org.vamsas.objects.core.Property() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Property) { + + Property temp = (Property)obj; + if (this._content != null) { + if (temp._content == null) return false; + else if (!(this._content.equals(temp._content))) + return false; + } + else if (temp._content != null) + return false; + if (this._name != null) { + if (temp._name == null) return false; + else if (!(this._name.equals(temp._name))) + return false; + } + else if (temp._name != null) + return false; + if (this._type != null) { + if (temp._type == null) return false; + else if (!(this._type.equals(temp._type))) + return false; + } + else if (temp._type != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'content'. The field 'content' + * has the following description: internal content storage + * + * @return String + * @return the value of field 'content'. + */ + public java.lang.String getContent() + { + return this._content; + } //-- java.lang.String getContent() + + /** + * Returns the value of field 'name'. + * + * @return String + * @return the value of field 'name'. + */ + public java.lang.String getName() + { + return this._name; + } //-- java.lang.String getName() + + /** + * Returns the value of field 'type'. The field 'type' has the + * following description: The type specifies how the property + * will + * be parsed. Empty property strings are + * allowed, and can be used to prototype + * the input to a document. TODO: specify + * allowed types + * + * + * @return String + * @return the value of field 'type'. + */ + public java.lang.String getType() + { + return this._type; + } //-- java.lang.String getType() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'content'. The field 'content' has + * the following description: internal content storage + * + * @param content the value of field 'content'. + */ + public void setContent(java.lang.String content) + { + this._content = content; + } //-- void setContent(java.lang.String) + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName(java.lang.String name) + { + this._name = name; + } //-- void setName(java.lang.String) + + /** + * Sets the value of field 'type'. The field 'type' has the + * following description: The type specifies how the property + * will + * be parsed. Empty property strings are + * allowed, and can be used to prototype + * the input to a document. TODO: specify + * allowed types + * + * + * @param type the value of field 'type'. + */ + public void setType(java.lang.String type) + { + this._type = type; + } //-- void setType(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Property + */ + public static org.vamsas.objects.core.Property unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Property) Unmarshaller.unmarshal(org.vamsas.objects.core.Property.class, reader); + } //-- org.vamsas.objects.core.Property unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/PropertyDescriptor.java b/src/org/vamsas/objects/core/PropertyDescriptor.java index 6d4f84c..bb80022 100644 --- a/src/org/vamsas/objects/core/PropertyDescriptor.java +++ b/src/org/vamsas/objects/core/PropertyDescriptor.java @@ -1,285 +1,285 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class PropertyDescriptor. - * - * @version $Revision$ $Date$ - */ -public class PropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public PropertyDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "property"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- _content - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Property target = (Property) object; - return target.getContent(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Property target = (Property) object; - target.setContent( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _content - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize attribute descriptors - - //-- _name - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", 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 - { - Property target = (Property) object; - return target.getName(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Property target = (Property) object; - target.setName( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _name - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _type - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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 - { - Property target = (Property) object; - return target.getType(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Property target = (Property) object; - target.setType( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _type - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.PropertyDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Property.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class PropertyDescriptor. + * + * @version $Revision$ $Date$ + */ +public class PropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public PropertyDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "property"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- _content + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Property target = (Property) object; + return target.getContent(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Property target = (Property) object; + target.setContent( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _content + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", 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 + { + Property target = (Property) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Property target = (Property) object; + target.setName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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 + { + Property target = (Property) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Property target = (Property) object; + target.setType( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.PropertyDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Property.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/RangeAnnotation.java b/src/org/vamsas/objects/core/RangeAnnotation.java index 57d7cc5..df5cb2e 100644 --- a/src/org/vamsas/objects/core/RangeAnnotation.java +++ b/src/org/vamsas/objects/core/RangeAnnotation.java @@ -1,1131 +1,1131 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Annotation for a rangeSpec - values can be attached for the - * whole specification, and to each position within the spec. - * following the orientation specified by the ordered set of - * rangeSpec (pos, seg) elements. - * - * - * @version $Revision$ $Date$ - */ -public class RangeAnnotation extends org.vamsas.objects.core.RangeType -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * 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 - */ - private boolean _has_modifiable; - - /** - * Annotation with the same non-empty group - * name are grouped together - * - */ - private java.lang.String _group = ""; - - /** - * A Das Feature has both a type and a Type ID. - * We go the route of requiring the type string - * to be taken from a controlled vocabulary if - * an application expects others to make sense - * of it. - * The type may qualified - so uniprot:CHAIN is a valid type - * name, - * and considered distinct from someotherDB:CHAIN - * - */ - private java.lang.String _type; - - /** - * Short, meaningful name for the annotation - if this is - * absent, then the type string should be used in its place. - * - */ - private java.lang.String _label; - - /** - * Human readable description of the annotation - * - */ - private java.lang.String _description; - - /** - * TODO: specify this - we have considered taking the GO - * evidence codes as a model for assessing a measure of quality - * to an annotation. - * - */ - private java.lang.String _status; - - /** - * Annotation Element position maps to - * ordered positions defined by the - * sequence of rangeType pos positions or - * concatenated seg start/end segments. - * - */ - private java.util.Vector _annotationElementList; - - /** - * Ordered set of optionally named float - * values for the whole annotation - * - */ - private java.util.Vector _scoreList; - - /** - * Field _linkList - */ - private java.util.Vector _linkList; - - /** - * Note:These are mutable so an application - * should check them each time. - * - */ - private java.util.Vector _propertyList; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public RangeAnnotation() - { - super(); - setGroup(""); - _annotationElementList = new Vector(); - _scoreList = new Vector(); - _linkList = new Vector(); - _propertyList = new Vector(); - } //-- org.vamsas.objects.core.RangeAnnotation() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addAnnotationElement - * - * - * - * @param vAnnotationElement - */ - public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException - { - _annotationElementList.addElement(vAnnotationElement); - } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement) - - /** - * Method addAnnotationElement - * - * - * - * @param index - * @param vAnnotationElement - */ - public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException - { - _annotationElementList.insertElementAt(vAnnotationElement, index); - } //-- void addAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) - - /** - * Method addLink - * - * - * - * @param vLink - */ - public void addLink(org.vamsas.objects.core.Link vLink) - throws java.lang.IndexOutOfBoundsException - { - _linkList.addElement(vLink); - } //-- void addLink(org.vamsas.objects.core.Link) - - /** - * Method addLink - * - * - * - * @param index - * @param vLink - */ - public void addLink(int index, org.vamsas.objects.core.Link vLink) - throws java.lang.IndexOutOfBoundsException - { - _linkList.insertElementAt(vLink, index); - } //-- void addLink(int, org.vamsas.objects.core.Link) - - /** - * Method addProperty - * - * - * - * @param vProperty - */ - public void addProperty(org.vamsas.objects.core.Property vProperty) - throws java.lang.IndexOutOfBoundsException - { - _propertyList.addElement(vProperty); - } //-- void addProperty(org.vamsas.objects.core.Property) - - /** - * Method addProperty - * - * - * - * @param index - * @param vProperty - */ - public void addProperty(int index, org.vamsas.objects.core.Property vProperty) - throws java.lang.IndexOutOfBoundsException - { - _propertyList.insertElementAt(vProperty, index); - } //-- void addProperty(int, org.vamsas.objects.core.Property) - - /** - * Method addScore - * - * - * - * @param vScore - */ - public void addScore(org.vamsas.objects.core.Score vScore) - throws java.lang.IndexOutOfBoundsException - { - _scoreList.addElement(vScore); - } //-- void addScore(org.vamsas.objects.core.Score) - - /** - * Method addScore - * - * - * - * @param index - * @param vScore - */ - public void addScore(int index, org.vamsas.objects.core.Score vScore) - throws java.lang.IndexOutOfBoundsException - { - _scoreList.insertElementAt(vScore, index); - } //-- void addScore(int, org.vamsas.objects.core.Score) - - /** - * Method deleteModifiable - * - */ - public void deleteModifiable() - { - this._has_modifiable= false; - } //-- void deleteModifiable() - - /** - * Method enumerateAnnotationElement - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateAnnotationElement() - { - return _annotationElementList.elements(); - } //-- java.util.Enumeration enumerateAnnotationElement() - - /** - * Method enumerateLink - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateLink() - { - return _linkList.elements(); - } //-- java.util.Enumeration enumerateLink() - - /** - * Method enumerateProperty - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateProperty() - { - return _propertyList.elements(); - } //-- java.util.Enumeration enumerateProperty() - - /** - * Method enumerateScore - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateScore() - { - return _scoreList.elements(); - } //-- java.util.Enumeration enumerateScore() - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof RangeAnnotation) { - - RangeAnnotation temp = (RangeAnnotation)obj; - if (this._id != null) { - if (temp._id == null) return false; - else if (!(this._id.equals(temp._id))) - return false; - } - else if (temp._id != null) - return false; - if (this._modifiable != temp._modifiable) - return false; - if (this._has_modifiable != temp._has_modifiable) - return false; - if (this._group != null) { - if (temp._group == null) return false; - else if (!(this._group.equals(temp._group))) - return false; - } - else if (temp._group != null) - return false; - if (this._type != null) { - if (temp._type == null) return false; - else if (!(this._type.equals(temp._type))) - return false; - } - else if (temp._type != null) - return false; - if (this._label != null) { - if (temp._label == null) return false; - else if (!(this._label.equals(temp._label))) - return false; - } - else if (temp._label != null) - return false; - if (this._description != null) { - if (temp._description == null) return false; - else if (!(this._description.equals(temp._description))) - return false; - } - else if (temp._description != null) - return false; - if (this._status != null) { - if (temp._status == null) return false; - else if (!(this._status.equals(temp._status))) - return false; - } - else if (temp._status != null) - return false; - if (this._annotationElementList != null) { - if (temp._annotationElementList == null) return false; - else if (!(this._annotationElementList.equals(temp._annotationElementList))) - return false; - } - else if (temp._annotationElementList != null) - return false; - if (this._scoreList != null) { - if (temp._scoreList == null) return false; - else if (!(this._scoreList.equals(temp._scoreList))) - return false; - } - else if (temp._scoreList != null) - return false; - if (this._linkList != null) { - if (temp._linkList == null) return false; - else if (!(this._linkList.equals(temp._linkList))) - return false; - } - else if (temp._linkList != null) - return false; - if (this._propertyList != null) { - if (temp._propertyList == null) return false; - else if (!(this._propertyList.equals(temp._propertyList))) - return false; - } - else if (temp._propertyList != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Method getAnnotationElement - * - * - * - * @param index - * @return AnnotationElement - */ - public org.vamsas.objects.core.AnnotationElement getAnnotationElement(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _annotationElementList.size())) { - throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]"); - } - - return (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index); - } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int) - - /** - * Method getAnnotationElement - * - * - * - * @return AnnotationElement - */ - public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() - { - int size = _annotationElementList.size(); - org.vamsas.objects.core.AnnotationElement[] mArray = new org.vamsas.objects.core.AnnotationElement[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index); - } - return mArray; - } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() - - /** - * Method getAnnotationElementCount - * - * - * - * @return int - */ - public int getAnnotationElementCount() - { - return _annotationElementList.size(); - } //-- int getAnnotationElementCount() - - /** - * Returns the value of field 'description'. The field - * 'description' has the following description: Human readable - * description of the annotation - * - * - * @return String - * @return the value of field 'description'. - */ - public java.lang.String getDescription() - { - return this._description; - } //-- java.lang.String getDescription() - - /** - * Returns the value of field 'group'. The field 'group' has - * the following description: Annotation with the same - * non-empty group - * name are grouped together - * - * - * @return String - * @return the value of field 'group'. - */ - public java.lang.String getGroup() - { - return this._group; - } //-- java.lang.String getGroup() - - /** - * Returns the value of field 'id'. The field 'id' has the - * following description: Primary Key for vamsas object - * referencing - * - * - * @return String - * @return the value of field 'id'. - */ - public java.lang.String getId() - { - return this._id; - } //-- java.lang.String getId() - - /** - * Returns the value of field 'label'. The field 'label' has - * the following description: Short, meaningful name for the - * annotation - if this is absent, then the type string should - * be used in its place. - * - * - * @return String - * @return the value of field 'label'. - */ - public java.lang.String getLabel() - { - return this._label; - } //-- java.lang.String getLabel() - - /** - * Method getLink - * - * - * - * @param index - * @return Link - */ - public org.vamsas.objects.core.Link getLink(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _linkList.size())) { - throw new IndexOutOfBoundsException("getLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]"); - } - - return (org.vamsas.objects.core.Link) _linkList.elementAt(index); - } //-- org.vamsas.objects.core.Link getLink(int) - - /** - * Method getLink - * - * - * - * @return Link - */ - public org.vamsas.objects.core.Link[] getLink() - { - int size = _linkList.size(); - org.vamsas.objects.core.Link[] mArray = new org.vamsas.objects.core.Link[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (org.vamsas.objects.core.Link) _linkList.elementAt(index); - } - return mArray; - } //-- org.vamsas.objects.core.Link[] getLink() - - /** - * Method getLinkCount - * - * - * - * @return int - */ - public int getLinkCount() - { - return _linkList.size(); - } //-- int getLinkCount() - - /** - * 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 - * - * - * @return boolean - * @return the value of field 'modifiable'. - */ - public boolean getModifiable() - { - return this._modifiable; - } //-- boolean getModifiable() - - /** - * Method getProperty - * - * - * - * @param index - * @return Property - */ - public org.vamsas.objects.core.Property getProperty(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _propertyList.size())) { - throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]"); - } - - return (org.vamsas.objects.core.Property) _propertyList.elementAt(index); - } //-- org.vamsas.objects.core.Property getProperty(int) - - /** - * Method getProperty - * - * - * - * @return Property - */ - public org.vamsas.objects.core.Property[] getProperty() - { - int size = _propertyList.size(); - org.vamsas.objects.core.Property[] mArray = new org.vamsas.objects.core.Property[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (org.vamsas.objects.core.Property) _propertyList.elementAt(index); - } - return mArray; - } //-- org.vamsas.objects.core.Property[] getProperty() - - /** - * Method getPropertyCount - * - * - * - * @return int - */ - public int getPropertyCount() - { - return _propertyList.size(); - } //-- int getPropertyCount() - - /** - * Method getScore - * - * - * - * @param index - * @return Score - */ - public org.vamsas.objects.core.Score getScore(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _scoreList.size())) { - throw new IndexOutOfBoundsException("getScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]"); - } - - return (org.vamsas.objects.core.Score) _scoreList.elementAt(index); - } //-- org.vamsas.objects.core.Score getScore(int) - - /** - * Method getScore - * - * - * - * @return Score - */ - public org.vamsas.objects.core.Score[] getScore() - { - int size = _scoreList.size(); - org.vamsas.objects.core.Score[] mArray = new org.vamsas.objects.core.Score[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (org.vamsas.objects.core.Score) _scoreList.elementAt(index); - } - return mArray; - } //-- org.vamsas.objects.core.Score[] getScore() - - /** - * Method getScoreCount - * - * - * - * @return int - */ - public int getScoreCount() - { - return _scoreList.size(); - } //-- int getScoreCount() - - /** - * Returns the value of field 'status'. The field 'status' has - * the following description: TODO: specify this - we have - * considered taking the GO evidence codes as a model for - * assessing a measure of quality to an annotation. - * - * - * @return String - * @return the value of field 'status'. - */ - public java.lang.String getStatus() - { - return this._status; - } //-- java.lang.String getStatus() - - /** - * Returns the value of field 'type'. The field 'type' has the - * following description: A Das Feature has both a type and a - * Type ID. - * We go the route of requiring the type string - * to be taken from a controlled vocabulary if - * an application expects others to make sense - * of it. - * The type may qualified - so uniprot:CHAIN is a valid type - * name, - * and considered distinct from someotherDB:CHAIN - * - * - * @return String - * @return the value of field 'type'. - */ - public java.lang.String getType() - { - return this._type; - } //-- java.lang.String getType() - - /** - * Method hasModifiable - * - * - * - * @return boolean - */ - public boolean hasModifiable() - { - return this._has_modifiable; - } //-- boolean hasModifiable() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Method removeAllAnnotationElement - * - */ - public void removeAllAnnotationElement() - { - _annotationElementList.removeAllElements(); - } //-- void removeAllAnnotationElement() - - /** - * Method removeAllLink - * - */ - public void removeAllLink() - { - _linkList.removeAllElements(); - } //-- void removeAllLink() - - /** - * Method removeAllProperty - * - */ - public void removeAllProperty() - { - _propertyList.removeAllElements(); - } //-- void removeAllProperty() - - /** - * Method removeAllScore - * - */ - public void removeAllScore() - { - _scoreList.removeAllElements(); - } //-- void removeAllScore() - - /** - * Method removeAnnotationElement - * - * - * - * @param index - * @return AnnotationElement - */ - public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index) - { - java.lang.Object obj = _annotationElementList.elementAt(index); - _annotationElementList.removeElementAt(index); - return (org.vamsas.objects.core.AnnotationElement) obj; - } //-- org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int) - - /** - * Method removeLink - * - * - * - * @param index - * @return Link - */ - public org.vamsas.objects.core.Link removeLink(int index) - { - java.lang.Object obj = _linkList.elementAt(index); - _linkList.removeElementAt(index); - return (org.vamsas.objects.core.Link) obj; - } //-- org.vamsas.objects.core.Link removeLink(int) - - /** - * Method removeProperty - * - * - * - * @param index - * @return Property - */ - public org.vamsas.objects.core.Property removeProperty(int index) - { - java.lang.Object obj = _propertyList.elementAt(index); - _propertyList.removeElementAt(index); - return (org.vamsas.objects.core.Property) obj; - } //-- org.vamsas.objects.core.Property removeProperty(int) - - /** - * Method removeScore - * - * - * - * @param index - * @return Score - */ - public org.vamsas.objects.core.Score removeScore(int index) - { - java.lang.Object obj = _scoreList.elementAt(index); - _scoreList.removeElementAt(index); - return (org.vamsas.objects.core.Score) obj; - } //-- org.vamsas.objects.core.Score removeScore(int) - - /** - * Method setAnnotationElement - * - * - * - * @param index - * @param vAnnotationElement - */ - public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _annotationElementList.size())) { - throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]"); - } - _annotationElementList.setElementAt(vAnnotationElement, index); - } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) - - /** - * Method setAnnotationElement - * - * - * - * @param annotationElementArray - */ - public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray) - { - //-- copy array - _annotationElementList.removeAllElements(); - for (int i = 0; i < annotationElementArray.length; i++) { - _annotationElementList.addElement(annotationElementArray[i]); - } - } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement) - - /** - * Sets the value of field 'description'. The field - * 'description' has the following description: Human readable - * description of the annotation - * - * - * @param description the value of field 'description'. - */ - public void setDescription(java.lang.String description) - { - this._description = description; - } //-- void setDescription(java.lang.String) - - /** - * Sets the value of field 'group'. The field 'group' has the - * following description: Annotation with the same non-empty - * group - * name are grouped together - * - * - * @param group the value of field 'group'. - */ - public void setGroup(java.lang.String group) - { - this._group = group; - } //-- void setGroup(java.lang.String) - - /** - * Sets the value of field 'id'. The field 'id' has the - * following description: Primary Key for vamsas object - * referencing - * - * - * @param id the value of field 'id'. - */ - public void setId(java.lang.String id) - { - this._id = id; - } //-- void setId(java.lang.String) - - /** - * Sets the value of field 'label'. The field 'label' has the - * following description: Short, meaningful name for the - * annotation - if this is absent, then the type string should - * be used in its place. - * - * - * @param label the value of field 'label'. - */ - public void setLabel(java.lang.String label) - { - this._label = label; - } //-- void setLabel(java.lang.String) - - /** - * Method setLink - * - * - * - * @param index - * @param vLink - */ - public void setLink(int index, org.vamsas.objects.core.Link vLink) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _linkList.size())) { - throw new IndexOutOfBoundsException("setLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]"); - } - _linkList.setElementAt(vLink, index); - } //-- void setLink(int, org.vamsas.objects.core.Link) - - /** - * Method setLink - * - * - * - * @param linkArray - */ - public void setLink(org.vamsas.objects.core.Link[] linkArray) - { - //-- copy array - _linkList.removeAllElements(); - for (int i = 0; i < linkArray.length; i++) { - _linkList.addElement(linkArray[i]); - } - } //-- void setLink(org.vamsas.objects.core.Link) - - /** - * 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 - * - * - * @param modifiable the value of field 'modifiable'. - */ - public void setModifiable(boolean modifiable) - { - this._modifiable = modifiable; - this._has_modifiable = true; - } //-- void setModifiable(boolean) - - /** - * Method setProperty - * - * - * - * @param index - * @param vProperty - */ - public void setProperty(int index, org.vamsas.objects.core.Property vProperty) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _propertyList.size())) { - throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]"); - } - _propertyList.setElementAt(vProperty, index); - } //-- void setProperty(int, org.vamsas.objects.core.Property) - - /** - * Method setProperty - * - * - * - * @param propertyArray - */ - public void setProperty(org.vamsas.objects.core.Property[] propertyArray) - { - //-- copy array - _propertyList.removeAllElements(); - for (int i = 0; i < propertyArray.length; i++) { - _propertyList.addElement(propertyArray[i]); - } - } //-- void setProperty(org.vamsas.objects.core.Property) - - /** - * Method setScore - * - * - * - * @param index - * @param vScore - */ - public void setScore(int index, org.vamsas.objects.core.Score vScore) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _scoreList.size())) { - throw new IndexOutOfBoundsException("setScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]"); - } - _scoreList.setElementAt(vScore, index); - } //-- void setScore(int, org.vamsas.objects.core.Score) - - /** - * Method setScore - * - * - * - * @param scoreArray - */ - public void setScore(org.vamsas.objects.core.Score[] scoreArray) - { - //-- copy array - _scoreList.removeAllElements(); - for (int i = 0; i < scoreArray.length; i++) { - _scoreList.addElement(scoreArray[i]); - } - } //-- void setScore(org.vamsas.objects.core.Score) - - /** - * Sets the value of field 'status'. The field 'status' has the - * following description: TODO: specify this - we have - * considered taking the GO evidence codes as a model for - * assessing a measure of quality to an annotation. - * - * - * @param status the value of field 'status'. - */ - public void setStatus(java.lang.String status) - { - this._status = status; - } //-- void setStatus(java.lang.String) - - /** - * Sets the value of field 'type'. The field 'type' has the - * following description: A Das Feature has both a type and a - * Type ID. - * We go the route of requiring the type string - * to be taken from a controlled vocabulary if - * an application expects others to make sense - * of it. - * The type may qualified - so uniprot:CHAIN is a valid type - * name, - * and considered distinct from someotherDB:CHAIN - * - * - * @param type the value of field 'type'. - */ - public void setType(java.lang.String type) - { - this._type = type; - } //-- void setType(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return RangeType - */ - public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.RangeAnnotation) Unmarshaller.unmarshal(org.vamsas.objects.core.RangeAnnotation.class, reader); - } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Annotation for a rangeSpec - values can be attached for the + * whole specification, and to each position within the spec. + * following the orientation specified by the ordered set of + * rangeSpec (pos, seg) elements. + * + * + * @version $Revision$ $Date$ + */ +public class RangeAnnotation extends org.vamsas.objects.core.RangeType +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * 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 + */ + private boolean _has_modifiable; + + /** + * Annotation with the same non-empty group + * name are grouped together + * + */ + private java.lang.String _group = ""; + + /** + * A Das Feature has both a type and a Type ID. + * We go the route of requiring the type string + * to be taken from a controlled vocabulary if + * an application expects others to make sense + * of it. + * The type may qualified - so uniprot:CHAIN is a valid type + * name, + * and considered distinct from someotherDB:CHAIN + * + */ + private java.lang.String _type; + + /** + * Short, meaningful name for the annotation - if this is + * absent, then the type string should be used in its place. + * + */ + private java.lang.String _label; + + /** + * Human readable description of the annotation + * + */ + private java.lang.String _description; + + /** + * TODO: specify this - we have considered taking the GO + * evidence codes as a model for assessing a measure of quality + * to an annotation. + * + */ + private java.lang.String _status; + + /** + * Annotation Element position maps to + * ordered positions defined by the + * sequence of rangeType pos positions or + * concatenated seg start/end segments. + * + */ + private java.util.Vector _annotationElementList; + + /** + * Ordered set of optionally named float + * values for the whole annotation + * + */ + private java.util.Vector _scoreList; + + /** + * Field _linkList + */ + private java.util.Vector _linkList; + + /** + * Note:These are mutable so an application + * should check them each time. + * + */ + private java.util.Vector _propertyList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public RangeAnnotation() + { + super(); + setGroup(""); + _annotationElementList = new Vector(); + _scoreList = new Vector(); + _linkList = new Vector(); + _propertyList = new Vector(); + } //-- org.vamsas.objects.core.RangeAnnotation() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addAnnotationElement + * + * + * + * @param vAnnotationElement + */ + public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + _annotationElementList.addElement(vAnnotationElement); + } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement) + + /** + * Method addAnnotationElement + * + * + * + * @param index + * @param vAnnotationElement + */ + public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + _annotationElementList.insertElementAt(vAnnotationElement, index); + } //-- void addAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) + + /** + * Method addLink + * + * + * + * @param vLink + */ + public void addLink(org.vamsas.objects.core.Link vLink) + throws java.lang.IndexOutOfBoundsException + { + _linkList.addElement(vLink); + } //-- void addLink(org.vamsas.objects.core.Link) + + /** + * Method addLink + * + * + * + * @param index + * @param vLink + */ + public void addLink(int index, org.vamsas.objects.core.Link vLink) + throws java.lang.IndexOutOfBoundsException + { + _linkList.insertElementAt(vLink, index); + } //-- void addLink(int, org.vamsas.objects.core.Link) + + /** + * Method addProperty + * + * + * + * @param vProperty + */ + public void addProperty(org.vamsas.objects.core.Property vProperty) + throws java.lang.IndexOutOfBoundsException + { + _propertyList.addElement(vProperty); + } //-- void addProperty(org.vamsas.objects.core.Property) + + /** + * Method addProperty + * + * + * + * @param index + * @param vProperty + */ + public void addProperty(int index, org.vamsas.objects.core.Property vProperty) + throws java.lang.IndexOutOfBoundsException + { + _propertyList.insertElementAt(vProperty, index); + } //-- void addProperty(int, org.vamsas.objects.core.Property) + + /** + * Method addScore + * + * + * + * @param vScore + */ + public void addScore(org.vamsas.objects.core.Score vScore) + throws java.lang.IndexOutOfBoundsException + { + _scoreList.addElement(vScore); + } //-- void addScore(org.vamsas.objects.core.Score) + + /** + * Method addScore + * + * + * + * @param index + * @param vScore + */ + public void addScore(int index, org.vamsas.objects.core.Score vScore) + throws java.lang.IndexOutOfBoundsException + { + _scoreList.insertElementAt(vScore, index); + } //-- void addScore(int, org.vamsas.objects.core.Score) + + /** + * Method deleteModifiable + * + */ + public void deleteModifiable() + { + this._has_modifiable= false; + } //-- void deleteModifiable() + + /** + * Method enumerateAnnotationElement + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateAnnotationElement() + { + return _annotationElementList.elements(); + } //-- java.util.Enumeration enumerateAnnotationElement() + + /** + * Method enumerateLink + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateLink() + { + return _linkList.elements(); + } //-- java.util.Enumeration enumerateLink() + + /** + * Method enumerateProperty + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateProperty() + { + return _propertyList.elements(); + } //-- java.util.Enumeration enumerateProperty() + + /** + * Method enumerateScore + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateScore() + { + return _scoreList.elements(); + } //-- java.util.Enumeration enumerateScore() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof RangeAnnotation) { + + RangeAnnotation temp = (RangeAnnotation)obj; + if (this._id != null) { + if (temp._id == null) return false; + else if (!(this._id.equals(temp._id))) + return false; + } + else if (temp._id != null) + return false; + if (this._modifiable != temp._modifiable) + return false; + if (this._has_modifiable != temp._has_modifiable) + return false; + if (this._group != null) { + if (temp._group == null) return false; + else if (!(this._group.equals(temp._group))) + return false; + } + else if (temp._group != null) + return false; + if (this._type != null) { + if (temp._type == null) return false; + else if (!(this._type.equals(temp._type))) + return false; + } + else if (temp._type != null) + return false; + if (this._label != null) { + if (temp._label == null) return false; + else if (!(this._label.equals(temp._label))) + return false; + } + else if (temp._label != null) + return false; + if (this._description != null) { + if (temp._description == null) return false; + else if (!(this._description.equals(temp._description))) + return false; + } + else if (temp._description != null) + return false; + if (this._status != null) { + if (temp._status == null) return false; + else if (!(this._status.equals(temp._status))) + return false; + } + else if (temp._status != null) + return false; + if (this._annotationElementList != null) { + if (temp._annotationElementList == null) return false; + else if (!(this._annotationElementList.equals(temp._annotationElementList))) + return false; + } + else if (temp._annotationElementList != null) + return false; + if (this._scoreList != null) { + if (temp._scoreList == null) return false; + else if (!(this._scoreList.equals(temp._scoreList))) + return false; + } + else if (temp._scoreList != null) + return false; + if (this._linkList != null) { + if (temp._linkList == null) return false; + else if (!(this._linkList.equals(temp._linkList))) + return false; + } + else if (temp._linkList != null) + return false; + if (this._propertyList != null) { + if (temp._propertyList == null) return false; + else if (!(this._propertyList.equals(temp._propertyList))) + return false; + } + else if (temp._propertyList != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Method getAnnotationElement + * + * + * + * @param index + * @return AnnotationElement + */ + public org.vamsas.objects.core.AnnotationElement getAnnotationElement(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _annotationElementList.size())) { + throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]"); + } + + return (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index); + } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int) + + /** + * Method getAnnotationElement + * + * + * + * @return AnnotationElement + */ + public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() + { + int size = _annotationElementList.size(); + org.vamsas.objects.core.AnnotationElement[] mArray = new org.vamsas.objects.core.AnnotationElement[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() + + /** + * Method getAnnotationElementCount + * + * + * + * @return int + */ + public int getAnnotationElementCount() + { + return _annotationElementList.size(); + } //-- int getAnnotationElementCount() + + /** + * Returns the value of field 'description'. The field + * 'description' has the following description: Human readable + * description of the annotation + * + * + * @return String + * @return the value of field 'description'. + */ + public java.lang.String getDescription() + { + return this._description; + } //-- java.lang.String getDescription() + + /** + * Returns the value of field 'group'. The field 'group' has + * the following description: Annotation with the same + * non-empty group + * name are grouped together + * + * + * @return String + * @return the value of field 'group'. + */ + public java.lang.String getGroup() + { + return this._group; + } //-- java.lang.String getGroup() + + /** + * Returns the value of field 'id'. The field 'id' has the + * following description: Primary Key for vamsas object + * referencing + * + * + * @return String + * @return the value of field 'id'. + */ + public java.lang.String getId() + { + return this._id; + } //-- java.lang.String getId() + + /** + * Returns the value of field 'label'. The field 'label' has + * the following description: Short, meaningful name for the + * annotation - if this is absent, then the type string should + * be used in its place. + * + * + * @return String + * @return the value of field 'label'. + */ + public java.lang.String getLabel() + { + return this._label; + } //-- java.lang.String getLabel() + + /** + * Method getLink + * + * + * + * @param index + * @return Link + */ + public org.vamsas.objects.core.Link getLink(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _linkList.size())) { + throw new IndexOutOfBoundsException("getLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]"); + } + + return (org.vamsas.objects.core.Link) _linkList.elementAt(index); + } //-- org.vamsas.objects.core.Link getLink(int) + + /** + * Method getLink + * + * + * + * @return Link + */ + public org.vamsas.objects.core.Link[] getLink() + { + int size = _linkList.size(); + org.vamsas.objects.core.Link[] mArray = new org.vamsas.objects.core.Link[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.Link) _linkList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.Link[] getLink() + + /** + * Method getLinkCount + * + * + * + * @return int + */ + public int getLinkCount() + { + return _linkList.size(); + } //-- int getLinkCount() + + /** + * 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 + * + * + * @return boolean + * @return the value of field 'modifiable'. + */ + public boolean getModifiable() + { + return this._modifiable; + } //-- boolean getModifiable() + + /** + * Method getProperty + * + * + * + * @param index + * @return Property + */ + public org.vamsas.objects.core.Property getProperty(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _propertyList.size())) { + throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]"); + } + + return (org.vamsas.objects.core.Property) _propertyList.elementAt(index); + } //-- org.vamsas.objects.core.Property getProperty(int) + + /** + * Method getProperty + * + * + * + * @return Property + */ + public org.vamsas.objects.core.Property[] getProperty() + { + int size = _propertyList.size(); + org.vamsas.objects.core.Property[] mArray = new org.vamsas.objects.core.Property[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.Property) _propertyList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.Property[] getProperty() + + /** + * Method getPropertyCount + * + * + * + * @return int + */ + public int getPropertyCount() + { + return _propertyList.size(); + } //-- int getPropertyCount() + + /** + * Method getScore + * + * + * + * @param index + * @return Score + */ + public org.vamsas.objects.core.Score getScore(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _scoreList.size())) { + throw new IndexOutOfBoundsException("getScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]"); + } + + return (org.vamsas.objects.core.Score) _scoreList.elementAt(index); + } //-- org.vamsas.objects.core.Score getScore(int) + + /** + * Method getScore + * + * + * + * @return Score + */ + public org.vamsas.objects.core.Score[] getScore() + { + int size = _scoreList.size(); + org.vamsas.objects.core.Score[] mArray = new org.vamsas.objects.core.Score[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.Score) _scoreList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.Score[] getScore() + + /** + * Method getScoreCount + * + * + * + * @return int + */ + public int getScoreCount() + { + return _scoreList.size(); + } //-- int getScoreCount() + + /** + * Returns the value of field 'status'. The field 'status' has + * the following description: TODO: specify this - we have + * considered taking the GO evidence codes as a model for + * assessing a measure of quality to an annotation. + * + * + * @return String + * @return the value of field 'status'. + */ + public java.lang.String getStatus() + { + return this._status; + } //-- java.lang.String getStatus() + + /** + * Returns the value of field 'type'. The field 'type' has the + * following description: A Das Feature has both a type and a + * Type ID. + * We go the route of requiring the type string + * to be taken from a controlled vocabulary if + * an application expects others to make sense + * of it. + * The type may qualified - so uniprot:CHAIN is a valid type + * name, + * and considered distinct from someotherDB:CHAIN + * + * + * @return String + * @return the value of field 'type'. + */ + public java.lang.String getType() + { + return this._type; + } //-- java.lang.String getType() + + /** + * Method hasModifiable + * + * + * + * @return boolean + */ + public boolean hasModifiable() + { + return this._has_modifiable; + } //-- boolean hasModifiable() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Method removeAllAnnotationElement + * + */ + public void removeAllAnnotationElement() + { + _annotationElementList.removeAllElements(); + } //-- void removeAllAnnotationElement() + + /** + * Method removeAllLink + * + */ + public void removeAllLink() + { + _linkList.removeAllElements(); + } //-- void removeAllLink() + + /** + * Method removeAllProperty + * + */ + public void removeAllProperty() + { + _propertyList.removeAllElements(); + } //-- void removeAllProperty() + + /** + * Method removeAllScore + * + */ + public void removeAllScore() + { + _scoreList.removeAllElements(); + } //-- void removeAllScore() + + /** + * Method removeAnnotationElement + * + * + * + * @param index + * @return AnnotationElement + */ + public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index) + { + java.lang.Object obj = _annotationElementList.elementAt(index); + _annotationElementList.removeElementAt(index); + return (org.vamsas.objects.core.AnnotationElement) obj; + } //-- org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int) + + /** + * Method removeLink + * + * + * + * @param index + * @return Link + */ + public org.vamsas.objects.core.Link removeLink(int index) + { + java.lang.Object obj = _linkList.elementAt(index); + _linkList.removeElementAt(index); + return (org.vamsas.objects.core.Link) obj; + } //-- org.vamsas.objects.core.Link removeLink(int) + + /** + * Method removeProperty + * + * + * + * @param index + * @return Property + */ + public org.vamsas.objects.core.Property removeProperty(int index) + { + java.lang.Object obj = _propertyList.elementAt(index); + _propertyList.removeElementAt(index); + return (org.vamsas.objects.core.Property) obj; + } //-- org.vamsas.objects.core.Property removeProperty(int) + + /** + * Method removeScore + * + * + * + * @param index + * @return Score + */ + public org.vamsas.objects.core.Score removeScore(int index) + { + java.lang.Object obj = _scoreList.elementAt(index); + _scoreList.removeElementAt(index); + return (org.vamsas.objects.core.Score) obj; + } //-- org.vamsas.objects.core.Score removeScore(int) + + /** + * Method setAnnotationElement + * + * + * + * @param index + * @param vAnnotationElement + */ + public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _annotationElementList.size())) { + throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]"); + } + _annotationElementList.setElementAt(vAnnotationElement, index); + } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) + + /** + * Method setAnnotationElement + * + * + * + * @param annotationElementArray + */ + public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray) + { + //-- copy array + _annotationElementList.removeAllElements(); + for (int i = 0; i < annotationElementArray.length; i++) { + _annotationElementList.addElement(annotationElementArray[i]); + } + } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement) + + /** + * Sets the value of field 'description'. The field + * 'description' has the following description: Human readable + * description of the annotation + * + * + * @param description the value of field 'description'. + */ + public void setDescription(java.lang.String description) + { + this._description = description; + } //-- void setDescription(java.lang.String) + + /** + * Sets the value of field 'group'. The field 'group' has the + * following description: Annotation with the same non-empty + * group + * name are grouped together + * + * + * @param group the value of field 'group'. + */ + public void setGroup(java.lang.String group) + { + this._group = group; + } //-- void setGroup(java.lang.String) + + /** + * Sets the value of field 'id'. The field 'id' has the + * following description: Primary Key for vamsas object + * referencing + * + * + * @param id the value of field 'id'. + */ + public void setId(java.lang.String id) + { + this._id = id; + } //-- void setId(java.lang.String) + + /** + * Sets the value of field 'label'. The field 'label' has the + * following description: Short, meaningful name for the + * annotation - if this is absent, then the type string should + * be used in its place. + * + * + * @param label the value of field 'label'. + */ + public void setLabel(java.lang.String label) + { + this._label = label; + } //-- void setLabel(java.lang.String) + + /** + * Method setLink + * + * + * + * @param index + * @param vLink + */ + public void setLink(int index, org.vamsas.objects.core.Link vLink) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _linkList.size())) { + throw new IndexOutOfBoundsException("setLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]"); + } + _linkList.setElementAt(vLink, index); + } //-- void setLink(int, org.vamsas.objects.core.Link) + + /** + * Method setLink + * + * + * + * @param linkArray + */ + public void setLink(org.vamsas.objects.core.Link[] linkArray) + { + //-- copy array + _linkList.removeAllElements(); + for (int i = 0; i < linkArray.length; i++) { + _linkList.addElement(linkArray[i]); + } + } //-- void setLink(org.vamsas.objects.core.Link) + + /** + * 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 + * + * + * @param modifiable the value of field 'modifiable'. + */ + public void setModifiable(boolean modifiable) + { + this._modifiable = modifiable; + this._has_modifiable = true; + } //-- void setModifiable(boolean) + + /** + * Method setProperty + * + * + * + * @param index + * @param vProperty + */ + public void setProperty(int index, org.vamsas.objects.core.Property vProperty) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _propertyList.size())) { + throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]"); + } + _propertyList.setElementAt(vProperty, index); + } //-- void setProperty(int, org.vamsas.objects.core.Property) + + /** + * Method setProperty + * + * + * + * @param propertyArray + */ + public void setProperty(org.vamsas.objects.core.Property[] propertyArray) + { + //-- copy array + _propertyList.removeAllElements(); + for (int i = 0; i < propertyArray.length; i++) { + _propertyList.addElement(propertyArray[i]); + } + } //-- void setProperty(org.vamsas.objects.core.Property) + + /** + * Method setScore + * + * + * + * @param index + * @param vScore + */ + public void setScore(int index, org.vamsas.objects.core.Score vScore) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _scoreList.size())) { + throw new IndexOutOfBoundsException("setScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]"); + } + _scoreList.setElementAt(vScore, index); + } //-- void setScore(int, org.vamsas.objects.core.Score) + + /** + * Method setScore + * + * + * + * @param scoreArray + */ + public void setScore(org.vamsas.objects.core.Score[] scoreArray) + { + //-- copy array + _scoreList.removeAllElements(); + for (int i = 0; i < scoreArray.length; i++) { + _scoreList.addElement(scoreArray[i]); + } + } //-- void setScore(org.vamsas.objects.core.Score) + + /** + * Sets the value of field 'status'. The field 'status' has the + * following description: TODO: specify this - we have + * considered taking the GO evidence codes as a model for + * assessing a measure of quality to an annotation. + * + * + * @param status the value of field 'status'. + */ + public void setStatus(java.lang.String status) + { + this._status = status; + } //-- void setStatus(java.lang.String) + + /** + * Sets the value of field 'type'. The field 'type' has the + * following description: A Das Feature has both a type and a + * Type ID. + * We go the route of requiring the type string + * to be taken from a controlled vocabulary if + * an application expects others to make sense + * of it. + * The type may qualified - so uniprot:CHAIN is a valid type + * name, + * and considered distinct from someotherDB:CHAIN + * + * + * @param type the value of field 'type'. + */ + public void setType(java.lang.String type) + { + this._type = type; + } //-- void setType(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return RangeType + */ + public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.RangeAnnotation) Unmarshaller.unmarshal(org.vamsas.objects.core.RangeAnnotation.class, reader); + } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/RangeAnnotationDescriptor.java b/src/org/vamsas/objects/core/RangeAnnotationDescriptor.java index cb4ea4b..b26661a 100644 --- a/src/org/vamsas/objects/core/RangeAnnotationDescriptor.java +++ b/src/org/vamsas/objects/core/RangeAnnotationDescriptor.java @@ -1,583 +1,583 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class RangeAnnotationDescriptor. - * - * @version $Revision$ $Date$ - */ -public class RangeAnnotationDescriptor extends org.vamsas.objects.core.RangeTypeDescriptor { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public RangeAnnotationDescriptor() - { - super(); - setExtendsWithoutFlatten(new org.vamsas.objects.core.RangeTypeDescriptor()); - nsURI = "http://www.vamsas.org"; - xmlName = "rangeAnnotation"; - - //-- set grouping compositor - setCompositorAsSequence(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _id - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); - this.identity = desc; - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getId(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.setId( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return new java.lang.String(); - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _id - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _modifiable - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeAnnotation target = (RangeAnnotation) object; - if(!target.hasModifiable()) - return null; - return (target.getModifiable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteModifiable(); - return; - } - target.setModifiable( ((java.lang.Boolean)value).booleanValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _modifiable - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _group - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_group", "group", 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 - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getGroup(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.setGroup( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _group - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _type - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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 - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getType(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.setType( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _type - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - //-- _label - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_label", "label", org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getLabel(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.setLabel( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _label - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _description - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getDescription(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.setDescription( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _description - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _status - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_status", "status", org.exolab.castor.xml.NodeType.Element); - desc.setImmutable(true); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getStatus(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.setStatus( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _status - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _annotationElementList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.AnnotationElement.class, "_annotationElementList", "annotationElement", org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getAnnotationElement(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.addAnnotationElement( (org.vamsas.objects.core.AnnotationElement) 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.AnnotationElement(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _annotationElementList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _scoreList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Score.class, "_scoreList", "score", org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getScore(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.addScore( (org.vamsas.objects.core.Score) 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.Score(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _scoreList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _linkList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Link.class, "_linkList", "link", org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getLink(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.addLink( (org.vamsas.objects.core.Link) 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.Link(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _linkList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _propertyList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeAnnotation target = (RangeAnnotation) object; - return target.getProperty(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeAnnotation target = (RangeAnnotation) object; - target.addProperty( (org.vamsas.objects.core.Property) 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.Property(); - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _propertyList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(0); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- org.vamsas.objects.core.RangeAnnotationDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return super.getExtends(); - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - if (identity == null) - return super.getIdentity(); - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.RangeAnnotation.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class RangeAnnotationDescriptor. + * + * @version $Revision$ $Date$ + */ +public class RangeAnnotationDescriptor extends org.vamsas.objects.core.RangeTypeDescriptor { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public RangeAnnotationDescriptor() + { + super(); + setExtendsWithoutFlatten(new org.vamsas.objects.core.RangeTypeDescriptor()); + nsURI = "http://www.vamsas.org"; + xmlName = "rangeAnnotation"; + + //-- set grouping compositor + setCompositorAsSequence(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _id + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute); + this.identity = desc; + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getId(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.setId( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return new java.lang.String(); + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _id + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _modifiable + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_modifiable", "modifiable", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeAnnotation target = (RangeAnnotation) object; + if(!target.hasModifiable()) + return null; + return (target.getModifiable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteModifiable(); + return; + } + target.setModifiable( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _modifiable + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _group + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_group", "group", 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 + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getGroup(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.setGroup( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _group + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _type + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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 + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getType(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.setType( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _type + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + //-- _label + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_label", "label", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getLabel(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.setLabel( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _label + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _description + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getDescription(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.setDescription( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _description + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _status + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_status", "status", org.exolab.castor.xml.NodeType.Element); + desc.setImmutable(true); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getStatus(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.setStatus( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _status + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _annotationElementList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.AnnotationElement.class, "_annotationElementList", "annotationElement", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getAnnotationElement(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.addAnnotationElement( (org.vamsas.objects.core.AnnotationElement) 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.AnnotationElement(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _annotationElementList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _scoreList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Score.class, "_scoreList", "score", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getScore(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.addScore( (org.vamsas.objects.core.Score) 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.Score(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _scoreList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _linkList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Link.class, "_linkList", "link", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getLink(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.addLink( (org.vamsas.objects.core.Link) 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.Link(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _linkList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _propertyList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Property.class, "_propertyList", "property", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeAnnotation target = (RangeAnnotation) object; + return target.getProperty(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeAnnotation target = (RangeAnnotation) object; + target.addProperty( (org.vamsas.objects.core.Property) 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.Property(); + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _propertyList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(0); + { //-- local scope + } + desc.setValidator(fieldValidator); + } //-- org.vamsas.objects.core.RangeAnnotationDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return super.getExtends(); + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + if (identity == null) + return super.getIdentity(); + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.RangeAnnotation.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/RangeType.java b/src/org/vamsas/objects/core/RangeType.java index 6f9ed6d..070af2a 100644 --- a/src/org/vamsas/objects/core/RangeType.java +++ b/src/org/vamsas/objects/core/RangeType.java @@ -1,455 +1,455 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Vector; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; - -/** - * Specify an ordered set of positions and/or regions on the - * principle - * dimension of some associated vamsas object - * - * Keeping to jaxb-1.0 specification for the moment - this - * choice should become a substitution group when we use - * jaxb-2.0 capable bindings - * - * - * @version $Revision$ $Date$ - */ -public abstract class RangeType extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Internal choice value storage - */ - private java.lang.Object _choiceValue; - - /** - * a position within the associated object's - * coordinate system - * - */ - private java.util.Vector _posList; - - /** - * a region from start to end, with flag for - * inclusivity of terminii - * - */ - private java.util.Vector _segList; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public RangeType() - { - super(); - _posList = new Vector(); - _segList = new Vector(); - } //-- org.vamsas.objects.core.RangeType() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method addPos - * - * - * - * @param vPos - */ - public void addPos(org.vamsas.objects.core.Pos vPos) - throws java.lang.IndexOutOfBoundsException - { - _posList.addElement(vPos); - } //-- void addPos(org.vamsas.objects.core.Pos) - - /** - * Method addPos - * - * - * - * @param index - * @param vPos - */ - public void addPos(int index, org.vamsas.objects.core.Pos vPos) - throws java.lang.IndexOutOfBoundsException - { - _posList.insertElementAt(vPos, index); - } //-- void addPos(int, org.vamsas.objects.core.Pos) - - /** - * Method addSeg - * - * - * - * @param vSeg - */ - public void addSeg(org.vamsas.objects.core.Seg vSeg) - throws java.lang.IndexOutOfBoundsException - { - _segList.addElement(vSeg); - } //-- void addSeg(org.vamsas.objects.core.Seg) - - /** - * Method addSeg - * - * - * - * @param index - * @param vSeg - */ - public void addSeg(int index, org.vamsas.objects.core.Seg vSeg) - throws java.lang.IndexOutOfBoundsException - { - _segList.insertElementAt(vSeg, index); - } //-- void addSeg(int, org.vamsas.objects.core.Seg) - - /** - * Method enumeratePos - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumeratePos() - { - return _posList.elements(); - } //-- java.util.Enumeration enumeratePos() - - /** - * Method enumerateSeg - * - * - * - * @return Enumeration - */ - public java.util.Enumeration enumerateSeg() - { - return _segList.elements(); - } //-- java.util.Enumeration enumerateSeg() - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof RangeType) { - - RangeType temp = (RangeType)obj; - if (this._choiceValue != null) { - if (temp._choiceValue == null) return false; - else if (!(this._choiceValue.equals(temp._choiceValue))) - return false; - } - else if (temp._choiceValue != null) - return false; - if (this._posList != null) { - if (temp._posList == null) return false; - else if (!(this._posList.equals(temp._posList))) - return false; - } - else if (temp._posList != null) - return false; - if (this._segList != null) { - if (temp._segList == null) return false; - else if (!(this._segList.equals(temp._segList))) - return false; - } - else if (temp._segList != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'choiceValue'. The field - * 'choiceValue' has the following description: Internal choice - * value storage - * - * @return Object - * @return the value of field 'choiceValue'. - */ - public java.lang.Object getChoiceValue() - { - return this._choiceValue; - } //-- java.lang.Object getChoiceValue() - - /** - * Method getPos - * - * - * - * @param index - * @return Pos - */ - public org.vamsas.objects.core.Pos getPos(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _posList.size())) { - throw new IndexOutOfBoundsException("getPos: Index value '"+index+"' not in range [0.."+_posList.size()+ "]"); - } - - return (org.vamsas.objects.core.Pos) _posList.elementAt(index); - } //-- org.vamsas.objects.core.Pos getPos(int) - - /** - * Method getPos - * - * - * - * @return Pos - */ - public org.vamsas.objects.core.Pos[] getPos() - { - int size = _posList.size(); - org.vamsas.objects.core.Pos[] mArray = new org.vamsas.objects.core.Pos[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (org.vamsas.objects.core.Pos) _posList.elementAt(index); - } - return mArray; - } //-- org.vamsas.objects.core.Pos[] getPos() - - /** - * Method getPosCount - * - * - * - * @return int - */ - public int getPosCount() - { - return _posList.size(); - } //-- int getPosCount() - - /** - * Method getSeg - * - * - * - * @param index - * @return Seg - */ - public org.vamsas.objects.core.Seg getSeg(int index) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _segList.size())) { - throw new IndexOutOfBoundsException("getSeg: Index value '"+index+"' not in range [0.."+_segList.size()+ "]"); - } - - return (org.vamsas.objects.core.Seg) _segList.elementAt(index); - } //-- org.vamsas.objects.core.Seg getSeg(int) - - /** - * Method getSeg - * - * - * - * @return Seg - */ - public org.vamsas.objects.core.Seg[] getSeg() - { - int size = _segList.size(); - org.vamsas.objects.core.Seg[] mArray = new org.vamsas.objects.core.Seg[size]; - for (int index = 0; index < size; index++) { - mArray[index] = (org.vamsas.objects.core.Seg) _segList.elementAt(index); - } - return mArray; - } //-- org.vamsas.objects.core.Seg[] getSeg() - - /** - * Method getSegCount - * - * - * - * @return int - */ - public int getSegCount() - { - return _segList.size(); - } //-- int getSegCount() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method removeAllPos - * - */ - public void removeAllPos() - { - _posList.removeAllElements(); - } //-- void removeAllPos() - - /** - * Method removeAllSeg - * - */ - public void removeAllSeg() - { - _segList.removeAllElements(); - } //-- void removeAllSeg() - - /** - * Method removePos - * - * - * - * @param index - * @return Pos - */ - public org.vamsas.objects.core.Pos removePos(int index) - { - java.lang.Object obj = _posList.elementAt(index); - _posList.removeElementAt(index); - return (org.vamsas.objects.core.Pos) obj; - } //-- org.vamsas.objects.core.Pos removePos(int) - - /** - * Method removeSeg - * - * - * - * @param index - * @return Seg - */ - public org.vamsas.objects.core.Seg removeSeg(int index) - { - java.lang.Object obj = _segList.elementAt(index); - _segList.removeElementAt(index); - return (org.vamsas.objects.core.Seg) obj; - } //-- org.vamsas.objects.core.Seg removeSeg(int) - - /** - * Method setPos - * - * - * - * @param index - * @param vPos - */ - public void setPos(int index, org.vamsas.objects.core.Pos vPos) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _posList.size())) { - throw new IndexOutOfBoundsException("setPos: Index value '"+index+"' not in range [0.."+_posList.size()+ "]"); - } - _posList.setElementAt(vPos, index); - } //-- void setPos(int, org.vamsas.objects.core.Pos) - - /** - * Method setPos - * - * - * - * @param posArray - */ - public void setPos(org.vamsas.objects.core.Pos[] posArray) - { - //-- copy array - _posList.removeAllElements(); - for (int i = 0; i < posArray.length; i++) { - _posList.addElement(posArray[i]); - } - } //-- void setPos(org.vamsas.objects.core.Pos) - - /** - * Method setSeg - * - * - * - * @param index - * @param vSeg - */ - public void setSeg(int index, org.vamsas.objects.core.Seg vSeg) - throws java.lang.IndexOutOfBoundsException - { - //-- check bounds for index - if ((index < 0) || (index > _segList.size())) { - throw new IndexOutOfBoundsException("setSeg: Index value '"+index+"' not in range [0.."+_segList.size()+ "]"); - } - _segList.setElementAt(vSeg, index); - } //-- void setSeg(int, org.vamsas.objects.core.Seg) - - /** - * Method setSeg - * - * - * - * @param segArray - */ - public void setSeg(org.vamsas.objects.core.Seg[] segArray) - { - //-- copy array - _segList.removeAllElements(); - for (int i = 0; i < segArray.length; i++) { - _segList.addElement(segArray[i]); - } - } //-- void setSeg(org.vamsas.objects.core.Seg) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import java.util.Enumeration; +import java.util.Vector; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; + +/** + * Specify an ordered set of positions and/or regions on the + * principle + * dimension of some associated vamsas object + * + * Keeping to jaxb-1.0 specification for the moment - this + * choice should become a substitution group when we use + * jaxb-2.0 capable bindings + * + * + * @version $Revision$ $Date$ + */ +public abstract class RangeType extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Internal choice value storage + */ + private java.lang.Object _choiceValue; + + /** + * a position within the associated object's + * coordinate system + * + */ + private java.util.Vector _posList; + + /** + * a region from start to end, with flag for + * inclusivity of terminii + * + */ + private java.util.Vector _segList; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public RangeType() + { + super(); + _posList = new Vector(); + _segList = new Vector(); + } //-- org.vamsas.objects.core.RangeType() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method addPos + * + * + * + * @param vPos + */ + public void addPos(org.vamsas.objects.core.Pos vPos) + throws java.lang.IndexOutOfBoundsException + { + _posList.addElement(vPos); + } //-- void addPos(org.vamsas.objects.core.Pos) + + /** + * Method addPos + * + * + * + * @param index + * @param vPos + */ + public void addPos(int index, org.vamsas.objects.core.Pos vPos) + throws java.lang.IndexOutOfBoundsException + { + _posList.insertElementAt(vPos, index); + } //-- void addPos(int, org.vamsas.objects.core.Pos) + + /** + * Method addSeg + * + * + * + * @param vSeg + */ + public void addSeg(org.vamsas.objects.core.Seg vSeg) + throws java.lang.IndexOutOfBoundsException + { + _segList.addElement(vSeg); + } //-- void addSeg(org.vamsas.objects.core.Seg) + + /** + * Method addSeg + * + * + * + * @param index + * @param vSeg + */ + public void addSeg(int index, org.vamsas.objects.core.Seg vSeg) + throws java.lang.IndexOutOfBoundsException + { + _segList.insertElementAt(vSeg, index); + } //-- void addSeg(int, org.vamsas.objects.core.Seg) + + /** + * Method enumeratePos + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumeratePos() + { + return _posList.elements(); + } //-- java.util.Enumeration enumeratePos() + + /** + * Method enumerateSeg + * + * + * + * @return Enumeration + */ + public java.util.Enumeration enumerateSeg() + { + return _segList.elements(); + } //-- java.util.Enumeration enumerateSeg() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof RangeType) { + + RangeType temp = (RangeType)obj; + if (this._choiceValue != null) { + if (temp._choiceValue == null) return false; + else if (!(this._choiceValue.equals(temp._choiceValue))) + return false; + } + else if (temp._choiceValue != null) + return false; + if (this._posList != null) { + if (temp._posList == null) return false; + else if (!(this._posList.equals(temp._posList))) + return false; + } + else if (temp._posList != null) + return false; + if (this._segList != null) { + if (temp._segList == null) return false; + else if (!(this._segList.equals(temp._segList))) + return false; + } + else if (temp._segList != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'choiceValue'. The field + * 'choiceValue' has the following description: Internal choice + * value storage + * + * @return Object + * @return the value of field 'choiceValue'. + */ + public java.lang.Object getChoiceValue() + { + return this._choiceValue; + } //-- java.lang.Object getChoiceValue() + + /** + * Method getPos + * + * + * + * @param index + * @return Pos + */ + public org.vamsas.objects.core.Pos getPos(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _posList.size())) { + throw new IndexOutOfBoundsException("getPos: Index value '"+index+"' not in range [0.."+_posList.size()+ "]"); + } + + return (org.vamsas.objects.core.Pos) _posList.elementAt(index); + } //-- org.vamsas.objects.core.Pos getPos(int) + + /** + * Method getPos + * + * + * + * @return Pos + */ + public org.vamsas.objects.core.Pos[] getPos() + { + int size = _posList.size(); + org.vamsas.objects.core.Pos[] mArray = new org.vamsas.objects.core.Pos[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.Pos) _posList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.Pos[] getPos() + + /** + * Method getPosCount + * + * + * + * @return int + */ + public int getPosCount() + { + return _posList.size(); + } //-- int getPosCount() + + /** + * Method getSeg + * + * + * + * @param index + * @return Seg + */ + public org.vamsas.objects.core.Seg getSeg(int index) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _segList.size())) { + throw new IndexOutOfBoundsException("getSeg: Index value '"+index+"' not in range [0.."+_segList.size()+ "]"); + } + + return (org.vamsas.objects.core.Seg) _segList.elementAt(index); + } //-- org.vamsas.objects.core.Seg getSeg(int) + + /** + * Method getSeg + * + * + * + * @return Seg + */ + public org.vamsas.objects.core.Seg[] getSeg() + { + int size = _segList.size(); + org.vamsas.objects.core.Seg[] mArray = new org.vamsas.objects.core.Seg[size]; + for (int index = 0; index < size; index++) { + mArray[index] = (org.vamsas.objects.core.Seg) _segList.elementAt(index); + } + return mArray; + } //-- org.vamsas.objects.core.Seg[] getSeg() + + /** + * Method getSegCount + * + * + * + * @return int + */ + public int getSegCount() + { + return _segList.size(); + } //-- int getSegCount() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method removeAllPos + * + */ + public void removeAllPos() + { + _posList.removeAllElements(); + } //-- void removeAllPos() + + /** + * Method removeAllSeg + * + */ + public void removeAllSeg() + { + _segList.removeAllElements(); + } //-- void removeAllSeg() + + /** + * Method removePos + * + * + * + * @param index + * @return Pos + */ + public org.vamsas.objects.core.Pos removePos(int index) + { + java.lang.Object obj = _posList.elementAt(index); + _posList.removeElementAt(index); + return (org.vamsas.objects.core.Pos) obj; + } //-- org.vamsas.objects.core.Pos removePos(int) + + /** + * Method removeSeg + * + * + * + * @param index + * @return Seg + */ + public org.vamsas.objects.core.Seg removeSeg(int index) + { + java.lang.Object obj = _segList.elementAt(index); + _segList.removeElementAt(index); + return (org.vamsas.objects.core.Seg) obj; + } //-- org.vamsas.objects.core.Seg removeSeg(int) + + /** + * Method setPos + * + * + * + * @param index + * @param vPos + */ + public void setPos(int index, org.vamsas.objects.core.Pos vPos) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _posList.size())) { + throw new IndexOutOfBoundsException("setPos: Index value '"+index+"' not in range [0.."+_posList.size()+ "]"); + } + _posList.setElementAt(vPos, index); + } //-- void setPos(int, org.vamsas.objects.core.Pos) + + /** + * Method setPos + * + * + * + * @param posArray + */ + public void setPos(org.vamsas.objects.core.Pos[] posArray) + { + //-- copy array + _posList.removeAllElements(); + for (int i = 0; i < posArray.length; i++) { + _posList.addElement(posArray[i]); + } + } //-- void setPos(org.vamsas.objects.core.Pos) + + /** + * Method setSeg + * + * + * + * @param index + * @param vSeg + */ + public void setSeg(int index, org.vamsas.objects.core.Seg vSeg) + throws java.lang.IndexOutOfBoundsException + { + //-- check bounds for index + if ((index < 0) || (index > _segList.size())) { + throw new IndexOutOfBoundsException("setSeg: Index value '"+index+"' not in range [0.."+_segList.size()+ "]"); + } + _segList.setElementAt(vSeg, index); + } //-- void setSeg(int, org.vamsas.objects.core.Seg) + + /** + * Method setSeg + * + * + * + * @param segArray + */ + public void setSeg(org.vamsas.objects.core.Seg[] segArray) + { + //-- copy array + _segList.removeAllElements(); + for (int i = 0; i < segArray.length; i++) { + _segList.addElement(segArray[i]); + } + } //-- void setSeg(org.vamsas.objects.core.Seg) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/RangeTypeDescriptor.java b/src/org/vamsas/objects/core/RangeTypeDescriptor.java index dc737dc..20f0de9 100644 --- a/src/org/vamsas/objects/core/RangeTypeDescriptor.java +++ b/src/org/vamsas/objects/core/RangeTypeDescriptor.java @@ -1,246 +1,246 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class RangeTypeDescriptor. - * - * @version $Revision$ $Date$ - */ -public class RangeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public RangeTypeDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "rangeType"; - - //-- set grouping compositor - setCompositorAsChoice(); - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- initialize element descriptors - - //-- _posList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Pos.class, "_posList", "pos", org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeType target = (RangeType) object; - return target.getPos(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeType target = (RangeType) object; - target.addPos( (org.vamsas.objects.core.Pos) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setRequired(true); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _posList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - //-- _segList - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Seg.class, "_segList", "seg", org.exolab.castor.xml.NodeType.Element); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - RangeType target = (RangeType) object; - return target.getSeg(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - RangeType target = (RangeType) object; - target.addSeg( (org.vamsas.objects.core.Seg) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setNameSpaceURI("http://www.vamsas.org"); - desc.setRequired(true); - desc.setMultivalued(true); - addFieldDescriptor(desc); - - //-- validation code for: _segList - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - } - desc.setValidator(fieldValidator); - } //-- org.vamsas.objects.core.RangeTypeDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.RangeType.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class RangeTypeDescriptor. + * + * @version $Revision$ $Date$ + */ +public class RangeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public RangeTypeDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "rangeType"; + + //-- set grouping compositor + setCompositorAsChoice(); + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- initialize element descriptors + + //-- _posList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Pos.class, "_posList", "pos", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeType target = (RangeType) object; + return target.getPos(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeType target = (RangeType) object; + target.addPos( (org.vamsas.objects.core.Pos) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _posList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + //-- _segList + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.vamsas.objects.core.Seg.class, "_segList", "seg", org.exolab.castor.xml.NodeType.Element); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + RangeType target = (RangeType) object; + return target.getSeg(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + RangeType target = (RangeType) object; + target.addSeg( (org.vamsas.objects.core.Seg) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setNameSpaceURI("http://www.vamsas.org"); + desc.setRequired(true); + desc.setMultivalued(true); + addFieldDescriptor(desc); + + //-- validation code for: _segList + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + } + desc.setValidator(fieldValidator); + } //-- org.vamsas.objects.core.RangeTypeDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.RangeType.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Score.java b/src/org/vamsas/objects/core/Score.java index 121fe2c..bb4c568 100644 --- a/src/org/vamsas/objects/core/Score.java +++ b/src/org/vamsas/objects/core/Score.java @@ -1,241 +1,241 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * Ordered set of optionally named float - * values for the whole annotation - * - * - * @version $Revision$ $Date$ - */ -public class Score extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * internal content storage - */ - private float _content; - - /** - * keeps track of state for field: _content - */ - private boolean _has_content; - - /** - * Field _name - */ - private java.lang.String _name = "score"; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Score() - { - super(); - setName("score"); - } //-- org.vamsas.objects.core.Score() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteContent - * - */ - public void deleteContent() - { - this._has_content= false; - } //-- void deleteContent() - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Score) { - - Score temp = (Score)obj; - if (this._content != temp._content) - return false; - if (this._has_content != temp._has_content) - return false; - if (this._name != null) { - if (temp._name == null) return false; - else if (!(this._name.equals(temp._name))) - return false; - } - else if (temp._name != null) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'content'. The field 'content' - * has the following description: internal content storage - * - * @return float - * @return the value of field 'content'. - */ - public float getContent() - { - return this._content; - } //-- float getContent() - - /** - * Returns the value of field 'name'. - * - * @return String - * @return the value of field 'name'. - */ - public java.lang.String getName() - { - return this._name; - } //-- java.lang.String getName() - - /** - * Method hasContent - * - * - * - * @return boolean - */ - public boolean hasContent() - { - return this._has_content; - } //-- boolean hasContent() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'content'. The field 'content' has - * the following description: internal content storage - * - * @param content the value of field 'content'. - */ - public void setContent(float content) - { - this._content = content; - this._has_content = true; - } //-- void setContent(float) - - /** - * Sets the value of field 'name'. - * - * @param name the value of field 'name'. - */ - public void setName(java.lang.String name) - { - this._name = name; - } //-- void setName(java.lang.String) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return Score - */ - public static org.vamsas.objects.core.Score unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Score) Unmarshaller.unmarshal(org.vamsas.objects.core.Score.class, reader); - } //-- org.vamsas.objects.core.Score unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * Ordered set of optionally named float + * values for the whole annotation + * + * + * @version $Revision$ $Date$ + */ +public class Score extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * internal content storage + */ + private float _content; + + /** + * keeps track of state for field: _content + */ + private boolean _has_content; + + /** + * Field _name + */ + private java.lang.String _name = "score"; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Score() + { + super(); + setName("score"); + } //-- org.vamsas.objects.core.Score() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteContent + * + */ + public void deleteContent() + { + this._has_content= false; + } //-- void deleteContent() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Score) { + + Score temp = (Score)obj; + if (this._content != temp._content) + return false; + if (this._has_content != temp._has_content) + return false; + if (this._name != null) { + if (temp._name == null) return false; + else if (!(this._name.equals(temp._name))) + return false; + } + else if (temp._name != null) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'content'. The field 'content' + * has the following description: internal content storage + * + * @return float + * @return the value of field 'content'. + */ + public float getContent() + { + return this._content; + } //-- float getContent() + + /** + * Returns the value of field 'name'. + * + * @return String + * @return the value of field 'name'. + */ + public java.lang.String getName() + { + return this._name; + } //-- java.lang.String getName() + + /** + * Method hasContent + * + * + * + * @return boolean + */ + public boolean hasContent() + { + return this._has_content; + } //-- boolean hasContent() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'content'. The field 'content' has + * the following description: internal content storage + * + * @param content the value of field 'content'. + */ + public void setContent(float content) + { + this._content = content; + this._has_content = true; + } //-- void setContent(float) + + /** + * Sets the value of field 'name'. + * + * @param name the value of field 'name'. + */ + public void setName(java.lang.String name) + { + this._name = name; + } //-- void setName(java.lang.String) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Score + */ + public static org.vamsas.objects.core.Score unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Score) Unmarshaller.unmarshal(org.vamsas.objects.core.Score.class, reader); + } //-- org.vamsas.objects.core.Score unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/ScoreDescriptor.java b/src/org/vamsas/objects/core/ScoreDescriptor.java index 69dff86..c9c1eda 100644 --- a/src/org/vamsas/objects/core/ScoreDescriptor.java +++ b/src/org/vamsas/objects/core/ScoreDescriptor.java @@ -1,249 +1,249 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class ScoreDescriptor. - * - * @version $Revision$ $Date$ - */ -public class ScoreDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public ScoreDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "score"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- _content - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Score target = (Score) object; - if(!target.hasContent()) - return null; - return new java.lang.Float(target.getContent()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Score target = (Score) object; - // if null, use delete method for optional primitives - if (value == null) { - target.deleteContent(); - return; - } - target.setContent( ((java.lang.Float)value).floatValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - addFieldDescriptor(desc); - - //-- validation code for: _content - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - FloatValidator typeValidator = new FloatValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize attribute descriptors - - //-- _name - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", 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 - { - Score target = (Score) object; - return target.getName(); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Score target = (Score) object; - target.setName( (java.lang.String) value); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _name - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - { //-- local scope - StringValidator typeValidator = new StringValidator(); - typeValidator.setWhiteSpace("preserve"); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.ScoreDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Score.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class ScoreDescriptor. + * + * @version $Revision$ $Date$ + */ +public class ScoreDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public ScoreDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "score"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- _content + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(float.class, "_content", "PCDATA", org.exolab.castor.xml.NodeType.Text); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Score target = (Score) object; + if(!target.hasContent()) + return null; + return new java.lang.Float(target.getContent()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Score target = (Score) object; + // if null, use delete method for optional primitives + if (value == null) { + target.deleteContent(); + return; + } + target.setContent( ((java.lang.Float)value).floatValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + addFieldDescriptor(desc); + + //-- validation code for: _content + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + FloatValidator typeValidator = new FloatValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize attribute descriptors + + //-- _name + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", 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 + { + Score target = (Score) object; + return target.getName(); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Score target = (Score) object; + target.setName( (java.lang.String) value); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _name + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.ScoreDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Score.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/src/org/vamsas/objects/core/Seg.java b/src/org/vamsas/objects/core/Seg.java index c9de39f..980fc8e 100644 --- a/src/org/vamsas/objects/core/Seg.java +++ b/src/org/vamsas/objects/core/Seg.java @@ -1,332 +1,332 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import java.io.IOException; -import java.io.Reader; -import java.io.Serializable; -import java.io.Writer; -import org.exolab.castor.xml.MarshalException; -import org.exolab.castor.xml.Marshaller; -import org.exolab.castor.xml.Unmarshaller; -import org.exolab.castor.xml.ValidationException; -import org.xml.sax.ContentHandler; - -/** - * a region from start to end, with flag for - * inclusivity of terminii - * - * - * @version $Revision$ $Date$ - */ -public class Seg extends org.vamsas.client.Vobject -implements java.io.Serializable -{ - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field _start - */ - private int _start; - - /** - * keeps track of state for field: _start - */ - private boolean _has_start; - - /** - * Field _end - */ - private int _end; - - /** - * keeps track of state for field: _end - */ - private boolean _has_end; - - /** - * when false, a consecutive range like - * 'start=1, end=2' means the region lying - * after position 1 and before position 2 - * - */ - private boolean _inclusive; - - /** - * keeps track of state for field: _inclusive - */ - private boolean _has_inclusive; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public Seg() - { - super(); - } //-- org.vamsas.objects.core.Seg() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method deleteEnd - * - */ - public void deleteEnd() - { - this._has_end= false; - } //-- void deleteEnd() - - /** - * Method deleteInclusive - * - */ - public void deleteInclusive() - { - this._has_inclusive= false; - } //-- void deleteInclusive() - - /** - * Method deleteStart - * - */ - public void deleteStart() - { - this._has_start= false; - } //-- void deleteStart() - - /** - * Note: hashCode() has not been overriden - * - * @param obj - * @return boolean - */ - public boolean equals(java.lang.Object obj) - { - if ( this == obj ) - return true; - - if (super.equals(obj)==false) - return false; - - if (obj instanceof Seg) { - - Seg temp = (Seg)obj; - if (this._start != temp._start) - return false; - if (this._has_start != temp._has_start) - return false; - if (this._end != temp._end) - return false; - if (this._has_end != temp._has_end) - return false; - if (this._inclusive != temp._inclusive) - return false; - if (this._has_inclusive != temp._has_inclusive) - return false; - return true; - } - return false; - } //-- boolean equals(java.lang.Object) - - /** - * Returns the value of field 'end'. - * - * @return int - * @return the value of field 'end'. - */ - public int getEnd() - { - return this._end; - } //-- int getEnd() - - /** - * Returns the value of field 'inclusive'. The field - * 'inclusive' has the following description: when false, a - * consecutive range like - * 'start=1, end=2' means the region lying - * after position 1 and before position 2 - * - * - * @return boolean - * @return the value of field 'inclusive'. - */ - public boolean getInclusive() - { - return this._inclusive; - } //-- boolean getInclusive() - - /** - * Returns the value of field 'start'. - * - * @return int - * @return the value of field 'start'. - */ - public int getStart() - { - return this._start; - } //-- int getStart() - - /** - * Method hasEnd - * - * - * - * @return boolean - */ - public boolean hasEnd() - { - return this._has_end; - } //-- boolean hasEnd() - - /** - * Method hasInclusive - * - * - * - * @return boolean - */ - public boolean hasInclusive() - { - return this._has_inclusive; - } //-- boolean hasInclusive() - - /** - * Method hasStart - * - * - * - * @return boolean - */ - public boolean hasStart() - { - return this._has_start; - } //-- boolean hasStart() - - /** - * Method isValid - * - * - * - * @return boolean - */ - public boolean isValid() - { - try { - validate(); - } - catch (org.exolab.castor.xml.ValidationException vex) { - return false; - } - return true; - } //-- boolean isValid() - - /** - * Method marshal - * - * - * - * @param out - */ - public void marshal(java.io.Writer out) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, out); - } //-- void marshal(java.io.Writer) - - /** - * Method marshal - * - * - * - * @param handler - */ - public void marshal(org.xml.sax.ContentHandler handler) - throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - - Marshaller.marshal(this, handler); - } //-- void marshal(org.xml.sax.ContentHandler) - - /** - * Sets the value of field 'end'. - * - * @param end the value of field 'end'. - */ - public void setEnd(int end) - { - this._end = end; - this._has_end = true; - } //-- void setEnd(int) - - /** - * Sets the value of field 'inclusive'. The field 'inclusive' - * has the following description: when false, a consecutive - * range like - * 'start=1, end=2' means the region lying - * after position 1 and before position 2 - * - * - * @param inclusive the value of field 'inclusive'. - */ - public void setInclusive(boolean inclusive) - { - this._inclusive = inclusive; - this._has_inclusive = true; - } //-- void setInclusive(boolean) - - /** - * Sets the value of field 'start'. - * - * @param start the value of field 'start'. - */ - public void setStart(int start) - { - this._start = start; - this._has_start = true; - } //-- void setStart(int) - - /** - * Method unmarshal - * - * - * - * @param reader - * @return Seg - */ - public static org.vamsas.objects.core.Seg unmarshal(java.io.Reader reader) - throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException - { - return (org.vamsas.objects.core.Seg) Unmarshaller.unmarshal(org.vamsas.objects.core.Seg.class, reader); - } //-- org.vamsas.objects.core.Seg unmarshal(java.io.Reader) - - /** - * Method validate - * - */ - public void validate() - throws org.exolab.castor.xml.ValidationException - { - org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); - validator.validate(this); - } //-- void validate() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import java.io.IOException; +import java.io.Reader; +import java.io.Serializable; +import java.io.Writer; +import org.exolab.castor.xml.MarshalException; +import org.exolab.castor.xml.Marshaller; +import org.exolab.castor.xml.Unmarshaller; +import org.exolab.castor.xml.ValidationException; +import org.xml.sax.ContentHandler; + +/** + * a region from start to end, with flag for + * inclusivity of terminii + * + * + * @version $Revision$ $Date$ + */ +public class Seg extends org.vamsas.client.Vobject +implements java.io.Serializable +{ + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field _start + */ + private int _start; + + /** + * keeps track of state for field: _start + */ + private boolean _has_start; + + /** + * Field _end + */ + private int _end; + + /** + * keeps track of state for field: _end + */ + private boolean _has_end; + + /** + * when false, a consecutive range like + * 'start=1, end=2' means the region lying + * after position 1 and before position 2 + * + */ + private boolean _inclusive; + + /** + * keeps track of state for field: _inclusive + */ + private boolean _has_inclusive; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public Seg() + { + super(); + } //-- org.vamsas.objects.core.Seg() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method deleteEnd + * + */ + public void deleteEnd() + { + this._has_end= false; + } //-- void deleteEnd() + + /** + * Method deleteInclusive + * + */ + public void deleteInclusive() + { + this._has_inclusive= false; + } //-- void deleteInclusive() + + /** + * Method deleteStart + * + */ + public void deleteStart() + { + this._has_start= false; + } //-- void deleteStart() + + /** + * Note: hashCode() has not been overriden + * + * @param obj + * @return boolean + */ + public boolean equals(java.lang.Object obj) + { + if ( this == obj ) + return true; + + if (super.equals(obj)==false) + return false; + + if (obj instanceof Seg) { + + Seg temp = (Seg)obj; + if (this._start != temp._start) + return false; + if (this._has_start != temp._has_start) + return false; + if (this._end != temp._end) + return false; + if (this._has_end != temp._has_end) + return false; + if (this._inclusive != temp._inclusive) + return false; + if (this._has_inclusive != temp._has_inclusive) + return false; + return true; + } + return false; + } //-- boolean equals(java.lang.Object) + + /** + * Returns the value of field 'end'. + * + * @return int + * @return the value of field 'end'. + */ + public int getEnd() + { + return this._end; + } //-- int getEnd() + + /** + * Returns the value of field 'inclusive'. The field + * 'inclusive' has the following description: when false, a + * consecutive range like + * 'start=1, end=2' means the region lying + * after position 1 and before position 2 + * + * + * @return boolean + * @return the value of field 'inclusive'. + */ + public boolean getInclusive() + { + return this._inclusive; + } //-- boolean getInclusive() + + /** + * Returns the value of field 'start'. + * + * @return int + * @return the value of field 'start'. + */ + public int getStart() + { + return this._start; + } //-- int getStart() + + /** + * Method hasEnd + * + * + * + * @return boolean + */ + public boolean hasEnd() + { + return this._has_end; + } //-- boolean hasEnd() + + /** + * Method hasInclusive + * + * + * + * @return boolean + */ + public boolean hasInclusive() + { + return this._has_inclusive; + } //-- boolean hasInclusive() + + /** + * Method hasStart + * + * + * + * @return boolean + */ + public boolean hasStart() + { + return this._has_start; + } //-- boolean hasStart() + + /** + * Method isValid + * + * + * + * @return boolean + */ + public boolean isValid() + { + try { + validate(); + } + catch (org.exolab.castor.xml.ValidationException vex) { + return false; + } + return true; + } //-- boolean isValid() + + /** + * Method marshal + * + * + * + * @param out + */ + public void marshal(java.io.Writer out) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, out); + } //-- void marshal(java.io.Writer) + + /** + * Method marshal + * + * + * + * @param handler + */ + public void marshal(org.xml.sax.ContentHandler handler) + throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + + Marshaller.marshal(this, handler); + } //-- void marshal(org.xml.sax.ContentHandler) + + /** + * Sets the value of field 'end'. + * + * @param end the value of field 'end'. + */ + public void setEnd(int end) + { + this._end = end; + this._has_end = true; + } //-- void setEnd(int) + + /** + * Sets the value of field 'inclusive'. The field 'inclusive' + * has the following description: when false, a consecutive + * range like + * 'start=1, end=2' means the region lying + * after position 1 and before position 2 + * + * + * @param inclusive the value of field 'inclusive'. + */ + public void setInclusive(boolean inclusive) + { + this._inclusive = inclusive; + this._has_inclusive = true; + } //-- void setInclusive(boolean) + + /** + * Sets the value of field 'start'. + * + * @param start the value of field 'start'. + */ + public void setStart(int start) + { + this._start = start; + this._has_start = true; + } //-- void setStart(int) + + /** + * Method unmarshal + * + * + * + * @param reader + * @return Seg + */ + public static org.vamsas.objects.core.Seg unmarshal(java.io.Reader reader) + throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException + { + return (org.vamsas.objects.core.Seg) Unmarshaller.unmarshal(org.vamsas.objects.core.Seg.class, reader); + } //-- org.vamsas.objects.core.Seg unmarshal(java.io.Reader) + + /** + * Method validate + * + */ + public void validate() + throws org.exolab.castor.xml.ValidationException + { + org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); + validator.validate(this); + } //-- void validate() + +} diff --git a/src/org/vamsas/objects/core/SegDescriptor.java b/src/org/vamsas/objects/core/SegDescriptor.java index 055b2f6..41a423c 100644 --- a/src/org/vamsas/objects/core/SegDescriptor.java +++ b/src/org/vamsas/objects/core/SegDescriptor.java @@ -1,297 +1,297 @@ -/* - * This class was automatically generated with - * Castor 0.9.9M2, using an XML - * Schema. - * $Id$ - */ - -package org.vamsas.objects.core; - - //---------------------------------/ - //- Imported classes and packages -/ -//---------------------------------/ - -import org.exolab.castor.mapping.AccessMode; -import org.exolab.castor.xml.TypeValidator; -import org.exolab.castor.xml.XMLFieldDescriptor; -import org.exolab.castor.xml.validators.*; - -/** - * Class SegDescriptor. - * - * @version $Revision$ $Date$ - */ -public class SegDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { - - - //--------------------------/ - //- Class/Member Variables -/ - //--------------------------/ - - /** - * Field nsPrefix - */ - private java.lang.String nsPrefix; - - /** - * Field nsURI - */ - private java.lang.String nsURI; - - /** - * Field xmlName - */ - private java.lang.String xmlName; - - /** - * Field identity - */ - private org.exolab.castor.xml.XMLFieldDescriptor identity; - - - //----------------/ - //- Constructors -/ - //----------------/ - - public SegDescriptor() - { - super(); - nsURI = "http://www.vamsas.org"; - xmlName = "seg"; - org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; - org.exolab.castor.mapping.FieldHandler handler = null; - org.exolab.castor.xml.FieldValidator fieldValidator = null; - //-- initialize attribute descriptors - - //-- _start - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Seg target = (Seg) object; - if(!target.hasStart()) - return null; - return new java.lang.Integer(target.getStart()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Seg target = (Seg) object; - // ignore null values for non optional primitives - if (value == null) return; - - target.setStart( ((java.lang.Integer)value).intValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _start - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator= new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _end - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Seg target = (Seg) object; - if(!target.hasEnd()) - return null; - return new java.lang.Integer(target.getEnd()); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Seg target = (Seg) object; - // ignore null values for non optional primitives - if (value == null) return; - - target.setEnd( ((java.lang.Integer)value).intValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _end - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - IntegerValidator typeValidator= new IntegerValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- _inclusive - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_inclusive", "inclusive", org.exolab.castor.xml.NodeType.Attribute); - handler = new org.exolab.castor.xml.XMLFieldHandler() { - public java.lang.Object getValue( java.lang.Object object ) - throws IllegalStateException - { - Seg target = (Seg) object; - if(!target.hasInclusive()) - return null; - return (target.getInclusive() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); - } - public void setValue( java.lang.Object object, java.lang.Object value) - throws IllegalStateException, IllegalArgumentException - { - try { - Seg target = (Seg) object; - // ignore null values for non optional primitives - if (value == null) return; - - target.setInclusive( ((java.lang.Boolean)value).booleanValue()); - } - catch (java.lang.Exception ex) { - throw new IllegalStateException(ex.toString()); - } - } - public java.lang.Object newInstance( java.lang.Object parent ) { - return null; - } - }; - desc.setHandler(handler); - desc.setRequired(true); - desc.setMultivalued(false); - addFieldDescriptor(desc); - - //-- validation code for: _inclusive - fieldValidator = new org.exolab.castor.xml.FieldValidator(); - fieldValidator.setMinOccurs(1); - { //-- local scope - BooleanValidator typeValidator = new BooleanValidator(); - fieldValidator.setValidator(typeValidator); - } - desc.setValidator(fieldValidator); - //-- initialize element descriptors - - } //-- org.vamsas.objects.core.SegDescriptor() - - - //-----------/ - //- Methods -/ - //-----------/ - - /** - * Method getAccessMode - * - * - * - * @return AccessMode - */ - public org.exolab.castor.mapping.AccessMode getAccessMode() - { - return null; - } //-- org.exolab.castor.mapping.AccessMode getAccessMode() - - /** - * Method getExtends - * - * - * - * @return ClassDescriptor - */ - public org.exolab.castor.mapping.ClassDescriptor getExtends() - { - return null; - } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() - - /** - * Method getIdentity - * - * - * - * @return FieldDescriptor - */ - public org.exolab.castor.mapping.FieldDescriptor getIdentity() - { - return identity; - } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() - - /** - * Method getJavaClass - * - * - * - * @return Class - */ - public java.lang.Class getJavaClass() - { - return org.vamsas.objects.core.Seg.class; - } //-- java.lang.Class getJavaClass() - - /** - * Method getNameSpacePrefix - * - * - * - * @return String - */ - public java.lang.String getNameSpacePrefix() - { - return nsPrefix; - } //-- java.lang.String getNameSpacePrefix() - - /** - * Method getNameSpaceURI - * - * - * - * @return String - */ - public java.lang.String getNameSpaceURI() - { - return nsURI; - } //-- java.lang.String getNameSpaceURI() - - /** - * Method getValidator - * - * - * - * @return TypeValidator - */ - public org.exolab.castor.xml.TypeValidator getValidator() - { - return this; - } //-- org.exolab.castor.xml.TypeValidator getValidator() - - /** - * Method getXMLName - * - * - * - * @return String - */ - public java.lang.String getXMLName() - { - return xmlName; - } //-- java.lang.String getXMLName() - -} +/* + * This class was automatically generated with + * Castor 0.9.9M2, using an XML + * Schema. + * $Id$ + */ + +package org.vamsas.objects.core; + + //---------------------------------/ + //- Imported classes and packages -/ +//---------------------------------/ + +import org.exolab.castor.mapping.AccessMode; +import org.exolab.castor.xml.TypeValidator; +import org.exolab.castor.xml.XMLFieldDescriptor; +import org.exolab.castor.xml.validators.*; + +/** + * Class SegDescriptor. + * + * @version $Revision$ $Date$ + */ +public class SegDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { + + + //--------------------------/ + //- Class/Member Variables -/ + //--------------------------/ + + /** + * Field nsPrefix + */ + private java.lang.String nsPrefix; + + /** + * Field nsURI + */ + private java.lang.String nsURI; + + /** + * Field xmlName + */ + private java.lang.String xmlName; + + /** + * Field identity + */ + private org.exolab.castor.xml.XMLFieldDescriptor identity; + + + //----------------/ + //- Constructors -/ + //----------------/ + + public SegDescriptor() + { + super(); + nsURI = "http://www.vamsas.org"; + xmlName = "seg"; + org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; + org.exolab.castor.mapping.FieldHandler handler = null; + org.exolab.castor.xml.FieldValidator fieldValidator = null; + //-- initialize attribute descriptors + + //-- _start + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_start", "start", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Seg target = (Seg) object; + if(!target.hasStart()) + return null; + return new java.lang.Integer(target.getStart()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Seg target = (Seg) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setStart( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _start + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _end + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_end", "end", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Seg target = (Seg) object; + if(!target.hasEnd()) + return null; + return new java.lang.Integer(target.getEnd()); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Seg target = (Seg) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setEnd( ((java.lang.Integer)value).intValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _end + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + IntegerValidator typeValidator= new IntegerValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- _inclusive + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_inclusive", "inclusive", org.exolab.castor.xml.NodeType.Attribute); + handler = new org.exolab.castor.xml.XMLFieldHandler() { + public java.lang.Object getValue( java.lang.Object object ) + throws IllegalStateException + { + Seg target = (Seg) object; + if(!target.hasInclusive()) + return null; + return (target.getInclusive() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + } + public void setValue( java.lang.Object object, java.lang.Object value) + throws IllegalStateException, IllegalArgumentException + { + try { + Seg target = (Seg) object; + // ignore null values for non optional primitives + if (value == null) return; + + target.setInclusive( ((java.lang.Boolean)value).booleanValue()); + } + catch (java.lang.Exception ex) { + throw new IllegalStateException(ex.toString()); + } + } + public java.lang.Object newInstance( java.lang.Object parent ) { + return null; + } + }; + desc.setHandler(handler); + desc.setRequired(true); + desc.setMultivalued(false); + addFieldDescriptor(desc); + + //-- validation code for: _inclusive + fieldValidator = new org.exolab.castor.xml.FieldValidator(); + fieldValidator.setMinOccurs(1); + { //-- local scope + BooleanValidator typeValidator = new BooleanValidator(); + fieldValidator.setValidator(typeValidator); + } + desc.setValidator(fieldValidator); + //-- initialize element descriptors + + } //-- org.vamsas.objects.core.SegDescriptor() + + + //-----------/ + //- Methods -/ + //-----------/ + + /** + * Method getAccessMode + * + * + * + * @return AccessMode + */ + public org.exolab.castor.mapping.AccessMode getAccessMode() + { + return null; + } //-- org.exolab.castor.mapping.AccessMode getAccessMode() + + /** + * Method getExtends + * + * + * + * @return ClassDescriptor + */ + public org.exolab.castor.mapping.ClassDescriptor getExtends() + { + return null; + } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() + + /** + * Method getIdentity + * + * + * + * @return FieldDescriptor + */ + public org.exolab.castor.mapping.FieldDescriptor getIdentity() + { + return identity; + } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() + + /** + * Method getJavaClass + * + * + * + * @return Class + */ + public java.lang.Class getJavaClass() + { + return org.vamsas.objects.core.Seg.class; + } //-- java.lang.Class getJavaClass() + + /** + * Method getNameSpacePrefix + * + * + * + * @return String + */ + public java.lang.String getNameSpacePrefix() + { + return nsPrefix; + } //-- java.lang.String getNameSpacePrefix() + + /** + * Method getNameSpaceURI + * + * + * + * @return String + */ + public java.lang.String getNameSpaceURI() + { + return nsURI; + } //-- java.lang.String getNameSpaceURI() + + /** + * Method getValidator + * + * + * + * @return TypeValidator + */ + public org.exolab.castor.xml.TypeValidator getValidator() + { + return this; + } //-- org.exolab.castor.xml.TypeValidator getValidator() + + /** + * Method getXMLName + * + * + * + * @return String + */ + public java.lang.String getXMLName() + { + return xmlName; + } //-- java.lang.String getXMLName() + +} diff --git a/test/archivestore.zip b/test/archivestore.zip new file mode 100644 index 0000000..f4b2ba5 Binary files /dev/null and b/test/archivestore.zip differ diff --git a/test/vamsas.zip b/test/vamsas.zip index f46263a..bf0e72e 100755 Binary files a/test/vamsas.zip and b/test/vamsas.zip differ