Java Doc for LikeFilterImpl.java in  » GIS » GeoTools-2.4.1 » org » geotools » filter » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.filter 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.filter.FilterAbstract
      org.geotools.filter.AbstractFilter
         org.geotools.filter.AbstractFilterImpl
            org.geotools.filter.LikeFilterImpl

LikeFilterImpl
public class LikeFilterImpl extends AbstractFilterImpl implements LikeFilter(Code)
Defines a like filter, which checks to see if an attribute matches a REGEXP.
author:
   Rob Hranac, Vision for New York
version:
   $Id: LikeFilterImpl.java 24805 2007-03-19 15:15:35Z aaime $



Constructor Summary
protected  LikeFilterImpl()
     Constructor which flags the operator as like.

Method Summary
public  Objectaccept(FilterVisitor visitor, Object extraData)
     Used by FilterVisitors to perform some action on this filter instance. Typicaly used by Filter decoders, but may also be used by any thing which needs infomration from filter structure.
public static  StringconvertToSQL92(char escape, char multi, char single, String pattern)
     Given OGC PropertyIsLike Filter information, construct an SQL-compatible 'like' pattern. SQL % --> match any number of characters _ --> match a single character NOTE; the SQL command is 'string LIKE pattern [ESCAPE escape-character]' We could re-define the escape character, but I'm not doing to do that in this code since some databases will not handle this case. Method: 1.
public  booleanequals(Object obj)
     Compares this filter to the specified object.
public  booleanevaluate(Object feature)
     Determines whether or not a given feature matches this pattern.
Parameters:
  feature - Specified feature to examine.
public  java.lang.StringgetEscape()
     Getter for property escape.
public  org.opengis.filter.expression.ExpressiongetExpression()
     Gets the expression for hte filter.
public  StringgetLiteral()
     Returns the pattern.
final public  StringgetPattern()
     Accessor method to retrieve the pattern.
public  StringgetSQL92LikePattern()
    
public  StringgetSingleChar()
    

THis method calls #getWildcardSingle()() for subclass backwards compatability.

final public  ExpressiongetValue()
     Gets the Value (left hand side) of this filter.
public  StringgetWildCard()
    

THis method calls LikeFilterImpl.getWildcardMulti() for subclass backwards compatability.

final public  StringgetWildcardMulti()
     Getter for property wildcardMulti.
final public  StringgetWildcardSingle()
     Getter for property wildcardSingle.
public  inthashCode()
     Override of hashCode method.
public  voidsetEscape(String escape)
    
public  voidsetExpression(org.opengis.filter.expression.Expression e)
    
public  voidsetLiteral(String literal)
     Sets the pattern.
final public  voidsetPattern(Expression p, String wildcardMulti, String wildcardSingle, String escape)
     Sets the match pattern for this FilterLike.
final public  voidsetPattern(String pattern, String wildcardMulti, String wildcardSingle, String escape)
     Sets the match pattern for this FilterLike.
public  voidsetSingleChar(String singleChar)
    
final public  voidsetValue(Expression attribute)
    
public  voidsetWildCard(String wildCard)
    
public  StringtoString()
     Return this filter as a string.


Constructor Detail
LikeFilterImpl
protected LikeFilterImpl()(Code)
Constructor which flags the operator as like.




Method Detail
accept
public Object accept(FilterVisitor visitor, Object extraData)(Code)
Used by FilterVisitors to perform some action on this filter instance. Typicaly used by Filter decoders, but may also be used by any thing which needs infomration from filter structure. Implementations should always call: visitor.visit(this); It is importatant that this is not left to a parent class unless the parents API is identical.
Parameters:
  visitor - The visitor which requires access to this filter, themethod must call visitor.visit(this);



