01: package javax.xml.stream;
02:
03: /**
04: * This interface is used to resolve resources during an XML parse. If an application wishes to
05: * perform custom entity resolution it must register an instance of this interface with
06: * the XMLInputFactory using the setXMLResolver method.
07: *
08: * @version 1.0
09: * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
10: */
11: public interface XMLResolver {
12:
13: /**
14: * Retrieves a resource. This resource can be of the following three return types:
15: * (1) java.io.InputStream (2) javax.xml.stream.XMLStreamReader (3) java.xml.stream.XMLEventReader.
16: * If this method returns null the processor will attempt to resolve the entity using its
17: * default mechanism.
18: *
19: * @param publicID The public identifier of the external entity being referenced, or null if none was supplied.
20: * @param systemID The system identifier of the external entity being referenced.
21: * @param baseURI Absolute base URI associated with systemId.
22: * @param namespace The namespace of the entity to resolve.
23: * @return The resource requested or null.
24: * @throws XMLStreamException if there was a failure attempting to resolve the resource.
25: */
26: public Object resolveEntity(String publicID, String systemID,
27: String baseURI, String namespace) throws XMLStreamException;
28: }
|