From: jprocter Date: Wed, 12 Oct 2005 15:36:46 +0000 (+0000) Subject: updated core objects from latest schema (dbRef) X-Git-Tag: Release_0.2~456 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=47b7b25fb4bb7d41bf9e49a73fc455be15d63e13;p=vamsas.git updated core objects from latest schema (dbRef) git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@64 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/org/vamsas/objects/core/DbRef.java b/src/org/vamsas/objects/core/DbRef.java index 48b9a74..ad8f79f 100644 --- a/src/org/vamsas/objects/core/DbRef.java +++ b/src/org/vamsas/objects/core/DbRef.java @@ -38,17 +38,17 @@ implements java.io.Serializable /** * Field _source */ - private java.lang.Object _source; + private java.lang.String _source; /** * Field _version */ - private java.lang.Object _version; + private java.lang.String _version; /** * Field _accessionId */ - private java.lang.Object _accessionId; + private java.lang.String _accessionId; /** * Field _id @@ -123,13 +123,13 @@ implements java.io.Serializable /** * Returns the value of field 'accessionId'. * - * @return Object + * @return String * @return the value of field 'accessionId'. */ - public java.lang.Object getAccessionId() + public java.lang.String getAccessionId() { return this._accessionId; - } //-- java.lang.Object getAccessionId() + } //-- java.lang.String getAccessionId() /** * Returns the value of field 'id'. @@ -145,24 +145,24 @@ implements java.io.Serializable /** * Returns the value of field 'source'. * - * @return Object + * @return String * @return the value of field 'source'. */ - public java.lang.Object getSource() + public java.lang.String getSource() { return this._source; - } //-- java.lang.Object getSource() + } //-- java.lang.String getSource() /** * Returns the value of field 'version'. * - * @return Object + * @return String * @return the value of field 'version'. */ - public java.lang.Object getVersion() + public java.lang.String getVersion() { return this._version; - } //-- java.lang.Object getVersion() + } //-- java.lang.String getVersion() /** * Method isValid @@ -215,10 +215,10 @@ implements java.io.Serializable * * @param accessionId the value of field 'accessionId'. */ - public void setAccessionId(java.lang.Object accessionId) + public void setAccessionId(java.lang.String accessionId) { this._accessionId = accessionId; - } //-- void setAccessionId(java.lang.Object) + } //-- void setAccessionId(java.lang.String) /** * Sets the value of field 'id'. @@ -235,20 +235,20 @@ implements java.io.Serializable * * @param source the value of field 'source'. */ - public void setSource(java.lang.Object source) + public void setSource(java.lang.String source) { this._source = source; - } //-- void setSource(java.lang.Object) + } //-- void setSource(java.lang.String) /** * Sets the value of field 'version'. * * @param version the value of field 'version'. */ - public void setVersion(java.lang.Object version) + public void setVersion(java.lang.String version) { this._version = version; - } //-- void setVersion(java.lang.Object) + } //-- void setVersion(java.lang.String) /** * Method unmarshal diff --git a/src/org/vamsas/objects/core/DbRefDescriptor.java b/src/org/vamsas/objects/core/DbRefDescriptor.java index fbf02dd..bc4d6df 100644 --- a/src/org/vamsas/objects/core/DbRefDescriptor.java +++ b/src/org/vamsas/objects/core/DbRefDescriptor.java @@ -64,7 +64,8 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript //-- initialize attribute descriptors //-- _source - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_source", "source", org.exolab.castor.xml.NodeType.Attribute); + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_source", "source", 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 @@ -77,14 +78,14 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript { try { DbRef target = (DbRef) object; - target.setSource( (java.lang.Object) value); + target.setSource( (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.Object(); + return null; } }; desc.setHandler(handler); @@ -94,10 +95,14 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript //-- validation code for: _source fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- _version - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_version", "version", org.exolab.castor.xml.NodeType.Attribute); + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_version", "version", 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 @@ -110,14 +115,14 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript { try { DbRef target = (DbRef) object; - target.setVersion( (java.lang.Object) value); + target.setVersion( (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.Object(); + return null; } }; desc.setHandler(handler); @@ -127,10 +132,14 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript //-- validation code for: _version fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- _accessionId - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_accessionId", "accessionId", org.exolab.castor.xml.NodeType.Attribute); + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_accessionId", "accessionId", 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 @@ -143,14 +152,14 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript { try { DbRef target = (DbRef) object; - target.setAccessionId( (java.lang.Object) value); + target.setAccessionId( (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.Object(); + return null; } }; desc.setHandler(handler); @@ -160,6 +169,9 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript //-- validation code for: _accessionId fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope + StringValidator typeValidator = new StringValidator(); + typeValidator.setWhiteSpace("preserve"); + fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); //-- _id