Catalog

Class

Catalog Class

Abstracts working with Catalogs and fetching collections with the correct scope applied.

For more information, check out the Catalog & Collection Guide

Implements

Accessors

Accessor Type Notes
availableScopes EntityType[]

Return an array of the entity types available in this Catalog

collectionNames string[]

Get the names of the collections

collections IHubCollection[]

Get the collections array. Returns simple objects not Collection instances

displayConfig IGalleryDisplayConfig

Return the display configuration for the gallery

schemaVersion number

Return the schema version

scopes ICatalogScope

Return the existing scopes hash

title string

Title getter Title setter

Methods

Method Returns Notes
Catalog

Create a Catalog instance from a Catalog Definition Json object

Promise<Catalog>

Fetch a catalog At this point, it returns the .catalog property from the entity

void

Add a collection

Promise<IContainsResponse>
Collection

Get a Collection instance by name

IHubCollection

Get the Collection json by name

Collection

Get a Collection instance, based on a specific entity type and filters This extends from the base scope for the entity type

IHubCollection

Create a custom collection based on a specific entity type and filters Returned collection extends from the base scope for the entity type

IQuery | undefined

Get the scope's query for a particular entity type

Promise<ISearchResponseHash>

Execute a term search against all the collections in the Catalog or an IQuery against all collections that match the targetEntity. Note: This will not search scopes which do not have corresponding collections. If you want that behavior, use searchCatalogs function instead.

Promise<IHubSearchResponse<IHubSearchResult>>

Search for Groups Will throw if the Catalog does not have a scope defined for groups

Promise<IHubSearchResponse<IHubSearchResult>>

Search for Items Will throw if the Catalog does not have a scope defined for items

Promise<ISearchResponseHash>

Execute a term search against all the scopes in the Catalog

Promise<IHubSearchResponse<IHubSearchResult>>

Search for Users Will throw if the Catalog does not have a scope defined for users

void

Set the scope for a specific entity type

IHubCatalog

Return the JSON object backing the instance

fromJson

Static Static Class Method

Create a Catalog instance from a Catalog Definition Json object

Parameters

Parameter Type Default Notes
json Required IHubCatalog
context Optional IArcGISContext

Returns

init

Static Static Class Method

Fetch a catalog At this point, it returns the .catalog property from the entity

Parameters

Parameter Type Default Notes
identifier Required string

url, guid, cuid

context Optional IArcGISContext
options Optional {
hubEntityType:
HubEntityType
prop:
string
}

is possible, pass the hubEntityType to improve fetching performance

Returns

Promise<Catalog>

addCollection

Class Method

Add a collection

Parameters

Parameter Type Default Notes
collection Required IHubCollection

Returns

void

contains

Class Method

Parameters

Parameter Type Default Notes
identifier Required string
options Required IContainsOptions

Returns

getCollection

Class Method

Get a Collection instance by name

Parameters

Parameter Type Default Notes
name Required string

Returns

getCollectionJson

Class Method

Get the Collection json by name

Parameters

Parameter Type Default Notes
name Required string

Returns

getCustomCollection

Class Method

Get a Collection instance, based on a specific entity type and filters This extends from the base scope for the entity type

Parameters

Parameter Type Default Notes
type Required EntityType
filters Required IFilter[]

Returns

getCustomCollectionJson

Class Method

Create a custom collection based on a specific entity type and filters Returned collection extends from the base scope for the entity type

Parameters

Parameter Type Default Notes
type Required EntityType
filters Required IFilter[]

Returns

getScope

Class Method

Get the scope's query for a particular entity type

Parameters

Parameter Type Default Notes
type Required EntityType

Returns

IQuery | undefined

searchCollections

Class Method

Execute a term search against all the collections in the Catalog or an IQuery against all collections that match the targetEntity. Note: This will not search scopes which do not have corresponding collections. If you want that behavior, use searchCatalogs function instead.

Parameters

Parameter Type Default Notes
query Required string | IQuery

string or IQuery

options Optional IHubSearchOptions {}

Returns

searchGroups

Class Method

Search for Groups Will throw if the Catalog does not have a scope defined for groups

Parameters

Parameter Type Default Notes
query Required string | IQuery

string or IQuery

options Optional IHubSearchOptions

Returns

searchItems

Class Method

Search for Items Will throw if the Catalog does not have a scope defined for items

Parameters

Parameter Type Default Notes
query Required string | IQuery

string or IQuery

options Optional IHubSearchOptions

Returns

searchScopes

Class Method

Execute a term search against all the scopes in the Catalog

Parameters

Parameter Type Default Notes
query Required string | IQuery

term or IQuery

options Optional IHubSearchOptions {}
limitTo Optional EntityType[]

Returns

searchUsers

Class Method

Search for Users Will throw if the Catalog does not have a scope defined for users

Parameters

Parameter Type Default Notes
query Required string | IQuery

string or IQuery

options Optional IHubSearchOptions {}

Returns

setScope

Class Method

Set the scope for a specific entity type

Parameters

Parameter Type Default Notes
type Required EntityType
query Required IQuery

Returns

void

toJson

Class Method

Return the JSON object backing the instance

Returns


Class defined in common/src/search/Catalog.ts:37