01: /*
02: * This file or a portion of this file is licensed under the terms of
03: * the Globus Toolkit Public License, found in file ../GTPL, or at
04: * http://www.globus.org/toolkit/download/license.html. This notice must
05: * appear in redistributions of this file, with or without modification.
06: *
07: * Redistributions of this Software, with or without modification, must
08: * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
09: * some other similar material which is provided with the Software (if
10: * any).
11: *
12: * Copyright 1999-2004 University of Chicago and The University of
13: * Southern California. All rights reserved.
14: */
15: package org.griphyn.vdl.euryale;
16:
17: import org.griphyn.vdl.dax.*;
18: import java.util.List;
19: import java.util.Map;
20:
21: /**
22: * This interfaces defines the callback calls from DAX parsing. A slim
23: * and memory-efficient parser of DAX is expected to implement these
24: * callbacks, and generate its own information on the fly.
25: *
26: * @author Kavitha Ranganathan
27: * @author Jens-S. Vöckler
28: * @author Yong Zhao
29: * @version $Revision: 289 $
30: */
31: public interface Callback {
32: /**
33: * Callback when the opening tag was parsed. This contains all
34: * attributes and their raw values within a map. This callback can
35: * also be used to initialize callback-specific resources.
36: *
37: * @param attributes is a map of attribute key to attribute value
38: */
39: public void cb_document(java.util.Map attributes);
40:
41: /**
42: * Callback when the section 1 filenames are being parsed.
43: *
44: * @param filename is a DAX-style filename elements.
45: */
46: public void cb_filename(Filename filename);
47:
48: /**
49: * Callback for the job from section 2 jobs. These jobs are completely
50: * assembled, but each is passed separately.
51: *
52: * @param job is the DAX-style job.
53: */
54: public void cb_job(Job job);
55:
56: /**
57: * Callback for child and parent relationships from section 3.
58: *
59: * @param child is the IDREF of the child element.
60: * @param parents is a list of IDREFs of the included parents.
61: */
62: public void cb_parents(String child, java.util.List parents);
63:
64: /**
65: * Callback when the parsing of the document is done. While this state
66: * could also be determined from the return of the invocation of the
67: * parser, that return may be hidden in another place of the code.
68: * This callback can be used to free callback-specific resources.
69: */
70: public void cb_done();
71:
72: }
|