001: /*
002: * Geotools2 - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2002, Geotools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: */
017: /**
018: *
019: */package org.geotools.renderer.shape;
020:
021: import org.geotools.filter.AttributeExpression;
022: import org.geotools.filter.BetweenFilter;
023: import org.geotools.filter.CompareFilter;
024: import org.geotools.filter.Expression;
025: import org.geotools.filter.FidFilter;
026: import org.geotools.filter.Filter;
027: import org.geotools.filter.FilterVisitor;
028: import org.geotools.filter.Filters;
029: import org.geotools.filter.FunctionExpression;
030: import org.geotools.filter.GeometryFilter;
031: import org.geotools.filter.LikeFilter;
032: import org.geotools.filter.LiteralExpression;
033: import org.geotools.filter.LogicFilter;
034: import org.geotools.filter.MathExpression;
035: import org.geotools.filter.NullFilter;
036: import java.util.Iterator;
037:
038: /**
039: * Replaces all geometry filters in Filter with an implementation that can
040: * process SimpleGeometries.
041: *
042: * @author Jesse
043: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/extension/shapefile-renderer/src/main/java/org/geotools/renderer/shape/ReplaceGeometryFilter.java $
044: */
045: public class ReplaceGeometryFilter implements FilterVisitor {
046: /* (non-Javadoc)
047: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.Filter)
048: */
049: public void visit(Filter filter) {
050: return;
051: }
052:
053: /* (non-Javadoc)
054: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.BetweenFilter)
055: */
056: public void visit(BetweenFilter filter) {
057: return;
058: }
059:
060: /* (non-Javadoc)
061: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.CompareFilter)
062: */
063: public void visit(CompareFilter filter) {
064: return;
065: }
066:
067: /* (non-Javadoc)
068: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.GeometryFilter)
069: */
070: public void visit(GeometryFilter filter) {
071: return;
072: }
073:
074: /* (non-Javadoc)
075: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.LikeFilter)
076: */
077: public void visit(LikeFilter filter) {
078: return;
079: }
080:
081: /* (non-Javadoc)
082: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.LogicFilter)
083: */
084: public void visit(LogicFilter filter) {
085: Iterator iter = filter.getFilterIterator();
086:
087: while (iter.hasNext()) {
088: org.opengis.filter.Filter f = (org.opengis.filter.Filter) iter
089: .next();
090: Filters.accept(f, this );
091: }
092: }
093:
094: /* (non-Javadoc)
095: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.NullFilter)
096: */
097: public void visit(NullFilter filter) {
098: return;
099: }
100:
101: /* (non-Javadoc)
102: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.FidFilter)
103: */
104: public void visit(FidFilter filter) {
105: return;
106: }
107:
108: /* (non-Javadoc)
109: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.AttributeExpression)
110: */
111: public void visit(AttributeExpression expression) {
112: return;
113: }
114:
115: /* (non-Javadoc)
116: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.Expression)
117: */
118: public void visit(Expression expression) {
119: return;
120: }
121:
122: /* (non-Javadoc)
123: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.LiteralExpression)
124: */
125: public void visit(LiteralExpression expression) {
126: return;
127: }
128:
129: /* (non-Javadoc)
130: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.MathExpression)
131: */
132: public void visit(MathExpression expression) {
133: return;
134: }
135:
136: /* (non-Javadoc)
137: * @see org.geotools.filter.FilterVisitor#visit(org.geotools.filter.FunctionExpression)
138: */
139: public void visit(FunctionExpression expression) {
140: return;
141: }
142: }
|