org.LexGrid.REST.versions
Class Revision

java.lang.Object
  extended by org.mayo.edu.lgModel.LexGridBase
      extended by org.LexGrid.commonTypes.Describable
          extended by org.LexGrid.REST.versions.Revision
All Implemented Interfaces:
java.io.Serializable

public class Revision
extends Describable
implements java.io.Serializable

An ordered collection of state changes that define the transformation of a set of resources from one consistent state to another.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
Revision()
           
 
Method Summary
 void addChangeAgent(int index, Source vChangeAgent)
           
 void addChangeAgent(Source vChangeAgent)
           
 void addChangedEntry(ChangedEntry vChangedEntry)
           
 void addChangedEntry(int index, ChangedEntry vChangedEntry)
           
 java.util.Enumeration<? extends Source> enumerateChangeAgent()
          Method enumerateChangeAgent.
 java.util.Enumeration<? extends ChangedEntry> enumerateChangedEntry()
          Method enumerateChangedEntry.
 Source[] getChangeAgent()
          Method getChangeAgent.Returns the contents of the collection in an Array.
 Source getChangeAgent(int index)
          Method getChangeAgent.
 java.util.List<Source> getChangeAgentAsReference()
          Method getChangeAgentAsReference.Returns a reference to '_changeAgentList'.
 int getChangeAgentCount()
          Method getChangeAgentCount.
 ChangedEntry[] getChangedEntry()
          Method getChangedEntry.Returns the contents of the collection in an Array.
 ChangedEntry getChangedEntry(int index)
          Method getChangedEntry.
 java.util.List<ChangedEntry> getChangedEntryAsReference()
          Method getChangedEntryAsReference.Returns a reference to '_changedEntryList'.
 int getChangedEntryCount()
          Method getChangedEntryCount.
 Text getChangeInstructions()
          Returns the value of field 'changeInstructions'.
 java.lang.Long getEditOrder()
          Returns the value of field 'editOrder'.
 java.util.Date getRevisionDate()
          Returns the value of field 'revisionDate'.
 RevisionId getRevisionId()
          Returns the value of field 'revisionId'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends Source> iterateChangeAgent()
          Method iterateChangeAgent.
 java.util.Iterator<? extends ChangedEntry> iterateChangedEntry()
          Method iterateChangedEntry.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllChangeAgent()
           
 void removeAllChangedEntry()
           
 boolean removeChangeAgent(Source vChangeAgent)
          Method removeChangeAgent.
 Source removeChangeAgentAt(int index)
          Method removeChangeAgentAt.
 boolean removeChangedEntry(ChangedEntry vChangedEntry)
          Method removeChangedEntry.
 ChangedEntry removeChangedEntryAt(int index)
          Method removeChangedEntryAt.
 void setChangeAgent(int index, Source vChangeAgent)
           
 void setChangeAgent(java.util.List<Source> vChangeAgentList)
          Sets the value of '_changeAgentList' by copying the given Vector.
 void setChangeAgent(Source[] vChangeAgentArray)
           
 void setChangeAgentAsReference(java.util.List<Source> changeAgentList)
          Deprecated.  
 void setChangedEntry(ChangedEntry[] vChangedEntryArray)
           
 void setChangedEntry(int index, ChangedEntry vChangedEntry)
           
 void setChangedEntry(java.util.List<ChangedEntry> vChangedEntryList)
          Sets the value of '_changedEntryList' by copying the given Vector.
 void setChangedEntryAsReference(java.util.List<ChangedEntry> changedEntryList)
          Deprecated.  
 void setChangeInstructions(Text changeInstructions)
          Sets the value of field 'changeInstructions'.
 void setEditOrder(java.lang.Long editOrder)
          Sets the value of field 'editOrder'.
 void setRevisionDate(java.util.Date revisionDate)
          Sets the value of field 'revisionDate'.
 void setRevisionId(RevisionId revisionId)
          Sets the value of field 'revisionId'.
