fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
- IntegerValidator typeValidator= new IntegerValidator();
+ IntegerValidator typeValidator = new IntegerValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
/**
* Field _end
*/
- private java.lang.String _end;
+ private int _end;
+
+ /**
+ * keeps track of state for field: _end
+ */
+ private boolean _has_end;
/**
* Field _begin
*/
- private java.lang.String _begin;
+ private int _begin;
+
+ /**
+ * keeps track of state for field: _begin
+ */
+ private boolean _has_begin;
/**
* Field _seqRef
} //-- void addProvenance(int, org.vamsas.objects.core.Provenance)
/**
+ * Method deleteBegin
+ *
+ */
+ public void deleteBegin()
+ {
+ this._has_begin= false;
+ } //-- void deleteBegin()
+
+ /**
+ * Method deleteEnd
+ *
+ */
+ public void deleteEnd()
+ {
+ this._has_end= false;
+ } //-- void deleteEnd()
+
+ /**
* Method enumerateAnnotationElement
*
*
}
else if (temp._type != null)
return false;
- if (this._end != null) {
- if (temp._end == null) return false;
- else if (!(this._end.equals(temp._end)))
- return false;
- }
- else if (temp._end != null)
+ if (this._end != temp._end)
return false;
- if (this._begin != null) {
- if (temp._begin == null) return false;
- else if (!(this._begin.equals(temp._begin)))
- return false;
- }
- else if (temp._begin != null)
+ if (this._has_end != temp._has_end)
+ return false;
+ if (this._begin != temp._begin)
+ return false;
+ if (this._has_begin != temp._has_begin)
return false;
if (this._seqRef != null) {
if (temp._seqRef == null) return false;
/**
* Returns the value of field 'begin'.
*
- * @return String
+ * @return int
* @return the value of field 'begin'.
*/
- public java.lang.String getBegin()
+ public int getBegin()
{
return this._begin;
- } //-- java.lang.String getBegin()
+ } //-- int getBegin()
/**
* Returns the value of field 'description'.
/**
* Returns the value of field 'end'.
*
- * @return String
+ * @return int
* @return the value of field 'end'.
*/
- public java.lang.String getEnd()
+ public int getEnd()
{
return this._end;
- } //-- java.lang.String getEnd()
+ } //-- int getEnd()
/**
* Returns the value of field 'id'.
} //-- java.lang.String getType()
/**
+ * Method hasBegin
+ *
+ *
+ *
+ * @return boolean
+ */
+ public boolean hasBegin()
+ {
+ return this._has_begin;
+ } //-- boolean hasBegin()
+
+ /**
+ * Method hasEnd
+ *
+ *
+ *
+ * @return boolean
+ */
+ public boolean hasEnd()
+ {
+ return this._has_end;
+ } //-- boolean hasEnd()
+
+ /**
* Method isValid
*
*
*
* @param begin the value of field 'begin'.
*/
- public void setBegin(java.lang.String begin)
+ public void setBegin(int begin)
{
this._begin = begin;
- } //-- void setBegin(java.lang.String)
+ this._has_begin = true;
+ } //-- void setBegin(int)
/**
* Sets the value of field 'description'.
*
* @param end the value of field 'end'.
*/
- public void setEnd(java.lang.String end)
+ public void setEnd(int end)
{
this._end = end;
- } //-- void setEnd(java.lang.String)
+ this._has_end = true;
+ } //-- void setEnd(int)
/**
* Sets the value of field 'id'.
}
desc.setValidator(fieldValidator);
//-- _end
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_end", "end", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
+ 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
{
DataSetAnnotations target = (DataSetAnnotations) object;
- return target.getEnd();
+ 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 {
DataSetAnnotations target = (DataSetAnnotations) object;
- target.setEnd( (java.lang.String) value);
+ // 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());
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
- StringValidator typeValidator = new StringValidator();
- typeValidator.setWhiteSpace("preserve");
+ IntegerValidator typeValidator = new IntegerValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
//-- _begin
- desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_begin", "begin", org.exolab.castor.xml.NodeType.Attribute);
- desc.setImmutable(true);
+ desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_begin", "begin", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
DataSetAnnotations target = (DataSetAnnotations) object;
- return target.getBegin();
+ if(!target.hasBegin())
+ return null;
+ return new java.lang.Integer(target.getBegin());
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
DataSetAnnotations target = (DataSetAnnotations) object;
- target.setBegin( (java.lang.String) value);
+ // ignore null values for non optional primitives
+ if (value == null) return;
+
+ target.setBegin( ((java.lang.Integer)value).intValue());
}
catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
- StringValidator typeValidator = new StringValidator();
- typeValidator.setWhiteSpace("preserve");
+ IntegerValidator typeValidator = new IntegerValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
- IntegerValidator typeValidator= new IntegerValidator();
+ IntegerValidator typeValidator = new IntegerValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(1);
{ //-- local scope
- IntegerValidator typeValidator= new IntegerValidator();
+ IntegerValidator typeValidator = new IntegerValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);