Catalog
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 |
---|---|---|
EntityType[] |
Return an array of the entity types available in this Catalog |
|
string[] |
Get the names of the collections |
|
IHubCollection[] |
Get the collections array. Returns simple objects not Collection instances |
|
IGalleryDisplayConfig |
Return the display configuration for the gallery |
|
number |
Return the schema version |
|
ICatalogScope |
Return the existing scopes hash |
|
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 |
|
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 |
|
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
StaticParameters
Parameter | Type | Default | Notes |
---|---|---|---|
json Required | IHubCatalog | ||
context Optional | IArcGISContext |
Returns
init
StaticFetch 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 | {
|
is possible, pass the hubEntityType to improve fetching performance |
Returns
addCollection
Add a collection
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
collection Required | IHubCollection |
Returns
contains
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
identifier Required | string | ||
options Required | IContainsOptions |
Returns
getCustomCollection
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
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
Get the scope's query for a particular entity type
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
type Required | EntityType |
Returns
searchCollections
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
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
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
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
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
Set the scope for a specific entity type
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
type Required | EntityType | ||
query Required | IQuery |
Returns
Class defined in common/src/search/Catalog.ts:37
Create a Catalog instance from a Catalog Definition Json object