org.globus.wsrf
Interface ResourceProperty

All Known Implementing Classes:
BaseResourceProperty, PersistentResourceProperty, ResourcePropertyTopic

public interface ResourceProperty

Represents a single resource property. A resource property can have multiple values and be converted into a DOM Element or SOAPElement array.


Method Summary
 void add(java.lang.Object value)
          Adds a value.
 void clear()
          Removes all values.
 java.lang.Object get(int index)
          Retrieves a value at a specific index.
 ResourcePropertyMetaData getMetaData()
          Gets meta data of this resource property.
 boolean isEmpty()
          Returns true if the resource property has any values.
 java.util.Iterator iterator()
          Returns iterator over the values of this resource property.
 boolean remove(java.lang.Object value)
          Removes a specific value.
 void set(int index, java.lang.Object value)
          Sets a value at a specific index.
 int size()
          Returns the number of values in the resource property.
 org.w3c.dom.Element[] toElements()
          Converts the resource property value into a DOM Element array.
 javax.xml.soap.SOAPElement[] toSOAPElements()
          Converts the resource property value into a SOAPElement array.
 

Method Detail

add

public void add(java.lang.Object value)
Adds a value.

Parameters:
value - the value to add.

remove

public boolean remove(java.lang.Object value)
Removes a specific value. If the resource property contains multiple of the same value, only the first one is removed.

Parameters:
value - value to remove.
Returns:
true if the value was removed. False otherwise.

get

public java.lang.Object get(int index)
Retrieves a value at a specific index.

Parameters:
index - the index of value to retrieve.
Returns:
the value at the given index. This operation might fail if the index is out of bounds.

set

public void set(int index,
                java.lang.Object value)
Sets a value at a specific index.

Parameters:
index - the index to set value at.
value - the new value

clear

public void clear()
Removes all values.


size

public int size()
Returns the number of values in the resource property.

Returns:
the number of values.

isEmpty

public boolean isEmpty()
Returns true if the resource property has any values.

Returns:
true if the resource property has any values. False, otherwise.

iterator

public java.util.Iterator iterator()
Returns iterator over the values of this resource property.

Returns:
iterator over the values of this resource property.

toSOAPElements

public javax.xml.soap.SOAPElement[] toSOAPElements()
                                            throws SerializationException
Converts the resource property value into a SOAPElement array. Each value is wrapped into an element named after the resource property. If the RP has no values (is null), and RP element was defined as:

Returns:
the resource property as a SOAPElement array.
Throws:
SerializationException - if conversion fails.

toElements

public org.w3c.dom.Element[] toElements()
                                 throws SerializationException
Converts the resource property value into a DOM Element array. Each value is wrapped into an element named after the resource property. If the RP has no values (is null), and RP element was defined as:

Returns:
the resource property as a DOM Element array.
Throws:
SerializationException - if conversion fails.

getMetaData

public ResourcePropertyMetaData getMetaData()
Gets meta data of this resource property.

Returns:
meta data of this resource property. Never null.