public class DirectoryCollection extends AbstractResourceCollection
AbstractResourceCollection.InputDetails
collectionURI, params
Constructor and Description |
---|
DirectoryCollection(String collectionURI,
File file,
URIQueryParameters params)
Create a directory collection
|
Modifier and Type | Method and Description |
---|---|
protected Iterator<String> |
directoryContents(File directory,
URIQueryParameters params)
Return the contents of a collection that maps to a directory in filestore
|
Iterator<Resource> |
getResources(XPathContext context)
Get the resources in the collection.
|
Iterator<String> |
getResourceURIs(XPathContext context)
Get the URIs of the resources in the collection.
|
getCollectionURI, getInputDetails, guessContentType, isStable, makeResource, optionsFromQueryParameters, registerContentType, registerFileExtension
public DirectoryCollection(String collectionURI, File file, URIQueryParameters params)
collectionURI
- the collection URIfile
- the directory containing the filesparams
- query parameters supplied as part of the URIpublic Iterator<String> getResourceURIs(XPathContext context) throws XPathException
ResourceCollection
context
- the XPath evaluation contextXPathException
- in the event of any error (for example, if the collection URI
is not recognized)public Iterator<Resource> getResources(XPathContext context) throws XPathException
ResourceCollection
context
- the XPath evaluation contextXPathException
- in the event of any error (for example, if the collection URI
is not recognized)protected Iterator<String> directoryContents(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-2014 Saxonica Limited. All rights reserved.