Debian Codegraph @

net/sf/saxon/lib/ResourceFactory.java

raw symbols SCIP
1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2018 Saxonica Limited.
3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4 // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
6 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
7
8 package net.sf.saxon.lib;
9
10 import net.sf.saxon.Configuration;
11 import net.sf.saxon.resource.AbstractResourceCollection;
12 import net.sf.saxon.trans.XPathException;
13
14 /**
15 * A ResourceFactory is used for constructing a particular type of resource
16 */
17
18 public interface ResourceFactory {
19 /**
20 * Create a Resource with given content
21 * @param config the Saxon configuration
22 * @param resourceURI the URI identifying the resource
23 * @param contentType the content type ( = media type or MIME type) of the resource
24 * @param details the stream of bytes making up the binary content of the resource
25 * @return the resource
26 * @throws XPathException if a failure occurs creating the resource
27 */
28 Resource makeResource(Configuration config, String resourceURI, String contentType, AbstractResourceCollection.InputDetails details)
29 throws XPathException;
30 }
31