static Revision unmarshalRevision(java.io.Reader reader)
          Method unmarshalRevision.
 void validate()
           
 
Methods inherited from class org.LexGrid.commonTypes.Describable
getEntityDescription, setEntityDescription, unmarshalDescribable
 
Methods inherited from class org.mayo.edu.lgModel.LexGridBase
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Revision

public Revision()
Method Detail

addChangeAgent

public void addChangeAgent(Source vChangeAgent)
                    throws java.lang.IndexOutOfBoundsException
Parameters:
vChangeAgent -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addChangeAgent

public void addChangeAgent(int index,
                           Source vChangeAgent)
                    throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vChangeAgent -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addChangedEntry

public void addChangedEntry(ChangedEntry vChangedEntry)
                     throws java.lang.IndexOutOfBoundsException
Parameters:
vChangedEntry -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addChangedEntry

public void addChangedEntry(int index,
                            ChangedEntry vChangedEntry)
                     throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vChangedEntry -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateChangeAgent

public java.util.Enumeration<? extends Source> enumerateChangeAgent()
Method enumerateChangeAgent.

Returns:
an Enumeration over all possible elements of this collection

enumerateChangedEntry

public java.util.Enumeration<? extends ChangedEntry> enumerateChangedEntry()
Method enumerateChangedEntry.

Returns:
an Enumeration over all possible elements of this collection

getChangeAgent

public Source getChangeAgent(int index)
                      throws java.lang.IndexOutOfBoundsException
Method getChangeAgent.

Parameters:
index -
Returns:
the value of the org.LexGrid.REST.commonTypes.Source at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getChangeAgent

public Source[] getChangeAgent()
Method getChangeAgent.Returns the contents of the collection in an Array.

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 know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getChangeAgentAsReference

public java.util.List<Source> getChangeAgentAsReference()
Method getChangeAgentAsReference.Returns a reference to '_changeAgentList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getChangeAgentCount

public int getChangeAgentCount()
Method getChangeAgentCount.

Returns:
the size of this collection

getChangeInstructions

public Text getChangeInstructions()
Returns the value of field 'changeInstructions'. The field 'changeInstructions' has the following description: A human or machine readable set of instructions on how to apply this change

Returns:
the value of field 'ChangeInstructions'.

getChangedEntry

public ChangedEntry getChangedEntry(int index)
                             throws java.lang.IndexOutOfBoundsException
Method getChangedEntry.

Parameters:
index -
Returns:
the value of the org.LexGrid.REST.versions.ChangedEntry at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getChangedEntry

public ChangedEntry[] getChangedEntry()
Method getChangedEntry.Returns the contents of the collection in an Array.

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 know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getChangedEntryAsReference

public java.util.List<ChangedEntry> getChangedEntryAsReference()
Method getChangedEntryAsReference.Returns a reference to '_changedEntryList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getChangedEntryCount

public int getChangedEntryCount()
Method getChangedEntryCount.

Returns:
the size of this collection

getEditOrder

public java.lang.Long getEditOrder()
Returns the value of field 'editOrder'. The field 'editOrder' has the following description: The relative order that this revision is to be applied if in a systemRelease.

Returns:
the value of field 'EditOrder'.

getRevisionDate

public java.util.Date getRevisionDate()
Returns the value of field 'revisionDate'. The field 'revisionDate' has the following description: The end date for which this version is operative (considered commited).

Returns:
the value of field 'RevisionDate'.

getRevisionId

public RevisionId getRevisionId()
Returns the value of field 'revisionId'. The field 'revisionId' has the following description: The unique identifier of this revision.

Returns:
the value of field 'RevisionId'.

isValid

public boolean isValid()
Method isValid.

Overrides:
isValid in class Describable
Returns:
true if this object is valid according to the schema

iterateChangeAgent

public java.util.Iterator<? extends Source> iterateChangeAgent()
Method iterateChangeAgent.

Returns:
an Iterator over all possible elements in this collection

iterateChangedEntry

