KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > beans > factory > xml > DocumentLoader


1 /*
2  * Copyright 2002-2007 the original author or authors.
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.springframework.beans.factory.xml;
18
19 import org.w3c.dom.Document JavaDoc;
20 import org.xml.sax.EntityResolver JavaDoc;
21 import org.xml.sax.ErrorHandler JavaDoc;
22 import org.xml.sax.InputSource JavaDoc;
23
24 /**
25  * Strategy interface for loading an XML {@link Document}.
26  *
27  * @author Rob Harrop
28  * @since 2.0
29  * @see DefaultDocumentLoader
30  */

31 public interface DocumentLoader {
32
33     /**
34      * Load a {@link Document document} from the supplied {@link InputSource source}.
35      * @param inputSource the source of the document that is to be loaded
36      * @param entityResolver the resolver that is to be used to resolve any entities
37      * @param errorHandler used to report any errors during document loading
38      * @param validationMode the type of validation ({@link XmlBeanDefinitionReader#VALIDATION_NONE none}, {@link XmlBeanDefinitionReader#VALIDATION_DTD DTD}, or {@link XmlBeanDefinitionReader#VALIDATION_XSD XSD})
39      * @param namespaceAware <code>true</code> if the loading is provide support for XML namespaces
40      * @return the loaded {@link Document document}
41      * @throws Exception if an error occurs
42      */

43     Document JavaDoc loadDocument(
44             InputSource JavaDoc inputSource, EntityResolver JavaDoc entityResolver,
45             ErrorHandler JavaDoc errorHandler, int validationMode, boolean namespaceAware)
46             throws Exception JavaDoc;
47
48 }
49
Popular Tags