edu.indiana.dde.mylead.common
Class MyLeadQuerySet

java.lang.Object
  extended byedu.indiana.dde.mylead.common.MyLeadQuerySet
All Implemented Interfaces:
MyLeadContextQuery

public class MyLeadQuerySet
extends java.lang.Object
implements MyLeadContextQuery

Each query has a target and then can consist of multiple MyLeadQueryPlan instances. This class is used to hold a set of query plans.
When building the perform document, all of the plans in this query set will be contained within a top-level mlOrSet element.


Constructor Summary
MyLeadQuerySet()
          The constructor does not take any parameters, so query plans are added using the addPlan method.
 
Method Summary
 void addPlan(MyLeadQueryPlan plan)
          Adds a MyLeadQueryPlan to the set of query plans for this myLEAD query plan set.
 int planCount()
          Returns the number of plans included in this set.
 java.lang.String wrapQuery()
          Called to create an XML fragment containing the query to include in an OGSA-DAI perform document for the myLEAD query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyLeadQuerySet

public MyLeadQuerySet()
The constructor does not take any parameters, so query plans are added using the addPlan method.

Method Detail

planCount

public int planCount()
Returns the number of plans included in this set.

Returns:
integer count of the number of plans in this set.

addPlan

public void addPlan(MyLeadQueryPlan plan)
Adds a MyLeadQueryPlan to the set of query plans for this myLEAD query plan set.

Parameters:
plan - MyLeadQueryPlan for the plan to add to this set.

wrapQuery

public java.lang.String wrapQuery()
Called to create an XML fragment containing the query to include in an OGSA-DAI perform document for the myLEAD query. The XML fragment created will validate against the leadActivity.xsd schema used to validate myLEAD queries.

Specified by:
wrapQuery in interface MyLeadContextQuery
Returns:
String with the XML fragment for the myLEAD query. If the set contains no valid MyLeadQueryPlan instances, then a blank String is returned. Otherwise a LeadChainSetType that would validate against the leadActivity.xsd schema as the query element of a LeadQueryType is returned.