edu.ucsb.nceas.morpho.query
Class QueryGroup

java.lang.Object
  |
  +--edu.ucsb.nceas.morpho.query.QueryGroup

public class QueryGroup
extends java.lang.Object

A group of terms and other groups in a query, allowing arbitrarily nested hierarchiies that can be combined using union or intersection.


Constructor Summary
QueryGroup(java.lang.String operator)
          construct a new QueryGroup
 
Method Summary
 void addChild(QueryGroup qgroup)
          Add a child QueryGroup to this QueryGroup
 void addChild(QueryTerm qterm)
          Add a child QueryTerm to this QueryGroup
 java.util.Enumeration getChildren()
          Retrieve an Enumeration of query terms for this QueryGroup
 java.lang.String getOperator()
          Retrieve the operator for this QueryGroup
 java.lang.String printSQL(boolean useXMLIndex)
          create a SQL serialization of the query that this instance represents
 void setOperator(java.lang.String op)
          Set the operator for this QueryGroup
 java.lang.String toString()
          create a String description of the query that this instance represents.
 java.lang.String toXml(int indent)
          create a XML serialization of the query that this instance represents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryGroup

public QueryGroup(java.lang.String operator)
construct a new QueryGroup
Parameters:
operator - the boolean conector used to connect query terms in this query group
Method Detail

addChild

public void addChild(QueryGroup qgroup)
Add a child QueryGroup to this QueryGroup
Parameters:
qgroup - the query group to be added to the list of terms

addChild

public void addChild(QueryTerm qterm)
Add a child QueryTerm to this QueryGroup
Parameters:
qterm - the query term to be added to the list of terms

getChildren

public java.util.Enumeration getChildren()
Retrieve an Enumeration of query terms for this QueryGroup

getOperator

public java.lang.String getOperator()
Retrieve the operator for this QueryGroup

setOperator

public void setOperator(java.lang.String op)
Set the operator for this QueryGroup

printSQL

public java.lang.String printSQL(boolean useXMLIndex)
create a SQL serialization of the query that this instance represents

toXml

public java.lang.String toXml(int indent)
create a XML serialization of the query that this instance represents

toString

public java.lang.String toString()
create a String description of the query that this instance represents. This is a way to get the XML serialization of the query group.
Overrides:
toString in class java.lang.Object


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.