org.globus.mds.usefulrp.rpprovider
Class SingleValueResourcePropertyProvider
java.lang.Object
org.globus.wsrf.impl.BaseResourceProperty
org.globus.wsrf.impl.ReflectionResourceProperty
org.globus.mds.usefulrp.rpprovider.BaseResourcePropertyProvider
org.globus.mds.usefulrp.rpprovider.SingleValueResourcePropertyProvider
- All Implemented Interfaces:
- org.globus.wsrf.ResourceProperty
- public class SingleValueResourcePropertyProvider
- extends BaseResourcePropertyProvider
Generic class for using arbitrary ResourcePropertyElementProducer
plugins to generate a single Resource Property value for a configuration-named
dynamic Resource Property.
The SingleValueResourcePropertyProvider class is suitable for use in
situations where one or more ResourcePropertyElementProducers
are configured to generate a single data value for the named Resource
Property and when complex processing or merging of output fragments
(or a more specalized implmentation) is not necessary.
The intended usage of this class is in scenarios where the developer has
existing XML data that can be easily ingested with one of the pre-existing
ResourcePropertyElementProducer classes.
Using the ResourcePropertyProviderConfig object, it is
possible to configure SingleValueResourcePropertyProvider to
import well-formed XML data from a variety of input sources and represent
that data as a single ResourceProperty value.
The SingleValueResourcePropertyProvider class provides a reusable
mechanism to import such data without the developer having to write a
specialized ResourceProperty implementation of his/her own.
The following simplifying assumptions are made about the
SingleValueResourcePropertyProvider data structure:
1. The cardinal order of the child elements in the single result value of
the Resource Property will match that of the cardinal order of the
ResourcePropertyElementProducer configuration blocks found
in the ResourcePropertyProviderConfig parameter.
In other words, the RP value [0] will be an XML element that contains
a set of child elements which correspond (by ordinal position) the result
output from the execution of each ResourcePropertyElementProducer
returned from
ResourcePropertyProviderConfig.getResourcePropertyElementProducers(),
and so on.
Note: It is important to keep the ordering restriction in mind
when enumerating the ResourcePropertyElementProducers in
the ResourcePropertyProviderConfig configuration file,
as the ordering of the child elements of the result RP value
will mirror that which is found in the file.
2. The XML output for any configured producer should have as its root
element an element with a QName that matches the QName of the Resource
Property as configured in the
ResourcePropertyProviderConfig.resourcePropertyName parameter.
Note: If the XML output of the producer does NOT contain such a
root, a new root will be created that matches the RP QName and the
XML output from the ResourcePropertyElementProducer will
be "wrapped" as a child element of this new root element.
| Fields inherited from class org.globus.wsrf.impl.BaseResourceProperty |
metaData |
| Methods inherited from class org.globus.wsrf.impl.ReflectionResourceProperty |
add, clear, get, getValueSimple, isArray, isEmpty, iterator, remove, set, setObject, setPropertyName, size, toElements, toSOAPElements |
| Methods inherited from class org.globus.wsrf.impl.BaseResourceProperty |
convert, convertObject, convertPrimitive, getMetaData, setMetaData |
listeners
protected TransformElementListener[] listeners
SingleValueResourcePropertyProvider
public SingleValueResourcePropertyProvider(ResourcePropertyProviderConfig config)
throws Exception
initialize
public void initialize()
throws org.globus.wsrf.ResourcePropertyException
- Throws:
org.globus.wsrf.ResourcePropertyException
getDynamicValue
public Object getDynamicValue()
Copyright © 1999-2006 University of Chicago. All rights reserved.