01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.vfny.geoserver.util.requests;
06:
07: import org.geotools.filter.FilterHandler;
08: import org.opengis.filter.Filter;
09: import org.xml.sax.ContentHandler;
10: import org.xml.sax.helpers.XMLFilterImpl;
11: import java.util.logging.Logger;
12:
13: /**
14: * Minimal class to implement the FilterHandler interface.
15: *
16: * @author Rob Hranac, TOPP
17: * @version $Id: FilterHandlerImpl.java 7746 2007-11-13 15:38:35Z aaime $
18: */
19: public class FilterHandlerImpl extends XMLFilterImpl implements
20: ContentHandler, FilterHandler {
21: /** Class logger */
22: private static Logger LOGGER = org.geotools.util.logging.Logging
23: .getLogger("org.vfny.geoserver.requests");
24:
25: /** Tracks current filter */
26: private Filter currentFilter = null;
27:
28: /**
29: * Empty constructor.
30: */
31: public FilterHandlerImpl() {
32: super ();
33: }
34:
35: /**
36: * Recieves the filter from the filter parsing children.
37: *
38: * @param filter (OGC WFS) Filter from (SAX) filter..
39: */
40: public void filter(Filter filter) {
41: LOGGER.finest("found filter: " + filter.toString());
42: currentFilter = filter;
43: }
44:
45: /**
46: * Gives filter to whoever wants it.
47: *
48: * @return (OGC WFS) Filter from (SAX) filter..
49: */
50: public Filter getFilter() {
51: return currentFilter;
52: }
53: }
|