public class StandardCollectionFinder extends java.lang.Object implements CollectionFinder
ResourceCollection
DirectoryCollection
isJarFileURI(String)
returns
true, the URI is treated as identifying a JAR or ZIP archive, whose contents form the
resources in the collection: it is returned as an instance of JarCollection
URIResolver
Constructor and Description |
---|
StandardCollectionFinder() |
Modifier and Type | Method and Description |
---|---|
static void |
checkFileExists(java.io.File file,
java.net.URI resolvedURI,
XPathContext context) |
ResourceCollection |
findCollection(XPathContext context,
java.lang.String collectionURI)
Locate the collection of resources corresponding to a collection URI.
|
protected boolean |
isJarFileURI(java.lang.String collectionURI)
Ask whether the collection URI should be interpreted as identifying a JAR (or ZIP) file.
|
public ResourceCollection findCollection(XPathContext context, java.lang.String collectionURI) throws XPathException
findCollection
in interface CollectionFinder
context
- The XPath dynamic evaluation contextcollectionURI
- The collection URI: an absolute URI, formed by resolving the argument
supplied to the fn:collection or fn:uri-collection against the static
base URIXPathException
- if the collection URI cannot be resolved to a collectionprotected boolean isJarFileURI(java.lang.String collectionURI)
The set of URIs recognized as ZIP collections can also be extended by setting the
configuration property Feature.ZIP_URI_PATTERN
.
collectionURI
- the requested absolute collection URIpublic static void checkFileExists(java.io.File file, java.net.URI resolvedURI, XPathContext context) throws XPathException
XPathException
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.