01: /* Copyright 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.car;
07:
08: import org.xml.sax.ContentHandler;
09:
10: /**
11: * Holds a Path object for which it watches and answers true when that
12: * path is seen. Also holds onto the handler for the sub-tree below
13: * that path.
14: *
15: * @author mboyd
16: * @version $Revision: 35612 $ $Date: 2005-04-18 13:57:17 -0700 (Mon, 18 Apr 2005) $
17: **/
18: class PathRouter {
19: Path pathLookedFor = null;
20: ContentHandler handler = null;
21:
22: PathRouter(Path p, ContentHandler handler) {
23: this .pathLookedFor = p;
24: this .handler = handler;
25: }
26:
27: ContentHandler handler() {
28: return handler;
29: }
30:
31: boolean looksFor(Path aPath) {
32: return pathLookedFor.equals(aPath);
33:
34: }
35: }
|