Author: Scott Jensen, Indiana University, DDE Lab
To compile to XML Bean, run the following command in the directory
with this schema file. For this to work, myLEAD must be running on
the local machine on port 8080. If running somewhere else, change
the schemaLocation attributes in the above imports to point to the
correct host and port.
scomp -cp ./lead-metadata-1.8.jar:$CLASSPATH -d classes -src src -out MyLeadResponse-1.3.5.4.jar -javasource 1.4 mylead_queryresponse.xsd mylead_queryresponse.xsdconfig
The lead-metadata-1.8.jar is the jar for the LEAD Metadata Schema Bean jar, If this
is updated, use the updated file name. It is assumed that $CLASSPATH contains the jars
needed to compile using XML Beans.
Revised on March 20, 2007 to handle the change in namespaces
in the LEAD schema.
Schema for the response to a myLEAD query. This schema requires the
LEAD Metadata Schema (LMS)for the LEADresource or metadata attributes
that could be contained as the content for each object in the response.
** Content Filters **
The response to a myLEAD query is based on hierarchy and content
filters. The content filter has four options
1) GUIDONLY - in this case there is no response content
2) FULL_SCHEMA - the content is the full LMS for the object
3) attribute filter - selected metadata attributes from the
LMS are returned in the response, in the
order specified in the filter, and fully
qualified (namespaces).
4) element filter - selected elements within specified metadata
attributes are returned. Each element has
a name attribute that the user can specify
in the filter.
** Attribute Filter Details **
The metadata attribute filter can select any of the
nodes from the LMS that have been identified as
metadata attributes in the myLEAD attribute definition
table. In addition, any of the dynamic metadata
attributes could also be selected based on the
metadata attribute name and source.
** Element Filter Details **
The metadata element filter can select any of the
nodes from the LMS that have been identified as
metadata element nodes within a metadata attribute
node in the myLEAD element definition table. In
addition, any of the dynamic metadata elements
could also be selected based on their metadata
attribute name and source as well as then metadata
element name and source.
For each element specified, the element value is
included in the response within a myLeadElement
tag with an mlName attribute. The attribute value
is based on a name specified in the query filter,
but if no name is specified, then metadata element's
name is used.
** Hierarchy Filters **
1) SUBTREE - This returns not only the objects, but also
the full subtree of children under the object.
The content filter determines what is returned
for each object in the subtree.
2) TARGET - This returns only the target objects of the
query and none of the children. All of the
targets will be of the same type.
3) CHILDREN - This filter returns the direct children of
the first target meeting the query's criteria.
The children could be of varied types (e.g., an
experiment could contain collections and files
as direct children).
** The Filter Matrix **
Since there are 4 content filters and 3 hierarchy filters,
there are a total of twelve different combinations - and any
subtree in the hierarchy must use the same content filter as
all of the other objects in the hierarchy (for that query).
All of the query response object types based on one or
more attribute filters use this group.
The order of metadata attributes included is based on the
order of the filters in the query. Other than those where
the occurrance restriction is unbounded will generally only
have a single instance since they occur only once in the LMS.
All of the query response object types based on one or
more element filters use this filter.
A query response in myLEAD can be empty, so the
choice has a minimum of zero.
Although not enforced by the schema, all query
responses will use the same content filter for
all objects in a query response. The content
filter used is specified in the query.
Also, all objects in a response will use the
same hierarchy filter, so if the SUBTREE filter
is specified in the query, then the full subtree
will be included for all objects in the query
response.