convertToSQL92
public static String convertToSQL92(char escape, char multi, char single, String pattern) throws IllegalArgumentException(Code)
Given OGC PropertyIsLike Filter information, construct an SQL-compatible 'like' pattern. SQL % --> match any number of characters _ --> match a single character NOTE; the SQL command is 'string LIKE pattern [ESCAPE escape-character]' We could re-define the escape character, but I'm not doing to do that in this code since some databases will not handle this case. Method: 1. Examples: ( escape ='!', multi='*', single='.' ) broadway* -> 'broadway%' broad_ay -> 'broad_ay' broadway -> 'broadway' broadway!* -> 'broadway*' (* has no significance and is escaped) can't -> 'can''t' ( ' escaped for SQL compliance) NOTE: we also handle "'" characters as special because they are end-of-string characters. SQL will convert ' to '' (double single quote). NOTE: we dont handle "'" as a 'special' character because it would be too confusing to have a special char as another special char. Using this will throw an error (IllegalArgumentException).
Parameters:
  escape -
Parameters:
  multi -
Parameters:
  single -
Parameters:
  pattern -



equals
public boolean equals(Object obj)(Code)
Compares this filter to the specified object. Returns true if the passed in object is the same as this filter. Checks to make sure the filter types, the value, and the pattern are the same. &
Parameters:
  obj - - the object to compare this LikeFilter against. true if specified object is equal to this filter; falseotherwise.



evaluate
public boolean evaluate(Object feature)(Code)
Determines whether or not a given feature matches this pattern.
Parameters:
  feature - Specified feature to examine. Flag confirming whether or not this feature is inside thefilter.



getEscape
public java.lang.String getEscape()(Code)
Getter for property escape. Value of property escape.



getExpression
public org.opengis.filter.expression.Expression getExpression()(Code)
Gets the expression for hte filter.

This method calls th deprecated LikeFilterImpl.getValue() for backwards compatability with subclasses.




getLiteral
public String getLiteral()(Code)
Returns the pattern.



getPattern
final public String getPattern()(Code)
Accessor method to retrieve the pattern. the pattern being matched.LikeFilterImpl.getLiteral()



getSQL92LikePattern
public String getSQL92LikePattern() throws IllegalArgumentException(Code)
see convertToSQL92
throws:
  IllegalArgumentException -



getSingleChar
public String getSingleChar()(Code)

THis method calls #getWildcardSingle()() for subclass backwards compatability.


See Also:    org.opengis.filter.PropertyIsLike#getSingleChar()().



getValue
final public Expression getValue()(Code)
Gets the Value (left hand side) of this filter. The expression that is the value of the filter.LikeFilterImpl.getExpression()



getWildCard
public String getWildCard()(Code)

THis method calls LikeFilterImpl.getWildcardMulti() for subclass backwards compatability.


See Also:    org.opengis.filter.PropertyIsLike#getWildCard().



getWildcardMulti
final public String getWildcardMulti()(Code)
Getter for property wildcardMulti. Value of property wildcardMulti.LikeFilterImpl.getWildCard()



getWildcardSingle
final public String getWildcardSingle()(Code)
Getter for property wildcardSingle. Value of property wildcardSingle.LikeFilterImpl.getSingleChar()



hashCode
public int hashCode()(Code)
Override of hashCode method. the hash code for this like filter implementation.



setEscape
public void setEscape(String escape)(Code)



setExpression
public void setExpression(org.opengis.filter.expression.Expression e)(Code)



setLiteral
public void setLiteral(String literal)(Code)
Sets the pattern.



setPattern
final public void setPattern(Expression p, String wildcardMulti, String wildcardSingle, String escape)(Code)
Sets the match pattern for this FilterLike.
Parameters:
  p - the expression which evaluates to the match pattern for thisfilter
Parameters:
  wildcardMulti - the string that represents a mulitple character(1->n) wildcard
Parameters:
  wildcardSingle - the string that represents a single character (1)wildcard
Parameters:
  escape - the string that represents an escape characterPropertyIsLike.setExpression(Expression)PropertyIsLike.setWildCard(String)PropertyIsLike.setSingleChar(String)PropertyIsLike.setEscape(String)



setPattern
final public void setPattern(String pattern, String wildcardMulti, String wildcardSingle, String escape)(Code)
Sets the match pattern for this FilterLike.
Parameters:
  pattern - the string which contains the match pattern for thisfilter
Parameters:
  wildcardMulti - the string that represents a mulitple character(1->n) wildcard
Parameters:
  wildcardSingle - the string that represents a single character (1)wildcard
Parameters:
  escape - the string that represents an escape characterPropertyIsLike.setLiteral(String)PropertyIsLike.setWildCard(String)PropertyIsLike.setSingleChar(String)PropertyIsLike.setEscape(String)



setSingleChar
public void setSingleChar(String singleChar)(Code)



setValue
final public void setValue(Expression attribute) throws IllegalFilterException(Code)
Sets the expression to be evalutated as being like the pattern
Parameters:
  attribute - The value of the attribute for comparison.
throws:
  IllegalFilterException - Filter is illegal.



setWildCard
public void setWildCard(String wildCard)(Code)



toString
public String toString()(Code)
Return this filter as a string. String representation of this like filter.



Methods inherited from org.geotools.filter.AbstractFilterImpl
public Filter and(org.opengis.filter.Filter filter)(Code)(Java Doc)
public Filter not()(Code)(Java Doc)
public Filter or(org.opengis.filter.Filter filter)(Code)(Java Doc)

Fields inherited from org.geotools.filter.AbstractFilter
final protected static Logger LOGGER(Code)(Java Doc)
protected short filterType(Code)(Java Doc)
protected boolean permissiveConstruction(Code)(Java Doc)

Methods inherited from org.geotools.filter.AbstractFilter
final public void accept(FilterVisitor visitor)(Code)(Java Doc)
final public boolean contains(Feature feature)(Code)(Java Doc)
public short getFilterType()(Code)(Java Doc)
protected static boolean isCompareFilter(short filterType)(Code)(Java Doc)
protected static boolean isGeometryDistanceFilter(short filterType)(Code)(Java Doc)
protected static boolean isGeometryFilter(short filterType)(Code)(Java Doc)
protected static boolean isLogicFilter(short filterType)(Code)(Java Doc)
protected static boolean isMathFilter(short filterType)(Code)(Java Doc)
protected static boolean isSimpleFilter(short filterType)(Code)(Java Doc)

Fields inherited from org.geotools.filter.FilterAbstract
protected org.opengis.filter.FilterFactory factory(Code)(Java Doc)

Methods inherited from org.geotools.filter.FilterAbstract
public Object accept(FilterVisitor visitor, Object extraData)(Code)(Java Doc)
public boolean accepts(Feature feature)(Code)(Java Doc)
protected Object eval(Expression expression, Feature feature)(Code)(Java Doc)
protected Object eval(org.opengis.filter.expression.Expression expression, Object object)(Code)(Java Doc)
protected Object eval(org.opengis.filter.expression.Expression expression, Object object, Class context)(Code)(Java Doc)
public boolean evaluate(Feature feature)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.