edu.ucsb.nceas.morpho.query
Class QueryTerm

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

public class QueryTerm
extends java.lang.Object

A single term in a query, containing the path to be searched, the value to match, and any relevant search modifiers.


Constructor Summary
QueryTerm(boolean casesensitive, java.lang.String searchmode, java.lang.String value)
          Construct a new instance of a query term for a free text search (using the value only)
QueryTerm(boolean casesensitive, java.lang.String searchmode, java.lang.String value, java.lang.String pathexpr)
          Construct a new instance of a query term for a structured search (matching the value only for those nodes in the pathexpr)
 
Method Summary
 java.lang.String getPathExpression()
          get the path expression parameter
 java.lang.String getSearchMode()
          get the searchmode parameter
 java.lang.String getValue()
          get the Value parameter
 boolean isCaseSensitive()
          determine if the QueryTerm is case sensitive
 java.lang.String printSQL(boolean useXMLIndex)
          create a SQL serialization of the query that this instance represents
 void setCaseSensitive(boolean isCaseSensitive)
          set if the QueryTerm is case sensitive
 void setPathExpression(java.lang.String val)
          set the path expression parameter
 void setSearchMode(java.lang.String mode)
          set the searchmode parameter
 void setValue(java.lang.String val)
          set the value parameter
 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

QueryTerm

public QueryTerm(boolean casesensitive,
                 java.lang.String searchmode,
                 java.lang.String value)
Construct a new instance of a query term for a free text search (using the value only)
Parameters:
casesensitive - flag indicating whether case is used to match
searchmode - determines what kind of substring match is performed (one of starts-with|ends-with|contains|matches-exactly)
value - the text value to match

QueryTerm

public QueryTerm(boolean casesensitive,
                 java.lang.String searchmode,
                 java.lang.String value,
                 java.lang.String pathexpr)
Construct a new instance of a query term for a structured search (matching the value only for those nodes in the pathexpr)
Parameters:
casesensitive - flag indicating whether case is used to match
searchmode - determines what kind of substring match is performed (one of starts-with|ends-with|contains|matches-exactly)
value - the text value to match
pathexpr - the hierarchical path to the nodes to be searched
Method Detail

isCaseSensitive

public boolean isCaseSensitive()
determine if the QueryTerm is case sensitive

setCaseSensitive

public void setCaseSensitive(boolean isCaseSensitive)
set if the QueryTerm is case sensitive

getSearchMode

public java.lang.String getSearchMode()
get the searchmode parameter

setSearchMode

public void setSearchMode(java.lang.String mode)
set the searchmode parameter

getValue

public java.lang.String getValue()
get the Value parameter

setValue

public void setValue(java.lang.String val)
set the value parameter

getPathExpression

public java.lang.String getPathExpression()
get the path expression parameter

setPathExpression

public void setPathExpression(java.lang.String val)
set the path expression parameter

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 should become a way to get the XML serialization of the query.
Overrides:
toString in class java.lang.Object


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