KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xni > parser > XMLDocumentScanner


1 /*
2  * Copyright 2001, 2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.xni.parser;
18
19 import java.io.IOException JavaDoc;
20 import org.apache.xerces.xni.XNIException;
21
22 /**
23  * This interface defines a generic document scanner. This interface
24  * allows a scanner to be used interchangably in existing parser
25  * configurations.
26  * <p>
27  * If the parser configuration uses a document scanner that implements
28  * this interface, components should be able to query the scanner
29  * instance from the component manager using the following property
30  * identifier:
31  * <blockquote>
32  * "http://apache.org/xml/properties/internal/document-scanner"
33  * </blockquote>
34  *
35  * @author Andy Clark, IBM
36  *
37  * @version $Id: XMLDocumentScanner.java,v 1.5 2004/02/24 23:15:56 mrglavas Exp $
38  */

39 public interface XMLDocumentScanner
40     extends XMLDocumentSource {
41
42     //
43
// XMLDocumentScanner methods
44
//
45

46     /**
47      * Sets the input source.
48      *
49      * @param inputSource The input source.
50      *
51      * @throws IOException Thrown on i/o error.
52      */

53     public void setInputSource(XMLInputSource inputSource) throws IOException JavaDoc;
54
55     /**
56      * Scans a document.
57      *
58      * @param complete True if the scanner should scan the document
59      * completely, pushing all events to the registered
60      * document handler. A value of false indicates that
61      * that the scanner should only scan the next portion
62      * of the document and return. A scanner instance is
63      * permitted to completely scan a document if it does
64      * not support this "pull" scanning model.
65      *
66      * @return True if there is more to scan, false otherwise.
67      */

68     public boolean scanDocument(boolean complete)
69         throws IOException JavaDoc, XNIException;
70
71 } // interface XMLDocumentScanner
72
Popular Tags