org.LexGrid.commonTypes
Class Property

java.lang.Object
  extended by org.LexGrid.commonTypes.Versionable
      extended by org.LexGrid.commonTypes.Property
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Comment, Definition, Presentation

public class Property
extends Versionable
implements java.io.Serializable

A description, definition, annotation or other attribute that serves to further define or identify an resource.

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

Constructor Summary
Property()
           
 
Method Summary
 void addPropertyQualifier(int index, PropertyQualifier vPropertyQualifier)
           
 void addPropertyQualifier(PropertyQualifier vPropertyQualifier)
           
 void addSource(int index, Source vSource)
           
 void addSource(Source vSource)
           
 void addUsageContext(int index, java.lang.String vUsageContext)
           
 void addUsageContext(java.lang.String vUsageContext)
           
 java.util.Enumeration<PropertyQualifier> enumeratePropertyQualifier()
          Method enumeratePropertyQualifier.
 java.util.Enumeration<Source> enumerateSource()
          Method enumerateSource.
 java.util.Enumeration<java.lang.String> enumerateUsageContext()
          Method enumerateUsageContext.
 java.lang.String getLanguage()
          Returns the value of field 'language'.
 java.lang.String getPropertyId()
          Returns the value of field 'propertyId'.
 java.lang.String getPropertyName()
          Returns the value of field 'propertyName'.
 PropertyQualifier[] getPropertyQualifier()
          Method getPropertyQualifier.Returns the contents of the collection in an Array.
 PropertyQualifier getPropertyQualifier(int index)
          Method getPropertyQualifier.
 int getPropertyQualifierCount()
          Method getPropertyQualifierCount.
 java.lang.String getPropertyType()
          Returns the value of field 'propertyType'.
 Source[] getSource()
          Method getSource.Returns the contents of the collection in an Array.
 Source getSource(int index)
          Method getSource.
 int getSourceCount()
          Method getSourceCount.
 java.lang.String[] getUsageContext()
          Method getUsageContext.Returns the contents of the collection in an Array.
 java.lang.String getUsageContext(int index)
          Method getUsageContext.
 int getUsageContextCount()
          Method getUsageContextCount.
 Text getValue()
          Returns the value of field 'value'.
 boolean isValid()
          Method isValid.
 java.util.Iterator<PropertyQualifier> iteratePropertyQualifier()
          Method iteratePropertyQualifier.
 java.util.Iterator<Source> iterateSource()
          Method iterateSource.
 java.util.Iterator<java.lang.String> iterateUsageContext()
          Method iterateUsageContext.
 void marshal(org.xml.sax.ContentHandler handler)
           
 void marshal(java.io.Writer out)
           
 void removeAllPropertyQualifier()
           
 void removeAllSource()
           
 void removeAllUsageContext()
           
 boolean removePropertyQualifier(PropertyQualifier vPropertyQualifier)
          Method removePropertyQualifier.
 PropertyQualifier removePropertyQualifierAt(int index)
          Method removePropertyQualifierAt.
 boolean removeSource(Source vSource)
          Method removeSource.
 Source removeSourceAt(int index)
          Method removeSourceAt.
 boolean removeUsageContext(java.lang.String vUsageContext)
          Method removeUsageContext.
 java.lang.String removeUsageContextAt(int index)
          Method removeUsageContextAt.
 void setLanguage(java.lang.String language)
          Sets the value of field 'language'.
 void setPropertyId(java.lang.String propertyId)
          Sets the value of field 'propertyId'.
 void setPropertyName(java.lang.String propertyName)
          Sets the value of field 'propertyName'.
 void setPropertyQualifier(int index, PropertyQualifier vPropertyQualifier)
           
 void setPropertyQualifier(PropertyQualifier[] vPropertyQualifierArray)
           
 void setPropertyType(java.lang.String propertyType)
          Sets the value of field 'propertyType'.
 void setSource(int index, Source vSource)
           
 void setSource(Source[] vSourceArray)
           
 void setUsageContext(int index, java.lang.String vUsageContext)
           
 void setUsageContext(java.lang.String[] vUsageContextArray)
           
 void setValue(Text value)
          Sets the value of field 'value'.
static Property unmarshalProperty(java.io.Reader reader)
          Method unmarshalProperty.
 void validate()
           
 
Methods inherited from class org.LexGrid.commonTypes.Versionable
getEffectiveDate, getEntryState, getExpirationDate, getIsActive, getOwner, getStatus, isIsActive, setEffectiveDate, setEntryState, setExpirationDate, setIsActive, setOwner, setStatus, unmarshalVersionable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Property

public Property()
Method Detail

addPropertyQualifier

public void addPropertyQualifier(PropertyQualifier vPropertyQualifier)
                          throws java.lang.IndexOutOfBoundsException
Parameters:
vPropertyQualifier -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPropertyQualifier

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

addSource

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

addSource

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

addUsageContext

public void addUsageContext(java.lang.String vUsageContext)
                     throws java.lang.IndexOutOfBoundsException
Parameters:
vUsageContext -
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addUsageContext

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

enumeratePropertyQualifier

public java.util.Enumeration<PropertyQualifier> enumeratePropertyQualifier()
Method enumeratePropertyQualifier.

Returns:
an Enumeration over all possible elements of this collection

enumerateSource

public java.util.Enumeration<Source> enumerateSource()
Method enumerateSource.

Returns:
an Enumeration over all possible elements of this collection

enumerateUsageContext

public java.util.Enumeration<java.lang.String> enumerateUsageContext()
Method enumerateUsageContext.

Returns:
an Enumeration over all possible elements of this collection

getLanguage

