org.geotools.filter
Class ExpressionSAXParser

java.lang.Object
  extended by org.geotools.filter.ExpressionSAXParser

public class ExpressionSAXParser
extends java.lang.Object

DOCUMENT ME!

Version:
$Id: ExpressionSAXParser.java 30648 2008-06-12 19:22:35Z acuster $
Author:
Rob Hranac, TOPP
, Chris Holmes, TOPP

Constructor Summary
ExpressionSAXParser()
           
ExpressionSAXParser(FilterFactory factory)
           
ExpressionSAXParser(org.opengis.feature.simple.SimpleFeatureType schema)
          Constructor with a schema to read the attribute againset.
ExpressionSAXParser(org.opengis.feature.simple.SimpleFeatureType schema, FilterFactory factory)
          Constructor injection
 
Method Summary
protected static short convertType(java.lang.String expType)
          Converts the string representation of the expression to the DefaultExpression short type.
 Expression create()
          Creates and returns the expression.
 void end(java.lang.String message)
          Called when the filter handler has reached the end of an expression
 void geometry(com.vividsolutions.jts.geom.Geometry geometry)
          Gets geometry.
 java.lang.String getFunctionName(org.xml.sax.Attributes map)
          stolen from the DOM parser -- for a list of attributes, find the "name" ie.
 boolean isReady()
          Checks to see if this expression is ready to be returned.
 void message(java.lang.String message, boolean convertToNumber)
          Handles incoming characters.
 void setFilterFactory(FilterFactory factory)
          Setter injection
 void start(java.lang.String declaredType, org.xml.sax.Attributes atts)
          Initializes the factory to create a new expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionSAXParser

public ExpressionSAXParser()

ExpressionSAXParser

public ExpressionSAXParser(FilterFactory factory)

ExpressionSAXParser

public ExpressionSAXParser(org.opengis.feature.simple.SimpleFeatureType schema)
Constructor with a schema to read the attribute againset.

Parameters:
schema - The schema for attributes (null is fine, as the code for this is not in place.

ExpressionSAXParser

public ExpressionSAXParser(org.opengis.feature.simple.SimpleFeatureType schema,
                           FilterFactory factory)
Constructor injection

Method Detail

setFilterFactory

public void setFilterFactory(FilterFactory factory)
Setter injection


start

public void start(java.lang.String declaredType,
                  org.xml.sax.Attributes atts)
           throws IllegalFilterException
Initializes the factory to create a new expression. Called when the filter handler reaches a new expression.

Parameters:
declaredType - The string representation of the expression type.
Throws:
IllegalFilterException - If there are problems creating expressions.

end

public void end(java.lang.String message)
         throws IllegalFilterException
Called when the filter handler has reached the end of an expression

Parameters:
message - the expression to end.
Throws:
IllegalFilterException - If there are problems creating exceptions.

isReady

public boolean isReady()
Checks to see if this expression is ready to be returned.

Returns:
true if the expression is ready to be returned, false otherwise.

message

public void message(java.lang.String message,
                    boolean convertToNumber)
             throws IllegalFilterException
Handles incoming characters.

Parameters:
message - the incoming chars from the SAX handler.
Throws:
IllegalFilterException - If there are problems with filter constrcution.

geometry

public void geometry(com.vividsolutions.jts.geom.Geometry geometry)
              throws IllegalFilterException
Gets geometry.

Parameters:
geometry - The geometry from the filter.
Throws:
IllegalFilterException - If there are problems creating expression.

create

public Expression create()
Creates and returns the expression.

Returns:
The expression currently held by this parser.

convertType

protected static short convertType(java.lang.String expType)
Converts the string representation of the expression to the DefaultExpression short type.

Parameters:
expType - Type of filter for check.
Returns:
the short representation of the expression.

getFunctionName

public java.lang.String getFunctionName(org.xml.sax.Attributes map)
stolen from the DOM parser -- for a list of attributes, find the "name" ie. for return "geomLength" NOTE: if someone uses or this will work, if they use a different prefix, it will not.

Parameters:
map -


Copyright © 1996-2010 Geotools. All Rights Reserved.