01: /*
02: * (c) Copyright 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
03: * [See end of file]
04: */
05:
06: package com.hp.hpl.jena.rdf.arp;
07:
08: import org.xml.sax.ErrorHandler;
09:
10: /**
11: * Used to set event handlers and options
12: * on {@link ARP}, {@link SAX2Model}, and
13: * {@link SAX2RDF} instances.
14: * @author Jeremy J. Carroll
15: *
16: */
17: public interface ARPConfig {
18: /**
19: * The handlers used during parsing.
20: * The handlers can be changed by calling this method
21: * and then using the <code>set..Handler</code> methods
22: * in {@link ARPHandlers}.
23: * The handlers can be copied onto another ARP instance
24: * using the {@link #setHandlersWith} method.
25: * @see ARPHandlers#setStatementHandler(StatementHandler)
26: * @see ARPHandlers#setErrorHandler(ErrorHandler)
27: * @see ARPHandlers#setExtendedHandler(ExtendedHandler)
28: * @see ARPHandlers#setNamespaceHandler(NamespaceHandler)
29: * @see #setHandlersWith
30: * @return The handlers used during parsing.
31: */
32: public ARPHandlers getHandlers();
33:
34: /**
35: * Copies the handlers from the argument
36: * to be used by this instance.
37: * To make further modifications it is necessary
38: * to call {@link #getHandlers} to retrieve this
39: * instance's copy of the handler information.
40: * @param handlers The new values to use.
41: */
42: public void setHandlersWith(ARPHandlers handlers);
43:
44: /**
45: * The options used during parsing.
46: * The options can be changed by calling this method
47: * and then using the <code>set..</code> methods
48: * in {@link ARPOptions}.
49: * The options can be copied onto another ARP instance
50: * using the {@link #setOptionsWith} method.
51: * @see ARPOptions#setDefaultErrorMode()
52: * @see ARPOptions#setLaxErrorMode()
53: * @see ARPOptions#setStrictErrorMode()
54: * @see ARPOptions#setStrictErrorMode(int)
55: * @see ARPOptions#setEmbedding(boolean)
56: * @see ARPOptions#setErrorMode(int, int)
57: *
58: * @see #setOptionsWith
59: * @return The handlers used during parsing.
60: */
61: public ARPOptions getOptions();
62:
63: /**
64: * Copies the options from the argument
65: * to be used by this instance.
66: * To make further modifications it is necessary
67: * to call {@link #getOptions} to retrieve this
68: * instance's copy of the options.
69: * @param opts The new values to use.
70: */
71: public void setOptionsWith(ARPOptions opts);
72: }
73:
74: /*
75: * (c) Copyright 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
76: * All rights reserved.
77: *
78: * Redistribution and use in source and binary forms, with or without
79: * modification, are permitted provided that the following conditions
80: * are met:
81: * 1. Redistributions of source code must retain the above copyright
82: * notice, this list of conditions and the following disclaimer.
83: * 2. Redistributions in binary form must reproduce the above copyright
84: * notice, this list of conditions and the following disclaimer in the
85: * documentation and/or other materials provided with the distribution.
86: * 3. The name of the author may not be used to endorse or promote products
87: * derived from this software without specific prior written permission.
88: *
89: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
90: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
91: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
92: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
93: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
94: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
95: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
96: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
97: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
98: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
99: */
|