2 * This class was automatically generated with
\r
3 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
\r
8 package uk.ac.vamsas.objects.core;
\r
10 //---------------------------------/
\r
11 //- Imported classes and packages -/
\r
12 //---------------------------------/
\r
14 import org.exolab.castor.xml.Marshaller;
\r
15 import org.exolab.castor.xml.Unmarshaller;
\r
18 * Annotation for a rangeSpec - values can be attached for the
\r
20 * specification, and to each position within the spec. following
\r
22 * specified by the ordered set of rangeSpec (pos, seg) elements.
\r
24 * @version $Revision$ $Date$
\r
26 public class RangeAnnotation extends uk.ac.vamsas.objects.core.RangeType
\r
27 implements java.io.Serializable
\r
31 //--------------------------/
\r
32 //- Class/Member Variables -/
\r
33 //--------------------------/
\r
36 * Primary Key for vamsas object referencing
\r
39 private java.lang.String _id;
\r
42 * Field _modifiable.
\r
44 private java.lang.String _modifiable;
\r
47 * Annotation with the same non-empty group name are grouped
\r
50 private java.lang.String _group = "";
\r
53 * A Das Feature has both a type and a Type ID. We go the
\r
54 * route of requiring the type string to be taken from a
\r
56 * vocabulary if an application expects others to make sense
\r
58 * type may qualified - so uniprot:CHAIN is a valid type name,
\r
60 * considered distinct from someotherDB:CHAIN
\r
62 private java.lang.String _type;
\r
65 * Short, meaningful name for the annotation - if this
\r
66 * is absent, then the type string should be used in its
\r
70 private java.lang.String _label;
\r
73 * Human readable description of the annotation
\r
76 private java.lang.String _description;
\r
79 * TODO: specify this - we have considered taking the GO
\r
80 * evidence codes as a model for assessing a measure of
\r
84 private java.lang.String _status;
\r
87 * Annotation Element position maps to ordered positions
\r
88 * defined by the sequence of rangeType pos positions or
\r
90 * seg start/end segments.
\r
92 private java.util.Vector _annotationElementList;
\r
95 * Ordered set of optionally named float values for the
\r
98 private java.util.Vector _scoreList;
\r
103 private java.util.Vector _linkList;
\r
106 * Note:These are mutable so an application should check
\r
109 private java.util.Vector _propertyList;
\r
112 //----------------/
\r
113 //- Constructors -/
\r
114 //----------------/
\r
116 public RangeAnnotation() {
\r
119 this._annotationElementList = new java.util.Vector();
\r
120 this._scoreList = new java.util.Vector();
\r
121 this._linkList = new java.util.Vector();
\r
122 this._propertyList = new java.util.Vector();
\r
133 * @param vAnnotationElement
\r
134 * @throws java.lang.IndexOutOfBoundsException if the index
\r
135 * given is outside the bounds of the collection
\r
137 public void addAnnotationElement(
\r
138 final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)
\r
139 throws java.lang.IndexOutOfBoundsException {
\r
140 this._annotationElementList.addElement(vAnnotationElement);
\r
147 * @param vAnnotationElement
\r
148 * @throws java.lang.IndexOutOfBoundsException if the index
\r
149 * given is outside the bounds of the collection
\r
151 public void addAnnotationElement(
\r
153 final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)
\r
154 throws java.lang.IndexOutOfBoundsException {
\r
155 this._annotationElementList.add(index, vAnnotationElement);
\r
162 * @throws java.lang.IndexOutOfBoundsException if the index
\r
163 * given is outside the bounds of the collection
\r
165 public void addLink(
\r
166 final uk.ac.vamsas.objects.core.Link vLink)
\r
167 throws java.lang.IndexOutOfBoundsException {
\r
168 this._linkList.addElement(vLink);
\r
176 * @throws java.lang.IndexOutOfBoundsException if the index
\r
177 * given is outside the bounds of the collection
\r
179 public void addLink(
\r
181 final uk.ac.vamsas.objects.core.Link vLink)
\r
182 throws java.lang.IndexOutOfBoundsException {
\r
183 this._linkList.add(index, vLink);
\r
190 * @throws java.lang.IndexOutOfBoundsException if the index
\r
191 * given is outside the bounds of the collection
\r
193 public void addProperty(
\r
194 final uk.ac.vamsas.objects.core.Property vProperty)
\r
195 throws java.lang.IndexOutOfBoundsException {
\r
196 this._propertyList.addElement(vProperty);
\r
204 * @throws java.lang.IndexOutOfBoundsException if the index
\r
205 * given is outside the bounds of the collection
\r
207 public void addProperty(
\r
209 final uk.ac.vamsas.objects.core.Property vProperty)
\r
210 throws java.lang.IndexOutOfBoundsException {
\r
211 this._propertyList.add(index, vProperty);
\r
218 * @throws java.lang.IndexOutOfBoundsException if the index
\r
219 * given is outside the bounds of the collection
\r
221 public void addScore(
\r
222 final uk.ac.vamsas.objects.core.Score vScore)
\r
223 throws java.lang.IndexOutOfBoundsException {
\r
224 this._scoreList.addElement(vScore);
\r
232 * @throws java.lang.IndexOutOfBoundsException if the index
\r
233 * given is outside the bounds of the collection
\r
235 public void addScore(
\r
237 final uk.ac.vamsas.objects.core.Score vScore)
\r
238 throws java.lang.IndexOutOfBoundsException {
\r
239 this._scoreList.add(index, vScore);
\r
243 * Method enumerateAnnotationElement.
\r
245 * @return an Enumeration over all
\r
246 * uk.ac.vamsas.objects.core.AnnotationElement elements
\r
248 public java.util.Enumeration enumerateAnnotationElement(
\r
250 return this._annotationElementList.elements();
\r
254 * Method enumerateLink.
\r
256 * @return an Enumeration over all
\r
257 * uk.ac.vamsas.objects.core.Link elements
\r
259 public java.util.Enumeration enumerateLink(
\r
261 return this._linkList.elements();
\r
265 * Method enumerateProperty.
\r
267 * @return an Enumeration over all
\r
268 * uk.ac.vamsas.objects.core.Property elements
\r
270 public java.util.Enumeration enumerateProperty(
\r
272 return this._propertyList.elements();
\r
276 * Method enumerateScore.
\r
278 * @return an Enumeration over all
\r
279 * uk.ac.vamsas.objects.core.Score elements
\r
281 public java.util.Enumeration enumerateScore(
\r
283 return this._scoreList.elements();
\r
287 * Overrides the java.lang.Object.equals method.
\r
290 * @return true if the objects are equal.
\r
292 public boolean equals(
\r
293 final java.lang.Object obj) {
\r
297 if (super.equals(obj)==false)
\r
300 if (obj instanceof RangeAnnotation) {
\r
302 RangeAnnotation temp = (RangeAnnotation)obj;
\r
305 if (this._id != null) {
\r
306 if (temp._id == null) return false;
\r
307 if (this._id != temp._id) {
\r
308 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
\r
309 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
\r
310 if (thcycle!=tmcycle) {
\r
311 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
\r
312 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
\r
316 if (!this._id.equals(temp._id)) {
\r
317 org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
\r
318 org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
\r
321 org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
\r
322 org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
\r
325 } else if (temp._id != null)
\r
327 if (this._modifiable != null) {
\r
328 if (temp._modifiable == null) return false;
\r
329 if (this._modifiable != temp._modifiable) {
\r
330 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._modifiable);
\r
331 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._modifiable);
\r
332 if (thcycle!=tmcycle) {
\r
333 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable); };
\r
334 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable); };
\r
338 if (!this._modifiable.equals(temp._modifiable)) {
\r
339 org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
\r
340 org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
\r
343 org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
\r
344 org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
\r
347 } else if (temp._modifiable != null)
\r
349 if (this._group != null) {
\r
350 if (temp._group == null) return false;
\r
351 if (this._group != temp._group) {
\r
352 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._group);
\r
353 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._group);
\r
354 if (thcycle!=tmcycle) {
\r
355 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._group); };
\r
356 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._group); };
\r
360 if (!this._group.equals(temp._group)) {
\r
361 org.castor.util.CycleBreaker.releaseCycleHandle(this._group);
\r
362 org.castor.util.CycleBreaker.releaseCycleHandle(temp._group);
\r
365 org.castor.util.CycleBreaker.releaseCycleHandle(this._group);
\r
366 org.castor.util.CycleBreaker.releaseCycleHandle(temp._group);
\r
369 } else if (temp._group != null)
\r
371 if (this._type != null) {
\r
372 if (temp._type == null) return false;
\r
373 if (this._type != temp._type) {
\r
374 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._type);
\r
375 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._type);
\r
376 if (thcycle!=tmcycle) {
\r
377 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._type); };
\r
378 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._type); };
\r
382 if (!this._type.equals(temp._type)) {
\r
383 org.castor.util.CycleBreaker.releaseCycleHandle(this._type);
\r
384 org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);
\r
387 org.castor.util.CycleBreaker.releaseCycleHandle(this._type);
\r
388 org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);
\r
391 } else if (temp._type != null)
\r
393 if (this._label != null) {
\r
394 if (temp._label == null) return false;
\r
395 if (this._label != temp._label) {
\r
396 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._label);
\r
397 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._label);
\r
398 if (thcycle!=tmcycle) {
\r
399 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._label); };
\r
400 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._label); };
\r
404 if (!this._label.equals(temp._label)) {
\r
405 org.castor.util.CycleBreaker.releaseCycleHandle(this._label);
\r
406 org.castor.util.CycleBreaker.releaseCycleHandle(temp._label);
\r
409 org.castor.util.CycleBreaker.releaseCycleHandle(this._label);
\r
410 org.castor.util.CycleBreaker.releaseCycleHandle(temp._label);
\r
413 } else if (temp._label != null)
\r
415 if (this._description != null) {
\r
416 if (temp._description == null) return false;
\r
417 if (this._description != temp._description) {
\r
418 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._description);
\r
419 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._description);
\r
420 if (thcycle!=tmcycle) {
\r
421 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._description); };
\r
422 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._description); };
\r
426 if (!this._description.equals(temp._description)) {
\r
427 org.castor.util.CycleBreaker.releaseCycleHandle(this._description);
\r
428 org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);
\r
431 org.castor.util.CycleBreaker.releaseCycleHandle(this._description);
\r
432 org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);
\r
435 } else if (temp._description != null)
\r
437 if (this._status != null) {
\r
438 if (temp._status == null) return false;
\r
439 if (this._status != temp._status) {
\r
440 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._status);
\r
441 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._status);
\r
442 if (thcycle!=tmcycle) {
\r
443 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._status); };
\r
444 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._status); };
\r
448 if (!this._status.equals(temp._status)) {
\r
449 org.castor.util.CycleBreaker.releaseCycleHandle(this._status);
\r
450 org.castor.util.CycleBreaker.releaseCycleHandle(temp._status);
\r
453 org.castor.util.CycleBreaker.releaseCycleHandle(this._status);
\r
454 org.castor.util.CycleBreaker.releaseCycleHandle(temp._status);
\r
457 } else if (temp._status != null)
\r
459 if (this._annotationElementList != null) {
\r
460 if (temp._annotationElementList == null) return false;
\r
461 if (this._annotationElementList != temp._annotationElementList) {
\r
462 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._annotationElementList);
\r
463 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._annotationElementList);
\r
464 if (thcycle!=tmcycle) {
\r
465 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._annotationElementList); };
\r
466 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._annotationElementList); };
\r
470 if (!this._annotationElementList.equals(temp._annotationElementList)) {
\r
471 org.castor.util.CycleBreaker.releaseCycleHandle(this._annotationElementList);
\r
472 org.castor.util.CycleBreaker.releaseCycleHandle(temp._annotationElementList);
\r
475 org.castor.util.CycleBreaker.releaseCycleHandle(this._annotationElementList);
\r
476 org.castor.util.CycleBreaker.releaseCycleHandle(temp._annotationElementList);
\r
479 } else if (temp._annotationElementList != null)
\r
481 if (this._scoreList != null) {
\r
482 if (temp._scoreList == null) return false;
\r
483 if (this._scoreList != temp._scoreList) {
\r
484 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._scoreList);
\r
485 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._scoreList);
\r
486 if (thcycle!=tmcycle) {
\r
487 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._scoreList); };
\r
488 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._scoreList); };
\r
492 if (!this._scoreList.equals(temp._scoreList)) {
\r
493 org.castor.util.CycleBreaker.releaseCycleHandle(this._scoreList);
\r
494 org.castor.util.CycleBreaker.releaseCycleHandle(temp._scoreList);
\r
497 org.castor.util.CycleBreaker.releaseCycleHandle(this._scoreList);
\r
498 org.castor.util.CycleBreaker.releaseCycleHandle(temp._scoreList);
\r
501 } else if (temp._scoreList != null)
\r
503 if (this._linkList != null) {
\r
504 if (temp._linkList == null) return false;
\r
505 if (this._linkList != temp._linkList) {
\r
506 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._linkList);
\r
507 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._linkList);
\r
508 if (thcycle!=tmcycle) {
\r
509 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList); };
\r
510 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList); };
\r
514 if (!this._linkList.equals(temp._linkList)) {
\r
515 org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList);
\r
516 org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList);
\r
519 org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList);
\r
520 org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList);
\r
523 } else if (temp._linkList != null)
\r
525 if (this._propertyList != null) {
\r
526 if (temp._propertyList == null) return false;
\r
527 if (this._propertyList != temp._propertyList) {
\r
528 thcycle=org.castor.util.CycleBreaker.startingToCycle(this._propertyList);
\r
529 tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._propertyList);
\r
530 if (thcycle!=tmcycle) {
\r
531 if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList); };
\r
532 if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList); };
\r
536 if (!this._propertyList.equals(temp._propertyList)) {
\r
537 org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
\r
538 org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
\r
541 org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
\r
542 org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
\r
545 } else if (temp._propertyList != null)
\r
553 * Method getAnnotationElement.
\r
556 * @throws java.lang.IndexOutOfBoundsException if the index
\r
557 * given is outside the bounds of the collection
\r
558 * @return the value of the
\r
559 * uk.ac.vamsas.objects.core.AnnotationElement at the given inde
\r
561 public uk.ac.vamsas.objects.core.AnnotationElement getAnnotationElement(
\r
563 throws java.lang.IndexOutOfBoundsException {
\r
564 // check bounds for index
\r
565 if (index < 0 || index >= this._annotationElementList.size()) {
\r
566 throw new IndexOutOfBoundsException("getAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
\r
569 return (uk.ac.vamsas.objects.core.AnnotationElement) _annotationElementList.get(index);
\r
573 * Method getAnnotationElement.Returns the contents of the
\r
574 * collection in an Array. <p>Note: Just in case the
\r
575 * collection contents are changing in another thread, we pass
\r
576 * a 0-length Array of the correct type into the API call.
\r
577 * This way we <i>know</i> that the Array returned is of
\r
578 * exactly the correct length.
\r
580 * @return this collection as an Array
\r
582 public uk.ac.vamsas.objects.core.AnnotationElement[] getAnnotationElement(
\r
584 uk.ac.vamsas.objects.core.AnnotationElement[] array = new uk.ac.vamsas.objects.core.AnnotationElement[0];
\r
585 return (uk.ac.vamsas.objects.core.AnnotationElement[]) this._annotationElementList.toArray(array);
\r
589 * Method getAnnotationElementAsReference.Returns a reference
\r
590 * to '_annotationElementList'. No type checking is performed
\r
591 * on any modifications to the Vector.
\r
593 * @return a reference to the Vector backing this class
\r
595 public java.util.Vector getAnnotationElementAsReference(
\r
597 return this._annotationElementList;
\r
601 * Method getAnnotationElementCount.
\r
603 * @return the size of this collection
\r
605 public int getAnnotationElementCount(
\r
607 return this._annotationElementList.size();
\r
611 * Returns the value of field 'description'. The field
\r
612 * 'description' has the following description: Human readable
\r
613 * description of the annotation
\r
616 * @return the value of field 'Description'.
\r
618 public java.lang.String getDescription(
\r
620 return this._description;
\r
624 * Returns the value of field 'group'. The field 'group' has
\r
625 * the following description: Annotation with the same
\r
626 * non-empty group name are grouped
\r
629 * @return the value of field 'Group'.
\r
631 public java.lang.String getGroup(
\r
633 return this._group;
\r
637 * Returns the value of field 'id'. The field 'id' has the
\r
638 * following description: Primary Key for vamsas object
\r
642 * @return the value of field 'Id'.
\r
644 public java.lang.String getId(
\r
650 * Returns the value of field 'label'. The field 'label' has
\r
651 * the following description: Short, meaningful name for the
\r
652 * annotation - if this
\r
653 * is absent, then the type string should be used in its
\r
657 * @return the value of field 'Label'.
\r
659 public java.lang.String getLabel(
\r
661 return this._label;
\r
668 * @throws java.lang.IndexOutOfBoundsException if the index
\r
669 * given is outside the bounds of the collection
\r
670 * @return the value of the uk.ac.vamsas.objects.core.Link at
\r
673 public uk.ac.vamsas.objects.core.Link getLink(
\r
675 throws java.lang.IndexOutOfBoundsException {
\r
676 // check bounds for index
\r
677 if (index < 0 || index >= this._linkList.size()) {
\r
678 throw new IndexOutOfBoundsException("getLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");
\r
681 return (uk.ac.vamsas.objects.core.Link) _linkList.get(index);
\r
685 * Method getLink.Returns the contents of the collection in an
\r
686 * Array. <p>Note: Just in case the collection contents are
\r
687 * changing in another thread, we pass a 0-length Array of the
\r
688 * correct type into the API call. This way we <i>know</i>
\r
689 * that the Array returned is of exactly the correct length.
\r
691 * @return this collection as an Array
\r
693 public uk.ac.vamsas.objects.core.Link[] getLink(
\r
695 uk.ac.vamsas.objects.core.Link[] array = new uk.ac.vamsas.objects.core.Link[0];
\r
696 return (uk.ac.vamsas.objects.core.Link[]) this._linkList.toArray(array);
\r
700 * Method getLinkAsReference.Returns a reference to
\r
701 * '_linkList'. No type checking is performed on any
\r
702 * modifications to the Vector.
\r
704 * @return a reference to the Vector backing this class
\r
706 public java.util.Vector getLinkAsReference(
\r
708 return this._linkList;
\r
712 * Method getLinkCount.
\r
714 * @return the size of this collection
\r
716 public int getLinkCount(
\r
718 return this._linkList.size();
\r
722 * Returns the value of field 'modifiable'.
\r
724 * @return the value of field 'Modifiable'.
\r
726 public java.lang.String getModifiable(
\r
728 return this._modifiable;
\r
732 * Method getProperty.
\r
735 * @throws java.lang.IndexOutOfBoundsException if the index
\r
736 * given is outside the bounds of the collection
\r
737 * @return the value of the uk.ac.vamsas.objects.core.Property
\r
738 * at the given index
\r
740 public uk.ac.vamsas.objects.core.Property getProperty(
\r
742 throws java.lang.IndexOutOfBoundsException {
\r
743 // check bounds for index
\r
744 if (index < 0 || index >= this._propertyList.size()) {
\r
745 throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
\r
748 return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);
\r
752 * Method getProperty.Returns the contents of the collection in
\r
753 * an Array. <p>Note: Just in case the collection contents
\r
754 * are changing in another thread, we pass a 0-length Array of
\r
755 * the correct type into the API call. This way we <i>know</i>
\r
756 * that the Array returned is of exactly the correct length.
\r
758 * @return this collection as an Array
\r
760 public uk.ac.vamsas.objects.core.Property[] getProperty(
\r
762 uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];
\r
763 return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);
\r
767 * Method getPropertyAsReference.Returns a reference to
\r
768 * '_propertyList'. No type checking is performed on any
\r
769 * modifications to the Vector.
\r
771 * @return a reference to the Vector backing this class
\r
773 public java.util.Vector getPropertyAsReference(
\r
775 return this._propertyList;
\r
779 * Method getPropertyCount.
\r
781 * @return the size of this collection
\r
783 public int getPropertyCount(
\r
785 return this._propertyList.size();
\r
792 * @throws java.lang.IndexOutOfBoundsException if the index
\r
793 * given is outside the bounds of the collection
\r
794 * @return the value of the uk.ac.vamsas.objects.core.Score at
\r
797 public uk.ac.vamsas.objects.core.Score getScore(
\r
799 throws java.lang.IndexOutOfBoundsException {
\r
800 // check bounds for index
\r
801 if (index < 0 || index >= this._scoreList.size()) {
\r
802 throw new IndexOutOfBoundsException("getScore: Index value '" + index + "' not in range [0.." + (this._scoreList.size() - 1) + "]");
\r
805 return (uk.ac.vamsas.objects.core.Score) _scoreList.get(index);
\r
809 * Method getScore.Returns the contents of the collection in an
\r
810 * Array. <p>Note: Just in case the collection contents are
\r
811 * changing in another thread, we pass a 0-length Array of the
\r
812 * correct type into the API call. This way we <i>know</i>
\r
813 * that the Array returned is of exactly the correct length.
\r
815 * @return this collection as an Array
\r
817 public uk.ac.vamsas.objects.core.Score[] getScore(
\r
819 uk.ac.vamsas.objects.core.Score[] array = new uk.ac.vamsas.objects.core.Score[0];
\r
820 return (uk.ac.vamsas.objects.core.Score[]) this._scoreList.toArray(array);
\r
824 * Method getScoreAsReference.Returns a reference to
\r
825 * '_scoreList'. No type checking is performed on any
\r
826 * modifications to the Vector.
\r
828 * @return a reference to the Vector backing this class
\r
830 public java.util.Vector getScoreAsReference(
\r
832 return this._scoreList;
\r
836 * Method getScoreCount.
\r
838 * @return the size of this collection
\r
840 public int getScoreCount(
\r
842 return this._scoreList.size();
\r
846 * Returns the value of field 'status'. The field 'status' has
\r
847 * the following description: TODO: specify this - we have
\r
848 * considered taking the GO
\r
849 * evidence codes as a model for assessing a measure of
\r
853 * @return the value of field 'Status'.
\r
855 public java.lang.String getStatus(
\r
857 return this._status;
\r
861 * Returns the value of field 'type'. The field 'type' has the
\r
862 * following description: A Das Feature has both a type and a
\r
863 * Type ID. We go the
\r
864 * route of requiring the type string to be taken from a
\r
866 * vocabulary if an application expects others to make sense
\r
868 * type may qualified - so uniprot:CHAIN is a valid type name,
\r
870 * considered distinct from someotherDB:CHAIN
\r
872 * @return the value of field 'Type'.
\r
874 public java.lang.String getType(
\r
880 * Overrides the java.lang.Object.hashCode method.
\r
882 * The following steps came from <b>Effective Java Programming
\r
883 * Language Guide</b> by Joshua Bloch, Chapter 3
\r
885 * @return a hash code value for the object.
\r
887 public int hashCode(
\r
889 int result = super.hashCode();
\r
893 && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
\r
894 result = 37 * result + _id.hashCode();
\r
895 org.castor.util.CycleBreaker.releaseCycleHandle(_id);
\r
897 if (_modifiable != null
\r
898 && !org.castor.util.CycleBreaker.startingToCycle(_modifiable)) {
\r
899 result = 37 * result + _modifiable.hashCode();
\r
900 org.castor.util.CycleBreaker.releaseCycleHandle(_modifiable);
\r
903 && !org.castor.util.CycleBreaker.startingToCycle(_group)) {
\r
904 result = 37 * result + _group.hashCode();
\r
905 org.castor.util.CycleBreaker.releaseCycleHandle(_group);
\r
908 && !org.castor.util.CycleBreaker.startingToCycle(_type)) {
\r
909 result = 37 * result + _type.hashCode();
\r
910 org.castor.util.CycleBreaker.releaseCycleHandle(_type);
\r
913 && !org.castor.util.CycleBreaker.startingToCycle(_label)) {
\r
914 result = 37 * result + _label.hashCode();
\r
915 org.castor.util.CycleBreaker.releaseCycleHandle(_label);
\r
917 if (_description != null
\r
918 && !org.castor.util.CycleBreaker.startingToCycle(_description)) {
\r
919 result = 37 * result + _description.hashCode();
\r
920 org.castor.util.CycleBreaker.releaseCycleHandle(_description);
\r
922 if (_status != null
\r
923 && !org.castor.util.CycleBreaker.startingToCycle(_status)) {
\r
924 result = 37 * result + _status.hashCode();
\r
925 org.castor.util.CycleBreaker.releaseCycleHandle(_status);
\r
927 if (_annotationElementList != null
\r
928 && !org.castor.util.CycleBreaker.startingToCycle(_annotationElementList)) {
\r
929 result = 37 * result + _annotationElementList.hashCode();
\r
930 org.castor.util.CycleBreaker.releaseCycleHandle(_annotationElementList);
\r
932 if (_scoreList != null
\r
933 && !org.castor.util.CycleBreaker.startingToCycle(_scoreList)) {
\r
934 result = 37 * result + _scoreList.hashCode();
\r
935 org.castor.util.CycleBreaker.releaseCycleHandle(_scoreList);
\r
937 if (_linkList != null
\r
938 && !org.castor.util.CycleBreaker.startingToCycle(_linkList)) {
\r
939 result = 37 * result + _linkList.hashCode();
\r
940 org.castor.util.CycleBreaker.releaseCycleHandle(_linkList);
\r
942 if (_propertyList != null
\r
943 && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {
\r
944 result = 37 * result + _propertyList.hashCode();
\r
945 org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);
\r
954 * @return true if this object is valid according to the schema
\r
956 public boolean isValid(
\r
960 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
970 * @throws org.exolab.castor.xml.MarshalException if object is
\r
971 * null or if any SAXException is thrown during marshaling
\r
972 * @throws org.exolab.castor.xml.ValidationException if this
\r
973 * object is an invalid instance according to the schema
\r
975 public void marshal(
\r
976 final java.io.Writer out)
\r
977 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
978 Marshaller.marshal(this, out);
\r
985 * @throws java.io.IOException if an IOException occurs during
\r
987 * @throws org.exolab.castor.xml.ValidationException if this
\r
988 * object is an invalid instance according to the schema
\r
989 * @throws org.exolab.castor.xml.MarshalException if object is
\r
990 * null or if any SAXException is thrown during marshaling
\r
992 public void marshal(
\r
993 final org.xml.sax.ContentHandler handler)
\r
994 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
995 Marshaller.marshal(this, handler);
\r
1000 public void removeAllAnnotationElement(
\r
1002 this._annotationElementList.clear();
\r
1007 public void removeAllLink(
\r
1009 this._linkList.clear();
\r
1014 public void removeAllProperty(
\r
1016 this._propertyList.clear();
\r
1021 public void removeAllScore(
\r
1023 this._scoreList.clear();
\r
1027 * Method removeAnnotationElement.
\r
1029 * @param vAnnotationElement
\r
1030 * @return true if the object was removed from the collection.
\r
1032 public boolean removeAnnotationElement(
\r
1033 final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement) {
\r
1034 boolean removed = _annotationElementList.remove(vAnnotationElement);
\r
1039 * Method removeAnnotationElementAt.
\r
1042 * @return the element removed from the collection
\r
1044 public uk.ac.vamsas.objects.core.AnnotationElement removeAnnotationElementAt(
\r
1045 final int index) {
\r
1046 java.lang.Object obj = this._annotationElementList.remove(index);
\r
1047 return (uk.ac.vamsas.objects.core.AnnotationElement) obj;
\r
1051 * Method removeLink.
\r
1054 * @return true if the object was removed from the collection.
\r
1056 public boolean removeLink(
\r
1057 final uk.ac.vamsas.objects.core.Link vLink) {
\r
1058 boolean removed = _linkList.remove(vLink);
\r
1063 * Method removeLinkAt.
\r
1066 * @return the element removed from the collection
\r
1068 public uk.ac.vamsas.objects.core.Link removeLinkAt(
\r
1069 final int index) {
\r
1070 java.lang.Object obj = this._linkList.remove(index);
\r
1071 return (uk.ac.vamsas.objects.core.Link) obj;
\r
1075 * Method removeProperty.
\r
1077 * @param vProperty
\r
1078 * @return true if the object was removed from the collection.
\r
1080 public boolean removeProperty(
\r
1081 final uk.ac.vamsas.objects.core.Property vProperty) {
\r
1082 boolean removed = _propertyList.remove(vProperty);
\r
1087 * Method removePropertyAt.
\r
1090 * @return the element removed from the collection
\r
1092 public uk.ac.vamsas.objects.core.Property removePropertyAt(
\r
1093 final int index) {
\r
1094 java.lang.Object obj = this._propertyList.remove(index);
\r
1095 return (uk.ac.vamsas.objects.core.Property) obj;
\r
1099 * Method removeScore.
\r
1102 * @return true if the object was removed from the collection.
\r
1104 public boolean removeScore(
\r
1105 final uk.ac.vamsas.objects.core.Score vScore) {
\r
1106 boolean removed = _scoreList.remove(vScore);
\r
1111 * Method removeScoreAt.
\r
1114 * @return the element removed from the collection
\r
1116 public uk.ac.vamsas.objects.core.Score removeScoreAt(
\r
1117 final int index) {
\r
1118 java.lang.Object obj = this._scoreList.remove(index);
\r
1119 return (uk.ac.vamsas.objects.core.Score) obj;
\r
1126 * @param vAnnotationElement
\r
1127 * @throws java.lang.IndexOutOfBoundsException if the index
\r
1128 * given is outside the bounds of the collection
\r
1130 public void setAnnotationElement(
\r
1132 final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)
\r
1133 throws java.lang.IndexOutOfBoundsException {
\r
1134 // check bounds for index
\r
1135 if (index < 0 || index >= this._annotationElementList.size()) {
\r
1136 throw new IndexOutOfBoundsException("setAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
\r
1139 this._annotationElementList.set(index, vAnnotationElement);
\r
1145 * @param vAnnotationElementArray
\r
1147 public void setAnnotationElement(
\r
1148 final uk.ac.vamsas.objects.core.AnnotationElement[] vAnnotationElementArray) {
\r
1150 _annotationElementList.clear();
\r
1152 for (int i = 0; i < vAnnotationElementArray.length; i++) {
\r
1153 this._annotationElementList.add(vAnnotationElementArray[i]);
\r
1158 * Sets the value of '_annotationElementList' by copying the
\r
1159 * given Vector. All elements will be checked for type safety.
\r
1161 * @param vAnnotationElementList the Vector to copy.
\r
1163 public void setAnnotationElement(
\r
1164 final java.util.Vector vAnnotationElementList) {
\r
1166 this._annotationElementList.clear();
\r
1168 this._annotationElementList.addAll(vAnnotationElementList);
\r
1172 * Sets the value of '_annotationElementList' by setting it to
\r
1173 * the given Vector. No type checking is performed.
\r
1176 * @param annotationElementVector the Vector to set.
\r
1178 public void setAnnotationElementAsReference(
\r
1179 final java.util.Vector annotationElementVector) {
\r
1180 this._annotationElementList = annotationElementVector;
\r
1184 * Sets the value of field 'description'. The field
\r
1185 * 'description' has the following description: Human readable
\r
1186 * description of the annotation
\r
1189 * @param description the value of field 'description'.
\r
1191 public void setDescription(
\r
1192 final java.lang.String description) {
\r
1193 this._description = description;
\r
1197 * Sets the value of field 'group'. The field 'group' has the
\r
1198 * following description: Annotation with the same non-empty
\r
1199 * group name are grouped
\r
1202 * @param group the value of field 'group'.
\r
1204 public void setGroup(
\r
1205 final java.lang.String group) {
\r
1206 this._group = group;
\r
1210 * Sets the value of field 'id'. The field 'id' has the
\r
1211 * following description: Primary Key for vamsas object
\r
1215 * @param id the value of field 'id'.
\r
1217 public void setId(
\r
1218 final java.lang.String id) {
\r
1223 * Sets the value of field 'label'. The field 'label' has the
\r
1224 * following description: Short, meaningful name for the
\r
1225 * annotation - if this
\r
1226 * is absent, then the type string should be used in its
\r
1230 * @param label the value of field 'label'.
\r
1232 public void setLabel(
\r
1233 final java.lang.String label) {
\r
1234 this._label = label;
\r
1242 * @throws java.lang.IndexOutOfBoundsException if the index
\r
1243 * given is outside the bounds of the collection
\r
1245 public void setLink(
\r
1247 final uk.ac.vamsas.objects.core.Link vLink)
\r
1248 throws java.lang.IndexOutOfBoundsException {
\r
1249 // check bounds for index
\r
1250 if (index < 0 || index >= this._linkList.size()) {
\r
1251 throw new IndexOutOfBoundsException("setLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");
\r
1254 this._linkList.set(index, vLink);
\r
1260 * @param vLinkArray
\r
1262 public void setLink(
\r
1263 final uk.ac.vamsas.objects.core.Link[] vLinkArray) {
\r
1265 _linkList.clear();
\r
1267 for (int i = 0; i < vLinkArray.length; i++) {
\r
1268 this._linkList.add(vLinkArray[i]);
\r
1273 * Sets the value of '_linkList' by copying the given Vector.
\r
1274 * All elements will be checked for type safety.
\r
1276 * @param vLinkList the Vector to copy.
\r
1278 public void setLink(
\r
1279 final java.util.Vector vLinkList) {
\r
1281 this._linkList.clear();
\r
1283 this._linkList.addAll(vLinkList);
\r
1287 * Sets the value of '_linkList' by setting it to the given
\r
1288 * Vector. No type checking is performed.
\r
1291 * @param linkVector the Vector to set.
\r
1293 public void setLinkAsReference(
\r
1294 final java.util.Vector linkVector) {
\r
1295 this._linkList = linkVector;
\r
1299 * Sets the value of field 'modifiable'.
\r
1301 * @param modifiable the value of field 'modifiable'.
\r
1303 public void setModifiable(
\r
1304 final java.lang.String modifiable) {
\r
1305 this._modifiable = modifiable;
\r
1312 * @param vProperty
\r
1313 * @throws java.lang.IndexOutOfBoundsException if the index
\r
1314 * given is outside the bounds of the collection
\r
1316 public void setProperty(
\r
1318 final uk.ac.vamsas.objects.core.Property vProperty)
\r
1319 throws java.lang.IndexOutOfBoundsException {
\r
1320 // check bounds for index
\r
1321 if (index < 0 || index >= this._propertyList.size()) {
\r
1322 throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
\r
1325 this._propertyList.set(index, vProperty);
\r
1331 * @param vPropertyArray
\r
1333 public void setProperty(
\r
1334 final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {
\r
1336 _propertyList.clear();
\r
1338 for (int i = 0; i < vPropertyArray.length; i++) {
\r
1339 this._propertyList.add(vPropertyArray[i]);
\r
1344 * Sets the value of '_propertyList' by copying the given
\r
1345 * Vector. All elements will be checked for type safety.
\r
1347 * @param vPropertyList the Vector to copy.
\r
1349 public void setProperty(
\r
1350 final java.util.Vector vPropertyList) {
\r
1352 this._propertyList.clear();
\r
1354 this._propertyList.addAll(vPropertyList);
\r
1358 * Sets the value of '_propertyList' by setting it to the given
\r
1359 * Vector. No type checking is performed.
\r
1362 * @param propertyVector the Vector to set.
\r
1364 public void setPropertyAsReference(
\r
1365 final java.util.Vector propertyVector) {
\r
1366 this._propertyList = propertyVector;
\r
1374 * @throws java.lang.IndexOutOfBoundsException if the index
\r
1375 * given is outside the bounds of the collection
\r
1377 public void setScore(
\r
1379 final uk.ac.vamsas.objects.core.Score vScore)
\r
1380 throws java.lang.IndexOutOfBoundsException {
\r
1381 // check bounds for index
\r
1382 if (index < 0 || index >= this._scoreList.size()) {
\r
1383 throw new IndexOutOfBoundsException("setScore: Index value '" + index + "' not in range [0.." + (this._scoreList.size() - 1) + "]");
\r
1386 this._scoreList.set(index, vScore);
\r
1392 * @param vScoreArray
\r
1394 public void setScore(
\r
1395 final uk.ac.vamsas.objects.core.Score[] vScoreArray) {
\r
1397 _scoreList.clear();
\r
1399 for (int i = 0; i < vScoreArray.length; i++) {
\r
1400 this._scoreList.add(vScoreArray[i]);
\r
1405 * Sets the value of '_scoreList' by copying the given Vector.
\r
1406 * All elements will be checked for type safety.
\r
1408 * @param vScoreList the Vector to copy.
\r
1410 public void setScore(
\r
1411 final java.util.Vector vScoreList) {
\r
1413 this._scoreList.clear();
\r
1415 this._scoreList.addAll(vScoreList);
\r
1419 * Sets the value of '_scoreList' by setting it to the given
\r
1420 * Vector. No type checking is performed.
\r
1423 * @param scoreVector the Vector to set.
\r
1425 public void setScoreAsReference(
\r
1426 final java.util.Vector scoreVector) {
\r
1427 this._scoreList = scoreVector;
\r
1431 * Sets the value of field 'status'. The field 'status' has the
\r
1432 * following description: TODO: specify this - we have
\r
1433 * considered taking the GO
\r
1434 * evidence codes as a model for assessing a measure of
\r
1438 * @param status the value of field 'status'.
\r
1440 public void setStatus(
\r
1441 final java.lang.String status) {
\r
1442 this._status = status;
\r
1446 * Sets the value of field 'type'. The field 'type' has the
\r
1447 * following description: A Das Feature has both a type and a
\r
1448 * Type ID. We go the
\r
1449 * route of requiring the type string to be taken from a
\r
1451 * vocabulary if an application expects others to make sense
\r
1453 * type may qualified - so uniprot:CHAIN is a valid type name,
\r
1455 * considered distinct from someotherDB:CHAIN
\r
1457 * @param type the value of field 'type'.
\r
1459 public void setType(
\r
1460 final java.lang.String type) {
\r
1461 this._type = type;
\r
1465 * Method unmarshal.
\r
1468 * @throws org.exolab.castor.xml.MarshalException if object is
\r
1469 * null or if any SAXException is thrown during marshaling
\r
1470 * @throws org.exolab.castor.xml.ValidationException if this
\r
1471 * object is an invalid instance according to the schema
\r
1472 * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType
\r
1474 public static uk.ac.vamsas.objects.core.RangeType unmarshal(
\r
1475 final java.io.Reader reader)
\r
1476 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
1477 return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.RangeAnnotation.class, reader);
\r
1483 * @throws org.exolab.castor.xml.ValidationException if this
\r
1484 * object is an invalid instance according to the schema
\r
1486 public void validate(
\r
1488 throws org.exolab.castor.xml.ValidationException {
\r
1489 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
1490 validator.validate(this);
\r