org.LexGrid.REST.commonTypes
Class Source

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

public class Source
extends LexGridBase
implements java.io.Serializable

The local identifier of a person, organization of bibliographic resource that played a role in the creation or maintenance of a resource.

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

Constructor Summary
Source()
           
 
Method Summary
 void addRole(int index, SourceRole vRole)
           
 void addRole(SourceRole vRole)
           
 java.util.Enumeration<? extends SourceRole> enumerateRole()
          Method enumerateRole.
 SourceRole[] getRole()
          Method getRole.Returns the contents of the collection in an Array.
 SourceRole getRole(int index)
          Method getRole.
 java.util.List<SourceRole> getRoleAsReference()
          Method getRoleAsReference.Returns a reference to '_roleList'.
 int getRoleCount()
          Method getRoleCount.
 TsLocalId getSource()
          Returns the value of field 'source'.
 java.lang.String getSubRef()
          Returns the value of field 'subRef'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<? extends SourceRole> iterateRole()
          Method iterateRole.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllRole()
           
 boolean removeRole(SourceRole vRole)
          Method removeRole.
 SourceRole removeRoleAt(int index)
          Method removeRoleAt.
 void setRole(int index, SourceRole vRole)
           
 void setRole(java.util.List<SourceRole> vRoleList)
          Sets the value of '_roleList' by copying the given Vector.
 void setRole(SourceRole[] vRoleArray)
           
 void setRoleAsReference(java.util.List<SourceRole> roleList)
          Deprecated.  
 void setSource(TsLocalId source)
          Sets the value of field 'source'.
 void setSubRef(java.lang.String subRef)
          Sets the value of field 'subRef'.
static Source unmarshalSource(java.io.Reader reader)
          Method unmarshalSource.
 void validate()
           
 
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

Source

public Source()
Method Detail

addRole

public void addRole(SourceRole vRole)
             throws java.lang.IndexOutOfBoundsException
Parameters:
vRole -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addRole

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

enumerateRole

public java.util.Enumeration<? extends SourceRole> enumerateRole()
Method enumerateRole.

Returns:
an Enumeration over all possible elements of this collection

getRole

public SourceRole getRole(int index)
                   throws java.lang.IndexOutOfBoundsException
Method getRole.

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

getRole

public SourceRole[] getRole()
Method getRole.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

getRoleAsReference

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

Returns:
a reference to the Vector backing this class

getRoleCount

public int getRoleCount()
Method getRoleCount.

Returns:
the size of this collection

getSource

public TsLocalId getSource()
Returns the value of field 'source'.

Returns:
the value of field 'Source'.

getSubRef

public java.lang.String getSubRef()
Returns the value of field 'subRef'. The field 'subRef' has the following description: The page, subheading, id or other localized information within the source itself. Used to make a source reference more precise. Must be absent in supportedSource.

Returns:
the value of field 'SubRef'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateRole

public java.util.Iterator<? extends SourceRole> iterateRole()
Method iterateRole.

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
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
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

removeAllRole

public void removeAllRole()

removeRole

public boolean removeRole(SourceRole vRole)
Method removeRole.

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

removeRoleAt

public SourceRole removeRoleAt(int index)
Method removeRoleAt.

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

setRole

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

setRole

public void setRole(SourceRole[] vRoleArray)
Parameters:
vRoleArray -

setRole

public void setRole(java.util.List<SourceRole> vRoleList)
Sets the value of '_roleList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vRoleList - the Vector to copy.

setRoleAsReference

public void setRoleAsReference(java.util.List<SourceRole> roleList)
Deprecated. 

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

Parameters:
roleList - the Vector to set.

setSource

public void setSource(TsLocalId source)
Sets the value of field 'source'.

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

setSubRef

public void setSubRef(java.lang.String subRef)
Sets the value of field 'subRef'. The field 'subRef' has the following description: The page, subheading, id or other localized information within the source itself. Used to make a source reference more precise. Must be absent in supportedSource.

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

unmarshalSource

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

Parameters:
reader -
Returns:
the unmarshaled org.LexGrid.REST.commonTypes.Source
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
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.