org.globus.wsrf
Interface ResourceProperty

All Known Implementing Classes:
BaseResourceProperty, 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(Object value)
          Adds a value.
 void clear()
          Removes all values.
 Object get(int index)
          Retrieves a value at a specific index.
 int getMaxOccurs()
          Returns the maximum number of values that this resource property can have.
 int getMinOccurs()
          Returns the minimum number of values that this resource property can have.
 QName getName()
          Returns ResourceProperty name.
 boolean isNillable()
          Returns if this resource property can be nillable.
 boolean remove(Object value)
          Removes a specific value.
 void set(int index, Object value)
          Sets a value at a specific index.
 void setMaxOccurs(int max)
          Sets the maximum number of values that this resource property can ever have.
 void setMinOccurs(int min)
          Sets the minimum number of values that this resource property can ever have.
 void setNillable(boolean nillable)
          Sets if this resource property can be nillable.
 int size()
          Returns the number of values in the resource property.
 Element[] toElement()
          Converts the resource property value into a DOM Element array.
 SOAPElement[] toSOAPElement()
          Converts the resource property value into a SOAPElement array.
 void toSOAPElement(List list)
          Converts the resource property values into SOAPElements and adds them to the specified list.
 

Method Detail

getName

public QName getName()
Returns ResourceProperty name.
Returns:
the resource property name.

add

public void add(Object value)
Adds a value.
Parameters:
value - the value to add.

remove

public boolean remove(Object value)
Removes a specific value.
Parameters:
value - value to remove.
Returns:
true if the value was removed. False otherwise.

get

public 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,
                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.

isNillable

public boolean isNillable()
Returns if this resource property can be nillable.
Returns:
true if the resource property can be nillable. False otherwise.

setNillable

public void setNillable(boolean nillable)
Sets if this resource property can be nillable.
Parameters:
nillable - the nillable property.

getMinOccurs

public int getMinOccurs()
Returns the minimum number of values that this resource property can have.
Returns:
the minimum number of values that this resource property can have.

setMinOccurs

public void setMinOccurs(int min)
Sets the minimum number of values that this resource property can ever have.
Parameters:
min - the minimum number of values allowed in this resource property.

getMaxOccurs

public int getMaxOccurs()
Returns the maximum number of values that this resource property can have.
Returns:
the maximum number of values that this resource property can have. Returns Integer.MAX_VALUE if unlimited.

setMaxOccurs

public void setMaxOccurs(int max)
Sets the maximum number of values that this resource property can ever have.
Parameters:
max - the maximum number of values allowed in this resource property.

toSOAPElement

public SOAPElement[] toSOAPElement()
                            throws Exception
Converts the resource property value into a SOAPElement array. Each value is wrapped into an element named after the resource property (getName()). If the RP has no values (is null), and RP element was defined as:
Returns:
the resource property as a SOAPElement array.
Throws:
Exception - if conversion fails.

toSOAPElement

public void toSOAPElement(List list)
                   throws Exception
Converts the resource property values into SOAPElements and adds them to the specified list. No element will be added to the list if the resource property has no values and minOccurs is set to 0.
Throws:
Exception - if conversion fails.

toElement

public Element[] toElement()
                    throws Exception
Converts the resource property value into a DOM Element array. Each value is wrapped into an element named after the resource property (getName()). If the RP has no values (is null), and RP element was defined as:
Returns:
the resource property as a DOM Element array.
Throws:
Exception - if conversion fails.


Copyright © 1999-2003 University of Chicago and The University of Southern California. All rights reserved.