edu.iastate.metnet.metaomgraph
Class TreeSearcher.Query

java.lang.Object
  extended by edu.iastate.metnet.metaomgraph.TreeSearcher.Query
All Implemented Interfaces:
XMLizable, java.io.Serializable
Enclosing class:
TreeSearcher

public static class TreeSearcher.Query
extends java.lang.Object
implements java.io.Serializable, XMLizable

Specifies a search for a TreeSearcher object.

See Also:
Serialized Form

Field Summary
 boolean exact
          Specifies whether an exact match is required, or if a substring match will suffice.
 java.lang.String field
          The field to search for.
 java.lang.String term
          The value to search for.
 
Constructor Summary
TreeSearcher.Query()
          Default constructor.
TreeSearcher.Query(java.lang.String field, java.lang.String term, boolean exact)
          Constructor.
 
Method Summary
 void fromXML(org.jdom.Element source)
          Initializes this object from an XML Element.
static java.lang.String getXMLElementName()
           
 org.jdom.Element toXML()
          Converts this object to an XML Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

field

public java.lang.String field
The field to search for. If this is null, the query will match any node that allows children.


term

public java.lang.String term
The value to search for. Must not be null.


exact

public boolean exact
Specifies whether an exact match is required, or if a substring match will suffice.

Constructor Detail

TreeSearcher.Query

public TreeSearcher.Query()
Default constructor. If this is used, field, term, and exact must be set manually.


TreeSearcher.Query

public TreeSearcher.Query(java.lang.String field,
                          java.lang.String term,
                          boolean exact)
Constructor.

Parameters:
field - the field name to search for. If this value is null, only non-leaves will be searched.
term - the value to search for
exact - if true, this query will only succeed if the term matches the user object's field exactly, otherwise it will succeed if a substring is matched
Method Detail

toXML

public org.jdom.Element toXML()
Description copied from interface: XMLizable
Converts this object to an XML Element.

Specified by:
toXML in interface XMLizable
Returns:
an XML Element that represents this object

fromXML

public void fromXML(org.jdom.Element source)
Description copied from interface: XMLizable
Initializes this object from an XML Element.

Specified by:
fromXML in interface XMLizable
Parameters:
source - an XML Element that specifies this object

getXMLElementName

public static java.lang.String getXMLElementName()