public java.util.Iterator<? extends ChangedEntry> iterateChangedEntry()
Method iterateChangedEntry.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Overrides:
marshal in class Describable
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Overrides:
marshal in class Describable
Parameters:
handler -
Throws:
java.io.IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllChangeAgent

public void removeAllChangeAgent()

removeAllChangedEntry

public void removeAllChangedEntry()

removeChangeAgent

public boolean removeChangeAgent(Source vChangeAgent)
Method removeChangeAgent.

Parameters:
vChangeAgent -
Returns:
true if the object was removed from the collection.

removeChangeAgentAt

public Source removeChangeAgentAt(int index)
Method removeChangeAgentAt.

Parameters:
index -
Returns:
the element removed from the collection

removeChangedEntry

public boolean removeChangedEntry(ChangedEntry vChangedEntry)
Method removeChangedEntry.

Parameters:
vChangedEntry -
Returns:
true if the object was removed from the collection.

removeChangedEntryAt

public ChangedEntry removeChangedEntryAt(int index)
Method removeChangedEntryAt.

Parameters:
index -
Returns:
the element removed from the collection

setChangeAgent

public void setChangeAgent(int index,
                           Source vChangeAgent)
                    throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vChangeAgent -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setChangeAgent

public void setChangeAgent(Source[] vChangeAgentArray)
Parameters:
vChangeAgentArray -

setChangeAgent

public void setChangeAgent(java.util.List<Source> vChangeAgentList)
Sets the value of '_changeAgentList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vChangeAgentList - the Vector to copy.

setChangeAgentAsReference

public void setChangeAgentAsReference(java.util.List<Source> changeAgentList)
Deprecated. 

Sets the value of '_changeAgentList' by setting it to the given Vector. No type checking is performed.

Parameters:
changeAgentList - the Vector to set.

setChangeInstructions

public void setChangeInstructions(Text changeInstructions)
Sets the value of field 'changeInstructions'. The field 'changeInstructions' has the following description: A human or machine readable set of instructions on how to apply this change

Parameters:
changeInstructions - the value of field 'changeInstructions'.

setChangedEntry

public void setChangedEntry(int index,
                            ChangedEntry vChangedEntry)
                     throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vChangedEntry -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setChangedEntry

public void setChangedEntry(ChangedEntry[] vChangedEntryArray)
Parameters:
vChangedEntryArray -

setChangedEntry

public void setChangedEntry(java.util.List<ChangedEntry> vChangedEntryList)
Sets the value of '_changedEntryList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vChangedEntryList - the Vector to copy.

setChangedEntryAsReference

public void setChangedEntryAsReference(java.util.List<ChangedEntry> changedEntryList)
Deprecated. 

Sets the value of '_changedEntryList' by setting it to the given Vector. No type checking is performed.

Parameters:
changedEntryList - the Vector to set.

setEditOrder

public void setEditOrder(java.lang.Long editOrder)
Sets the value of field 'editOrder'. The field 'editOrder' has the following description: The relative order that this revision is to be applied if in a systemRelease.

Parameters:
editOrder - the value of field 'editOrder'.

setRevisionDate

public void setRevisionDate(java.util.Date revisionDate)
Sets the value of field 'revisionDate'. The field 'revisionDate' has the following description: The end date for which this version is operative (considered commited).

Parameters:
revisionDate - the value of field 'revisionDate'.

setRevisionId

public void setRevisionId(RevisionId revisionId)
Sets the value of field 'revisionId'. The field 'revisionId' has the following description: The unique identifier of this revision.

Parameters:
revisionId - the value of field 'revisionId'.

unmarshalRevision

public static Revision unmarshalRevision(java.io.Reader reader)
                                  throws org.exolab.castor.xml.MarshalException,
                                         org.exolab.castor.xml.ValidationException
Method unmarshalRevision.

Parameters:
reader -
Returns:
the unmarshaled org.LexGrid.REST.versions.Revision
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Overrides:
validate in class Describable
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.