public class CatalogCollection extends AbstractResourceCollection
AbstractResourceCollection.InputDetails
Modifier and Type | Field and Description |
---|---|
static HashMap<String,String> |
mimeTypeMap |
collectionURI, config, params
Constructor and Description |
---|
CatalogCollection(Configuration config,
String collectionURI) |
Modifier and Type | Method and Description |
---|---|
protected Iterator<String> |
catalogContents(String href,
XPathContext context)
Return a collection defined as a list of URIs in a catalog file
|
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.
|
boolean |
isStable(XPathContext context)
Ask whether the collection is stable.
|
static StringBuilder |
makeStringBuilderFromStream(InputStream in,
String encoding) |
static void |
putMimeTypeMap(String contentType,
String extension) |
boolean |
stripWhitespace(SpaceStrippingRule rules)
Supply information about the whitespace stripping rules that apply to this collection.
|
getCollectionURI, getInputDetails, guessContentType, makeResource, makeResource, optionsFromQueryParameters, registerContentType
public CatalogCollection(Configuration config, String collectionURI)
public boolean stripWhitespace(SpaceStrippingRule rules)
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 Iterator<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 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)public boolean isStable(XPathContext context)
AbstractResourceCollection
ResourceCollection.getResources(XPathContext)
or ResourceCollection.getResourceURIs(XPathContext)
isStable
in interface ResourceCollection
isStable
in class AbstractResourceCollection
context
- the XPath evaluation context.public static StringBuilder makeStringBuilderFromStream(InputStream in, String encoding) throws IOException
IOException
protected Iterator<String> catalogContents(String href, XPathContext context) throws XPathException
href
- the absolute URI of the catalog filecontext
- the dynamic evaluation contextXPathException
- if any failures occurCopyright (c) 2004-2017 Saxonica Limited. All rights reserved.