01: /*
02: * Copyright (c) 2001 World Wide Web Consortium,
03: * (Massachusetts Institute of Technology, Institut National de
04: * Recherche en Informatique et en Automatique, Keio University). All
05: * Rights Reserved. This program is distributed under the W3C's Software
06: * Intellectual Property License. This program is distributed in the
07: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
08: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
09: * PURPOSE.
10: * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11: */
12:
13: package org.apache.xerces.dom3.as;
14:
15: import org.w3c.dom.ls.LSInput;
16: import org.w3c.dom.ls.LSParser;
17:
18: /**
19: * @deprecated
20: * An Abstract Schema parser interface.
21: * <p><code>DOMASBuilder</code> provides an API for parsing Abstract Schemas
22: * and building the corresponding <code>ASModel</code> tree.
23: * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
24: and Save Specification</a>.
25: */
26: public interface DOMASBuilder extends LSParser {
27: /**
28: * Associate an <code>ASModel</code> with a <code>LSParser</code>. This
29: * <code>ASModel</code> will be used by the "
30: * <code>validate-if-schema</code>" and "
31: * <code>datatype-normalization</code>" options during the load of a new
32: * <code>Document</code>.
33: */
34: public ASModel getAbstractSchema();
35:
36: /**
37: * Associate an <code>ASModel</code> with a <code>LSParser</code>. This
38: * <code>ASModel</code> will be used by the "
39: * <code>validate-if-schema</code>" and "
40: * <code>datatype-normalization</code>" options during the load of a new
41: * <code>Document</code>.
42: */
43: public void setAbstractSchema(ASModel abstractSchema);
44:
45: /**
46: * Parse a Abstract Schema from a location identified by an URI reference.
47: * @param uri The location of the Abstract Schema to be read.
48: * @return The newly created Abstract Schema.
49: * @exception DOMASException
50: * Exceptions raised by <code>parseASURI()</code> originate with the
51: * installed ErrorHandler, and thus depend on the implementation of
52: * the <code>DOMErrorHandler</code> interfaces. The default error
53: * handlers will raise a <code>DOMASException</code> if any form of
54: * Abstract Schema inconsistencies or warning occurs during the parse,
55: * but application defined errorHandlers are not required to do so.
56: * <br> WRONG_MIME_TYPE_ERR: Raised when <code>mimeTypeCheck</code> is
57: * <code>true</code> and the input source has an incorrect MIME Type.
58: * See the attribute <code>mimeTypeCheck</code>.
59: * @exception DOMSystemException
60: * Exceptions raised by <code>parseURI()</code> originate with the
61: * installed ErrorHandler, and thus depend on the implementation of
62: * the <code>DOMErrorHandler</code> interfaces. The default error
63: * handlers will raise a DOMSystemException if any form I/O or other
64: * system error occurs during the parse, but application defined error
65: * handlers are not required to do so.
66: */
67: public ASModel parseASURI(String uri) throws DOMASException,
68: Exception;
69:
70: /**
71: * Parse a Abstract Schema from a location identified by an
72: * <code>LSInput</code>.
73: * @param is The <code>LSInput</code> from which the source
74: * Abstract Schema is to be read.
75: * @return The newly created <code>ASModel</code>.
76: * @exception DOMASException
77: * Exceptions raised by <code>parseASURI()</code> originate with the
78: * installed ErrorHandler, and thus depend on the implementation of
79: * the <code>DOMErrorHandler</code> interfaces. The default error
80: * handlers will raise a <code>DOMASException</code> if any form of
81: * Abstract Schema inconsistencies or warning occurs during the parse,
82: * but application defined errorHandlers are not required to do so.
83: * <br> Raise a WRONG_MIME_TYPE_ERR when <code>mimeTypeCheck</code> is
84: * <code>true</code> and the inputsource has an incorrect MIME Type.
85: * See attribute <code>mimeTypeCheck</code>.
86: * @exception DOMSystemException
87: * Exceptions raised by <code>parseURI()</code> originate with the
88: * installed ErrorHandler, and thus depend on the implementation of
89: * the <code>DOMErrorHandler</code> interfaces. The default error
90: * handlers will raise a DOMSystemException if any form I/O or other
91: * system error occurs during the parse, but application defined error
92: * handlers are not required to do so.
93: */
94: public ASModel parseASInputSource(LSInput is)
95: throws DOMASException, Exception;
96:
97: }
|