public java.lang.String getLanguage()
Returns the value of field 'language'. The field 'language' has the following description: The local identifier of the language of the property value. Must match a local id of a supportedLanguage in the corresponding mappings section. If omitted, and language is applicable to this property, the defaultLanguage of the surrounding resource is used.

Returns:
the value of field 'Language'.

getPropertyId

public java.lang.String getPropertyId()
Returns the value of field 'propertyId'. The field 'propertyId' has the following description: A unique identifier of this particular propert/resource/value instance.

Returns:
the value of field 'PropertyId'.

getPropertyName

public java.lang.String getPropertyName()
Returns the value of field 'propertyName'. The field 'propertyName' has the following description: The local identifier that defines the meaning of this particular property entry. Must match a local id of a supportedProperty in the corresponding mappings section.

Returns:
the value of field 'PropertyName'.

getPropertyQualifier

public PropertyQualifier getPropertyQualifier(int index)
                                       throws java.lang.IndexOutOfBoundsException
Method getPropertyQualifier.

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

getPropertyQualifier

public PropertyQualifier[] getPropertyQualifier()
Method getPropertyQualifier.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

getPropertyQualifierCount

public int getPropertyQualifierCount()
Method getPropertyQualifierCount.

Returns:
the size of this collection

getPropertyType

public java.lang.String getPropertyType()
Returns the value of field 'propertyType'. The field 'propertyType' has the following description: The LexGrid model element that this property represents. As an example, the codingScheme "copyright" attribute could be represented by a property with a propertyType that mapped to lgCS:copyRight. Must match a local id of a supportedPropertyType in the corresponding mappings section.

Returns:
the value of field 'PropertyType'.

getSource

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

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

getSource

public Source[] getSource()
Method getSource.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

getSourceCount

public int getSourceCount()
Method getSourceCount.

Returns:
the size of this collection

getUsageContext

public java.lang.String getUsageContext(int index)
                                 throws java.lang.IndexOutOfBoundsException
Method getUsageContext.

Parameters:
index -
Returns:
the value of the java.lang.String at the given index
Throws:
java.lang.IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getUsageContext

public java.lang.String[] getUsageContext()
Method getUsageContext.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

getUsageContextCount

public int getUsageContextCount()
Method getUsageContextCount.

Returns:
the size of this collection

getValue

public Text getValue()
Returns the value of field 'value'. The field 'value' has the following description: The value of the property associated with this particular resource. Note that "text" may be any type, including a URI, html fragment, etc.

Returns:
the value of field 'Value'.

isValid

public boolean isValid()
Method isValid.

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

iteratePropertyQualifier

public java.util.Iterator<PropertyQualifier> iteratePropertyQualifier()
Method iteratePropertyQualifier.

Returns:
an Iterator over all possible elements in this collection

iterateSource

public java.util.Iterator<Source> iterateSource()
Method iterateSource.

Returns:
an Iterator over all possible elements in this collection

iterateUsageContext

public java.util.Iterator<java.lang.String> iterateUsageContext()
Method iterateUsageContext.

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

removeAllPropertyQualifier

public void removeAllPropertyQualifier()

removeAllSource

public void removeAllSource()

removeAllUsageContext

public void removeAllUsageContext()

removePropertyQualifier

public boolean removePropertyQualifier(PropertyQualifier vPropertyQualifier)
Method removePropertyQualifier.

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

removePropertyQualifierAt

public PropertyQualifier removePropertyQualifierAt(int index)
Method removePropertyQualifierAt.

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

removeSource

public boolean removeSource(Source vSource)
Method removeSource.

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

removeSourceAt

public Source removeSourceAt(int index)
Method removeSourceAt.

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

removeUsageContext

public boolean removeUsageContext(java.lang.String vUsageContext)
Method removeUsageContext.

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

removeUsageContextAt

public java.lang.String removeUsageContextAt(int index)
Method removeUsageContextAt.

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

setLanguage

public void setLanguage(java.lang.String language)
Sets the value of field 'language'. The field 'language' has the following description: The local identifier of the language of the property value. Must match a local id of a supportedLanguage in the corresponding mappings section. If omitted, and language is applicable to this property, the defaultLanguage of the surrounding resource is used.

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

setPropertyId

public void setPropertyId(java.lang.String propertyId)
Sets the value of field 'propertyId'. The field 'propertyId' has the following description: A unique identifier of this particular propert/resource/value instance.

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

setPropertyName

public void setPropertyName(java.lang.String propertyName)
Sets the value of field 'propertyName'. The field 'propertyName' has the following description: The local identifier that defines the meaning of this particular property entry. Must match a local id of a supportedProperty in the corresponding mappings section.

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

setPropertyQualifier

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

setPropertyQualifier

public void setPropertyQualifier(PropertyQualifier[] vPropertyQualifierArray)
Parameters:
vPropertyQualifierArray -

setPropertyType

public void setPropertyType(java.lang.String propertyType)
Sets the value of field 'propertyType'. The field 'propertyType' has the following description: The LexGrid model element that this property represents. As an example, the codingScheme "copyright" attribute could be represented by a property with a propertyType that mapped to lgCS:copyRight. Must match a local id of a supportedPropertyType in the corresponding mappings section.

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

setSource

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

setSource

public void setSource(Source[] vSourceArray)
Parameters:
vSourceArray -

setUsageContext

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

setUsageContext

public void setUsageContext(java.lang.String[] vUsageContextArray)
Parameters:
vUsageContextArray -

setValue

public void setValue(Text value)
Sets the value of field 'value'. The field 'value' has the following description: The value of the property associated with this particular resource. Note that "text" may be any type, including a URI, html fragment, etc.

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

unmarshalProperty

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

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