com.myjavatools.xml
Class BasicXmlData.Expression

java.lang.Object
  extended by com.myjavatools.xml.BasicXmlData.Expression
All Implemented Interfaces:
XmlData.Condition
Enclosing class:
BasicXmlData

public abstract static class BasicXmlData.Expression
extends java.lang.Object
implements XmlData.Condition

An abstract class that stores an expression used in XmlData search/filtering.


Constructor Summary
BasicXmlData.Expression()
           
 
Method Summary
static BasicXmlData.Expression parse(java.lang.String source)
          Parses a string containing search/selection condition.
abstract  boolean satisfies(XmlData entity)
          Checks whether XmlData satisfies a condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicXmlData.Expression

public BasicXmlData.Expression()
Method Detail

parse

public static BasicXmlData.Expression parse(java.lang.String source)
                                     throws java.lang.InstantiationException
Parses a string containing search/selection condition.

A condition consist of disjunctions of conjunctions of comparisons. Comparisons compare a node's type, value or attribute value to a string constant.

Parameters:
source - the expression to be parsed
Returns:
the internal (tree) representation of expression
Throws:
java.lang.InstantiationException

satisfies

public abstract boolean satisfies(XmlData entity)
Description copied from interface: XmlData.Condition
Checks whether XmlData satisfies a condition.

Specified by:
satisfies in interface XmlData.Condition
Parameters:
entity - the data to check
Returns:
true if yes, it satisfies