public class DirectoryCollection extends AbstractResourceCollection
AbstractResourceCollection.InputDetails
collectionURI, config, params
Constructor and Description |
---|
DirectoryCollection(Configuration config,
java.lang.String collectionURI,
java.io.File file,
URIQueryParameters params)
Create a directory collection
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Iterator<java.lang.String> |
directoryContents(java.io.File directory,
URIQueryParameters params)
Return the contents of a collection that maps to a directory in filestore
|
java.util.Iterator<Resource> |
getResources(XPathContext context)
Get the resources in the collection.
|
java.util.Iterator<java.lang.String> |
getResourceURIs(XPathContext context)
Get the URIs of the resources in the collection.
|
boolean |
stripWhitespace(SpaceStrippingRule rules)
Supply information about the whitespace stripping rules that apply to this collection.
|
getCollectionURI, getInputDetails, guessContentType, isStable, makeResource, makeResource, optionsFromQueryParameters, registerContentType
public DirectoryCollection(Configuration config, java.lang.String collectionURI, java.io.File file, URIQueryParameters params) throws XPathException
collectionURI
- the collection URIfile
- the directory containing the filesparams
- query parameters supplied as part of the URIXPathException
public boolean stripWhitespace(SpaceStrippingRule rules)
stripWhitespace
in interface ResourceCollection
stripWhitespace
in class AbstractResourceCollection
rules
- the space-stripping rules that apply to this collection, derived from
the xsl:strip-space and xsl:preserve-space declarations in the stylesheet
package containing the call to the collection() function.public java.util.Iterator<java.lang.String> getResourceURIs(XPathContext context) throws XPathException
ResourceCollection
UnparsedTextURIResolver
(in the case of unparsed text and JSON resources), etc.context
- the XPath evaluation contextXPathException
- in the event of any error (for example, if the collection URI
is not recognized)public java.util.Iterator<Resource> getResources(XPathContext context) throws XPathException
ResourceCollection
context
- the XPath evaluation contextResource
.XPathException
- in the event of any error (for example, if the collection URI
is not recognized)protected java.util.Iterator<java.lang.String> directoryContents(java.io.File directory, URIQueryParameters params)
directory
- the directory to be processedparams
- parameters indicating whether to process recursively, what to do on
errors, and which files to selectCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.