01: /*
02: * uDig - User Friendly Desktop Internet GIS client
03: * http://udig.refractions.net
04: * (C) 2004, Refractions Research Inc.
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation;
09: * version 2.1 of the License.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: */
17: package net.refractions.udig.catalog;
18:
19: import java.io.IOException;
20:
21: /**
22: * Allows processing of resolve deltas.
23: * <p>
24: * Usage:
25: *
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: *
50: * </p>
51: * <p>
52: * Clients may implement this interface.
53: * </p>
54: *
55: * @author Jody Garnett, Refractions Research
56: * @since 0.9.0
57: */
58: public interface IResolveDeltaVisitor {
59:
60: /**
61: * Visits the given resolve delta.
62: *
63: * @return <code>true</code> if the resource delta's children should be visited;
64: * <code>false</code> if they should be skipped.
65: * @exception CoreException if the visit fails for some reason.
66: */
67: public boolean visit(IResolveDelta delta) throws IOException;
68: }
|