deepContains

Function

Check if a particular entity is contained in a catalog.

Unlike Catalog.contains(...), this function can checks multiple catalogs to validate transitive containment.

Scenario:

  • Site 00a's Catalog contains Initiative 00b.
  • Initiative 00b's Catalog contains Project 00c.
  • Project 00c's catalog contains Dataset 00d.

Problem: Validate that 00d should be displayed in the context of 00a.

Logic:

  • Check if 00d is contained in 00c's catalog
  • Check if 00c is contained in 00b's catalog
  • Check if 00b is contained in 00a's catalog If all three are true, then 00d is considered contained in 00a's catalog.

Parameters

Parameter Type Default Notes
identifier Required string
hierarchy Required IDeepCatalogInfo[]
context Required IArcGISContext

Returns

Property Type Notes
identifier string
isContained boolean
catalogInfo Optional Record<stringICatalogInfo>

Cacheable information about the catalogs

duration Optional number

How long did it take to check containment?


Function defined in common/src/core/_internal/deepContains.ts:28