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: /**
16: * @deprecated
17: * Abstract Schemas operations may throw a <code>DOMSystemException</code> as
18: * described in their descriptions.
19: * <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
20: and Save Specification</a>.
21: */
22: public class DOMASException extends RuntimeException {
23: public DOMASException(short code, String message) {
24: super (message);
25: this .code = code;
26: }
27:
28: public short code;
29: // ASExceptionCode
30: /**
31: * If an element declaration already exists with the same name within an
32: * <code>AS_CHOICE</code> operator.
33: */
34: public static final short DUPLICATE_NAME_ERR = 1;
35: /**
36: * If the type of the <code>ASObject</code> is neither an
37: * <code>ASContentModel</code> nor an <code>ASElementDeclaration</code>.
38: */
39: public static final short TYPE_ERR = 2;
40: /**
41: * If the <code>DocumentEditAS</code> related to the node does not have
42: * any active <code>ASModel</code> and <code>wfValidityCheckLevel</code>
43: * is set to <code>PARTIAL</code> or <code>STRICT_VALIDITY_CHECK</code>.
44: */
45: public static final short NO_AS_AVAILABLE = 3;
46: /**
47: * When <code>mimeTypeCheck</code> is <code>true</code> and the input
48: * source has an incorrect MIME Type. See the attribute
49: * <code>mimeTypeCheck</code>.
50: */
51: public static final short WRONG_MIME_TYPE_ERR = 4;
52:
53: }
|