01: package org.geotools.caching.quatree;
02:
03: import org.geotools.caching.spatialindex.spatialindex.IData;
04: import org.geotools.caching.spatialindex.spatialindex.INode;
05: import org.geotools.caching.spatialindex.spatialindex.IVisitor;
06: import org.geotools.caching.spatialindex.spatialindex.Region;
07:
08: public class ValidatingVisitor implements IVisitor {
09: private final Region target;
10:
11: public ValidatingVisitor(Region target) {
12: this .target = target;
13: }
14:
15: public void visitData(IData d) {
16: // do nothing
17: }
18:
19: public void visitNode(INode n) {
20: if (n instanceof Node) {
21: Node node = (Node) n;
22:
23: if (target.contains(node.getShape())) {
24: node.entry.setValid();
25: }
26: }
27: }
28: }
|