public class CatalogCollection extends AbstractResourceCollection
AbstractResourceCollection.InputDetails
collectionURI, config, params
Constructor and Description |
---|
CatalogCollection(Configuration config,
java.lang.String collectionURI) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Iterator<java.lang.String> |
catalogContents(java.lang.String href,
XPathContext context)
Return a collection defined as a list of URIs in a catalog file
|
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 |
isStable(XPathContext context)
Ask whether the collection is stable.
|
static java.lang.StringBuilder |
makeStringBuilderFromStream(java.io.InputStream in,
java.lang.String encoding)
Return a StringBuilder initialized to the contents of an InputStream
|
getCollectionURI, getInputDetails, guessContentTypeFromContent, guessContentTypeFromName, makeResource, makeResource, makeTypedResource, optionsFromQueryParameters, registerContentType, setupErrorHandlingForCollection, stripWhitespace
public CatalogCollection(Configuration config, java.lang.String collectionURI)
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)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.FeatureKeys.STABLE_COLLECTION_URI
is set.public static java.lang.StringBuilder makeStringBuilderFromStream(java.io.InputStream in, java.lang.String encoding) throws java.io.IOException
in
- the input stream (which is consumed by this method)java.io.IOException
- if an error occurs reading the resourceprotected java.util.Iterator<java.lang.String> catalogContents(java.lang.String href, XPathContext context) throws XPathException
href
- the absolute URI of the catalog filecontext
- the dynamic evaluation contextXPathException
- if any failures occurCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.