01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2005, Refractions Research Inc.
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.catalog;
18:
19: import java.io.IOException;
20:
21: /**
22: * Allows processing of resolve deltas.
23: *
24: * <p>
25: * Usage:
26: * <pre>
27: * class Visitor implements IResolveDeltaVisitor {
28: * public boolean visit(IResolveDelta delta) {
29: * switch (delta.getKind()) {
30: * case IDelta.ADDED :
31: * // handle added handled
32: * break;
33: * case IDelta.REMOVED :
34: * // handle removed handled
35: * break;
36: * case IDelta.CHANGED :
37: * // handle changed handled
38: * break;
39: * case IDelta.REPLACED :
40: * // handle replaced handled
41: * break;
42: * }
43: * return true;
44: * }
45: * }
46: * ICatalogDelta rootDelta = ...;
47: * rootDelta.accept(new Visitor());
48: * </pre>
49: * </p>
50: *
51: * <p>
52: * Clients may implement this interface.
53: * </p>
54: *
55: * @author Jody Garnett, Refractions Research
56: *
57: * @since 0.9.0
58: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/catalog/ResolveDeltaVisitor.java $
59: */
60: public interface ResolveDeltaVisitor {
61: /**
62: * Visits the given resolve delta.
63: *
64: * @param delta DOCUMENT ME!
65: *
66: * @return <code>true</code> if the resource delta's children should be
67: * visited; <code>false</code> if they should be skipped.
68: *
69: * @exception IOException if the visit fails for some reason.
70: */
71: boolean visit(ResolveDelta delta) throws IOException;
72: }
|