import UnitIdentifierManager from "@arcgis/core/networks/UnitIdentifierManager.js";const UnitIdentifierManager = await $arcgis.import("@arcgis/core/networks/UnitIdentifierManager.js");- Inheritance:
- UnitIdentifierManager→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.34
A UnitIdentifierManager provides access to unit identifier management capabilities for a telecom domain network in a utility network.
Example
const utilityNetwork = new UtilityNetwork({ layerUrl: "https://host.com/arcgis/rest/services/Test/FeatureServer/0",});
await utilityNetwork.load();
const unitIdentifierManager = await utilityNetwork.getUnitIdentifierManager();Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
declaredClass readonly inherited | ||
featureServiceUrl readonly | | |
gdbVersion readonly | | |
historicMoment readonly | | |
networkServiceUrl readonly | | |
utilityNetwork readonly | |
featureServiceUrl
- Type
- string
Returns the root feature service URL which the utility network is part of.
Example
`https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/FeatureServer/` gdbVersion
The version of the geodatabase of the feature service data used by the utility network. Read the Overview of versioning topic for more details about this capability.
networkServiceUrl
- Type
- string
The URL of the network server.
Example
`https://utilitynetwork.esri.com/server/rest/services/NapervilleElectric/UtilityNetworkServer/` utilityNetwork
- Type
- UtilityNetwork
The UtilityNetwork that contains the telecom domain network being managed.
Methods
| Method | Signature | Class |
|---|---|---|
fromJSON inherited static | fromJSON(json: any): any | |
insertGap(container: UnitIdentifier, firstUnit: number, numUnits: number): Promise<void> | | |
query(containers: UnitIdentifier[]): Promise<UnitQueryResult[]> | | |
reset(containers: UnitIdentifier[]): Promise<void> | | |
resize(content: UnitIdentifier, numUnits: number): Promise<void> | | |
toJSON inherited | toJSON(): any |
fromJSON
- Signature
-
fromJSON (json: any): any
Creates a new instance of this class and initializes it with values from a JSON object
generated from an ArcGIS product. The object passed into the input json
parameter often comes from a response to a query operation in the REST API or a
toJSON()
method from another ArcGIS product. See the Using fromJSON()
topic in the Guide for details and examples of when and how to use this function.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. | |
- Returns
- any
Returns a new instance of this class.
insertGap
- Signature
-
insertGap (container: UnitIdentifier, firstUnit: number, numUnits: number): Promise<void>
Shifts existing records in the containment hierarchy of a unit container's NextUnitID sequence to reserve a range of unit IDs in a telecom domain network.
When a gap is inserted at the end of the sequence, the NEXTUNITID attribute value for the unit container increases.
If a gap is inserted into the middle of an existing sequence, the system will attempt to shift existing
records to accommodate the reserved space. The operation will fail and return an error if the reservation requires
regrouping an object or occurs in the middle of a connectivity assignment.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| container | The unit container to insert a gap into. | | |
| firstUnit | The first unit for the gap to be introduced. | | |
| numUnits | The number of units in the gap. | |
query
- Signature
-
query (containers: UnitIdentifier[]): Promise<UnitQueryResult[]>
Returns unit identifiers for, and existing gaps in, a unit container feature's containment hierarchy in a telecom domain network.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| containers | The unit container features or objects to query. | |
- Returns
- Promise<UnitQueryResult[]>
Resolves to an array of objects describing the unit identifiers and gaps for the specified unit containers.
reset
- Signature
-
reset (containers: UnitIdentifier[]): Promise<void>
Resets the unit identifiers associated with one or more unit container features in a telecom domain network. This is done to condense the unit identifier space or overcome unit identifier sequence exhaustion.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| containers | The unit container features or objects to be reset. | |
resize
- Signature
-
resize (content: UnitIdentifier, numUnits: number): Promise<void>
Alters the number of units associated with a unit identifier feature in a telecom domain network.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| content | The unit identifiable feature or object being resized. | | |
| numUnits | The number of units for the feature or object to be resized to. | |
toJSON
- Signature
-
toJSON (): any
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
- Returns
- any
The ArcGIS portal JSON representation of an instance of this class.