KickJava   Java API By Example, From Geeks To Geeks.

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


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
21 import org.apache.xerces.xni.XNIException;
22 import org.apache.xerces.xni.XMLResourceIdentifier;
23
24 /**
25  * This interface is used to resolve external parsed entities. The
26  * application can register an object that implements this interface
27  * with the parser configuration in order to intercept entities and
28  * resolve them explicitly. If the registered entity resolver cannot
29  * resolve the entity, it should return <code>null</code> so that the
30  * parser will try to resolve the entity using a default mechanism.
31  *
32  * @see XMLParserConfiguration
33  *
34  * @author Andy Clark, IBM
35  *
36  * @version $Id: XMLEntityResolver.java,v 1.6 2004/10/03 21:58:18 mrglavas Exp $
37  */

38 public interface XMLEntityResolver {
39
40     //
41
// XMLEntityResolver methods
42
//
43

44     /**
45      * Resolves an external parsed entity. If the entity cannot be
46      * resolved, this method should return null.
47      *
48      * @param resourceIdentifier location of the XML resource to resolve
49      *
50      * @throws XNIException Thrown on general error.
51      * @throws IOException Thrown if resolved entity stream cannot be
52      * opened or some other i/o error occurs.
53      * @see org.apache.xerces.xni.XMLResourceIdentifier
54      */

55     public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier)
56         throws XNIException, IOException JavaDoc;
57
58 } // interface XMLEntityResolver
59
Popular Tags