### Saxon.Api

- BinaryResource
- CatalogCollection
- DirectoryCollection
- DocumentBuilder
- DomDestination
- DynamicContext
- DynamicError
- EmptyEnumerator<T>
- ErrorReporter
- ErrorReporterToStaticError
- ErrorReporterWrapper
- ExtensionFunction
- ExtensionFunctionCall
- ExtensionFunctionDefinition
- Feature<T>
- FeatureKeys
- HostLanguage
- ICollectionFinder
- IErrorReporter
- IInvalidityHandler
- IMessageListener
- IMessageListener2
- InvalidityHandlerWrapper
- IPredicate<in XdmItem>
- IQueryResolver
- IResource
- IResourceCollection
- IResourceFactory
- IResultDocumentHandler
- IXmlLocation
- JarCollection
- NamespaceConstant
- NullDestination
- Predicate<T>
- Predicates
- Processor
- QName
- RawDestination
- RecoveryPolicy
- Resource
- ResourceCollection
- SchemaManager
- SchemaResolver
- SchemaValidationMode
- SchemaValidator
- Serializer
- StandardCollectionFinder
- StandardLogger
- StaticContext
- StaticError
- Step<TInput, TResult>
- Steps
- TextWriterDestination
- TreeModel
- URIQueryParameters
- ValidationFailure
- WhitespacePolicy
- XdmAnyArrayType
- XdmAnyFunctionType
- XdmAnyItemType
- XdmAnyMapType
- XdmAnyNodeType
- XdmArray
- XdmAtomicType
- XdmAtomicValue
- XdmAxis
- XdmDestination
  - - TreeProtector
- XdmEmptySequence
- XdmExternalObjectValue
- XdmFunctionItem
- XdmItem
- XdmItemType
- XdmMap
- XdmNode
- XdmNodeKind
- XdmSequenceType
- XdmValue
- XmlDestination
- XmlProcessingError
- XmlResource
- XPathCompiler
- XPathExecutable
- XPathSelector
- XQueryCompiler
- XQueryEvaluator
- XQueryExecutable
- Xslt30Transformer
- XsltCompiler
- XsltExecutable
  - - ParameterDetails
- XsltPackage
- XsltTransformer

### Saxon.Api

# Class ResourceCollection

Direct Known Subclasses
  CatalogCollection, DirectoryCollection, JarCollection

public class ResourceCollection
implements IResourceCollection

ResourceCollection class that implements the IResourceCollection interface. This class is used to map the URI of collection into a sequence of Resource objects. It is used to support the fn:collection() and fn:uri-collection() functions.

### Method Summary
string | CollectionURI() Get the URI of the collection
List<IResource> | GetResources(DynamicContext context) Get the resources in the collection. This supports the fn:collection() function. It is not required that all collections expose a set of resources in this way, or that the resources returned bear any particular relationship to the URIs returned by the getResourceURIs() method for the same collection URI.
List<string> | GetResourceURIs(DynamicContext context) Get the URIs of the resources in the collection. This supports the fn:uri-collection() function.It is not required that all collections expose a list of URIs in this way, or that the URIs bear any particular relationship to the resources returned by the getResources() method for the same collection URI.The URIs that are returned should be suitable for passing to the registered URIResolver (in the case of XML resources), or the { @link UnparsedTextURIResolver } (in the case of unparsed text and JSON resources), etc.
bool | IsStable(DynamicContext context) Ask whether the collection is stable: in this case Saxon will retain the contents of the collection in memory, and will not make a second request on the CollectionFinder for the same collection URI.

## Method Detail

### CollectionURI

public string CollectionURI()

Get the URI of the collection

Returns:

The URI as passed to the fn:collection() or fn:uri-collection() function, resolved if it is relative against the static base URI. If the collection() or uri-collection() function was called with no arguments(to get the "default collection") this will be the URI of the default collection registered with the Configuration.

### GetResources

public List<IResource> GetResources(DynamicContext context)

Get the resources in the collection. This supports the fn:collection() function. It is not required that all collections expose a set of resources in this way, or that the resources returned bear any particular relationship to the URIs returned by the getResourceURIs() method for the same collection URI.

Parameters:

`context` - the XPath evaluation context

Returns:

a List over the resources in the collection. This returns objects of class `Riesource`.

### GetResourceURIs

public List<string> GetResourceURIs(DynamicContext context)

Get the URIs of the resources in the collection. This supports the fn:uri-collection() function.It is not required that all collections expose a list of URIs in this way, or that the URIs bear any particular relationship to the resources returned by the getResources() method for the same collection URI.The URIs that are returned should be suitable for passing to the registered URIResolver (in the case of XML resources), or the { @link UnparsedTextURIResolver } (in the case of unparsed text and JSON resources), etc.

Parameters:

`context` - the XPath evaluation context

Returns:

an iterator over the URIs of the resources in the collection. The URIs are represented as Strings.They should preferably be absolute URIs.

### IsStable

public bool IsStable(DynamicContext context)

Ask whether the collection is stable: in this case Saxon will retain the contents of the collection in memory, and will not make a second request on the CollectionFinder for the same collection URI.

Parameters:

`context` - the XPath dynamic evaluation context (in case the decision is context dependent)