- }
-
- /**
- * Returns the value of field 'provenance'.
- *
- * @return the value of field 'Provenance'.
- */
- public uk.ac.vamsas.objects.core.Provenance getProvenance(
- ) {
- return this._provenance;
- }
-
- /**
- * Method getSeqRef.
- *
- * @param index
- * @throws java.lang.IndexOutOfBoundsException if the index
- * given is outside the bounds of the collection
- * @return the value of the java.lang.Object at the given index
- */
- public java.lang.Object getSeqRef(
- final int index)
- throws java.lang.IndexOutOfBoundsException {
- // check bounds for index
- if (index < 0 || index >= this._seqRef.size()) {
- throw new IndexOutOfBoundsException("getSeqRef: Index value '" + index + "' not in range [0.." + (this._seqRef.size() - 1) + "]");
- }
-
- return _seqRef.get(index);
- }
-
- /**
- * Method getSeqRef.Returns the contents of the collection in
- * an Array. <p>Note: Just in case the collection contents
- * are changing in another thread, we pass a 0-length Array of
- * the correct type into the API call. This way we <i>know</i>
- * that the Array returned is of exactly the correct length.
- *
- * @return this collection as an Array
- */
- public java.lang.Object[] getSeqRef(
- ) {
- java.lang.Object[] array = new java.lang.Object[0];
- return (java.lang.Object[]) this._seqRef.toArray(array);
- }
-
- /**
- * Method getSeqRefAsReference.Returns a reference to
- * '_seqRef'. No type checking is performed on any
- * modifications to the Vector.
- *
- * @return a reference to the Vector backing this class
- */
- public java.util.Vector getSeqRefAsReference(
- ) {
- return this._seqRef;
- }
-
- /**
- * Method getSeqRefCount.
- *
- * @return the size of this collection
- */
- public int getSeqRefCount(
- ) {
- return this._seqRef.size();
- }
-
- /**
- * Overrides the java.lang.Object.hashCode method.
- * <p>
- * The following steps came from <b>Effective Java Programming
- * Language Guide</b> by Joshua Bloch, Chapter 3
- *
- * @return a hash code value for the object.
- */
- public int hashCode(
- ) {
- int result = super.hashCode();
-
- long tmp;
- if (_seqRef != null
- && !org.castor.util.CycleBreaker.startingToCycle(_seqRef)) {
- result = 37 * result + _seqRef.hashCode();
- org.castor.util.CycleBreaker.releaseCycleHandle(_seqRef);
- }
- if (_provenance != null
- && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {
- result = 37 * result + _provenance.hashCode();
- org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);
- }
-
- return result;
- }
-
- /**
- * Method isValid.
- *
- * @return true if this object is valid according to the schema
- */
- public boolean isValid(
- ) {
- try {
- validate();
- } catch (org.exolab.castor.xml.ValidationException vex) {
+ if (this._provenance != null) {
+ if (temp._provenance == null)
+ return false;
+ if (this._provenance != temp._provenance) {
+ thcycle = org.castor.util.CycleBreaker
+ .startingToCycle(this._provenance);
+ tmcycle = org.castor.util.CycleBreaker
+ .startingToCycle(temp._provenance);
+ if (thcycle != tmcycle) {
+ if (!thcycle) {
+ org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+ }
+ ;
+ if (!tmcycle) {
+ org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+ }
+ ;