~ubuntu-branches/ubuntu/karmic/libxerces2-java/karmic

« back to all changes in this revision

Viewing changes to src/org/w3c/dom/ls/DOMImplementationLS.java

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-12-04 17:37:55 UTC
  • mfrom: (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20061204173755-hb6ybrrrk097zhx7
Tags: 2.8.1-1ubuntu1
* Merge with Debian unstable; remaining changes:
  - Build -gcj package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (c) 2004 World Wide Web Consortium,
3
 
 *
4
 
 * (Massachusetts Institute of Technology, European Research Consortium for
5
 
 * Informatics and Mathematics, Keio University). All Rights Reserved. This
6
 
 * work is distributed under the W3C(r) Software License [1] in the hope that
7
 
 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
8
 
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9
 
 *
10
 
 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
11
 
 */
12
 
 
13
 
package org.w3c.dom.ls;
14
 
 
15
 
import org.w3c.dom.DOMException;
16
 
 
17
 
/**
18
 
 *  <code>DOMImplementationLS</code> contains the factory methods for creating 
19
 
 * Load and Save objects. 
20
 
 * <p> The expectation is that an instance of the 
21
 
 * <code>DOMImplementationLS</code> interface can be obtained by using 
22
 
 * binding-specific casting methods on an instance of the 
23
 
 * <code>DOMImplementation</code> interface or, if the <code>Document</code> 
24
 
 * supports the feature <code>"Core"</code> version <code>"3.0"</code> 
25
 
 * defined in [DOM Level 3 Core]
26
 
 * , by using the method <code>DOMImplementation.getFeature</code> with 
27
 
 * parameter values <code>"LS"</code> (or <code>"LS-Async"</code>) and 
28
 
 * <code>"3.0"</code> (respectively). 
29
 
 */
30
 
public interface DOMImplementationLS {
31
 
    // DOMImplementationLSMode
32
 
    /**
33
 
     * Create a synchronous <code>LSParser</code>.
34
 
     */
35
 
    public static final short MODE_SYNCHRONOUS          = 1;
36
 
    /**
37
 
     * Create an asynchronous <code>LSParser</code>.
38
 
     */
39
 
    public static final short MODE_ASYNCHRONOUS         = 2;
40
 
 
41
 
    /**
42
 
     * Create a new <code>LSParser</code>. The newly constructed parser may 
43
 
     * then be configured by means of its <code>DOMConfiguration</code> 
44
 
     * object, and used to parse documents by means of its <code>parse</code>
45
 
     *  method. 
46
 
     * @param mode  The <code>mode</code> argument is either 
47
 
     *   <code>MODE_SYNCHRONOUS</code> or <code>MODE_ASYNCHRONOUS</code>, if 
48
 
     *   <code>mode</code> is <code>MODE_SYNCHRONOUS</code> then the 
49
 
     *   <code>LSParser</code> that is created will operate in synchronous 
50
 
     *   mode, if it's <code>MODE_ASYNCHRONOUS</code> then the 
51
 
     *   <code>LSParser</code> that is created will operate in asynchronous 
52
 
     *   mode. 
53
 
     * @param schemaType  An absolute URI representing the type of the schema 
54
 
     *   language used during the load of a <code>Document</code> using the 
55
 
     *   newly created <code>LSParser</code>. Note that no lexical checking 
56
 
     *   is done on the absolute URI. In order to create a 
57
 
     *   <code>LSParser</code> for any kind of schema types (i.e. the 
58
 
     *   LSParser will be free to use any schema found), use the value 
59
 
     *   <code>null</code>. 
60
 
     * <p ><b>Note:</b>    For W3C XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
61
 
     *   , applications must use the value 
62
 
     *   <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>], 
63
 
     *   applications must use the value 
64
 
     *   <code>"http://www.w3.org/TR/REC-xml"</code>. Other Schema languages 
65
 
     *   are outside the scope of the W3C and therefore should recommend an 
66
 
     *   absolute URI in order to use this method. 
67
 
     * @return  The newly created <code>LSParser</code> object. This 
68
 
     *   <code>LSParser</code> is either synchronous or asynchronous 
69
 
     *   depending on the value of the <code>mode</code> argument. 
70
 
     * <p ><b>Note:</b>    By default, the newly created <code>LSParser</code> 
71
 
     *   does not contain a <code>DOMErrorHandler</code>, i.e. the value of 
72
 
     *   the "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
73
 
     *   error-handler</a>" configuration parameter is <code>null</code>. However, implementations 
74
 
     *   may provide a default error handler at creation time. In that case, 
75
 
     *   the initial value of the <code>"error-handler"</code> configuration 
76
 
     *   parameter on the new <code>LSParser</code> object contains a 
77
 
     *   reference to the default error handler. 
78
 
     * @exception DOMException
79
 
     *    NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is 
80
 
     *   not supported. 
81
 
     */
82
 
    public LSParser createLSParser(short mode, 
83
 
                                   String schemaType)
84
 
                                   throws DOMException;
85
 
 
86
 
    /**
87
 
     *  Create a new <code>LSSerializer</code> object. 
88
 
     * @return The newly created <code>LSSerializer</code> object.
89
 
     * <p ><b>Note:</b>    By default, the newly created 
90
 
     *   <code>LSSerializer</code> has no <code>DOMErrorHandler</code>, i.e. 
91
 
     *   the value of the <code>"error-handler"</code> configuration 
92
 
     *   parameter is <code>null</code>. However, implementations may 
93
 
     *   provide a default error handler at creation time. In that case, the 
94
 
     *   initial value of the <code>"error-handler"</code> configuration 
95
 
     *   parameter on the new <code>LSSerializer</code> object contains a 
96
 
     *   reference to the default error handler. 
97
 
     */
98
 
    public LSSerializer createLSSerializer();
99
 
 
100
 
    /**
101
 
     *  Create a new empty input source object where 
102
 
     * <code>LSInput.characterStream</code>, <code>LSInput.byteStream</code>
103
 
     * , <code>LSInput.stringData</code> <code>LSInput.systemId</code>, 
104
 
     * <code>LSInput.publicId</code>, <code>LSInput.baseURI</code>, and 
105
 
     * <code>LSInput.encoding</code> are null, and 
106
 
     * <code>LSInput.certifiedText</code> is false. 
107
 
     * @return  The newly created input object. 
108
 
     */
109
 
    public LSInput createLSInput();
110
 
 
111
 
    /**
112
 
     *  Create a new empty output destination object where 
113
 
     * <code>LSOutput.characterStream</code>, 
114
 
     * <code>LSOutput.byteStream</code>, <code>LSOutput.systemId</code>, 
115
 
     * <code>LSOutput.encoding</code> are null. 
116
 
     * @return  The newly created output object. 
117
 
     */
118
 
    public LSOutput createLSOutput();
119
 
 
120
 
}