AbstractArcGISLayerFolderDataSource

Interface

There is no actual ArcGIS "LayerFolder" service, this interface defines the common behavior of these service: MapService, FeatureService, SceneService, and GroupLayerService

Inheritance: AbstractArcGISLayerFolderDataSourceDataSourceJSAPILayerMixinItemMixin

Properties

Hide inherited properties
PropertyTypeNotes
belongToDataSource
 inherited 

The data source which this data source derives from.

count
 inherited 
number

The total records count depends on the current query

dataViewId
 inherited 
string

The data view ID configured in Json.

id
 inherited 
string

The data source ID.

isDataSourceSet
 inherited 
boolean

Whether a data source contains child data sources. A dataset data source should create all its child data sources before ready() is resolved.

isDataView
 inherited 
boolean

True means the data source is a data view. For local data source, this is false even the local data source is created from a data view.

isLocal
 inherited 
boolean

True means the data source is a local data source.

layer
 inherited 
Layer | ArcGISSubLayer

1 How to use ArcGIS Maps SDK for JavaScript layer 1.1 a data source may have a layer, the layer is only used to communicate with Maps SDK for JavaScript (get popupTemplate, symbol and so on), if want to query features, should use data source instance. 1.2 main data source and all other data views/local data source share the same layer. 1.3 selection view create a new layer when do query, but doesn't save the layer. 1.4 if widget needs an ArcGIS Maps SDK for JavaScript layer, call data source.createJSAPILayerByDataSource() to create a new layer, do not use layer in data source instance directly, to apply data source changes to the new layer, see 2.2.

localId
 inherited 
string

The local ID of the data source.

order
 inherited 
number

Order in the parent data source.

parentDataSource
 inherited 

The parent data source of this data source, mull means it's a root data source.

type
 inherited 
string

The type of the data source

belongToDataSource

optionalinherited
Interface Property
belongToDataSource: DataSource

The data source which this data source derives from.

count

optionalinherited
Interface Property
count: number

The total records count depends on the current query

Inherited from DataSource.count

dataViewId

optionalinherited
Interface Property
dataViewId: string

The data view ID configured in Json.

Inherited from DataSource.dataViewId

id

inherited
Interface Property
id: string

The data source ID.

Inherited from DataSource.id

isDataSourceSet

inherited
Interface Property
isDataSourceSet: boolean

Whether a data source contains child data sources. A dataset data source should create all its child data sources before ready() is resolved.

isDataView

inherited
Interface Property
isDataView: boolean

True means the data source is a data view. For local data source, this is false even the local data source is created from a data view.

Inherited from DataSource.isDataView

isLocal

inherited
Interface Property
isLocal: boolean

True means the data source is a local data source.

Inherited from DataSource.isLocal

layer

optionalinherited
Interface Property
layer: Layer | ArcGISSubLayer

1 How to use ArcGIS Maps SDK for JavaScript layer 1.1 a data source may have a layer, the layer is only used to communicate with Maps SDK for JavaScript (get popupTemplate, symbol and so on), if want to query features, should use data source instance. 1.2 main data source and all other data views/local data source share the same layer. 1.3 selection view create a new layer when do query, but doesn't save the layer. 1.4 if widget needs an ArcGIS Maps SDK for JavaScript layer, call data source.createJSAPILayerByDataSource() to create a new layer, do not use layer in data source instance directly, to apply data source changes to the new layer, see 2.2.

2 How to listen data source changes via DataSourceComponent 2.1 if widget loads records, use onDataSourceInfoChange to listen selected records change, query params change and loaded records change. 2.2 if widget doesn't load records (use a Maps SDK for JavaScript widget and needs an ArcGIS Maps SDK for JavaScript layer), use onQueryRequired to listen query params change, use onSelectionChange to listen selected records change.

3 Relation between output data source and origin data source 3.1 if schema is not changed (e.g. query output) and only has one origin data source, will use origin data source's layerDefinition, popupInfo and Maps SDK for JavaScript layer. 3.2 if schema is changed (e.g. chart output), need widget to set layerDefinition, popupInfo and Maps SDK for JavaScript layer to data source instance.

Inherited from JSAPILayerMixin.layer

localId

optionalinherited
Interface Property
localId: string

The local ID of the data source.

Inherited from DataSource.localId

order

optionalinherited
Interface Property
order: number

Order in the parent data source.

Inherited from DataSource.order

parentDataSource

inherited
Interface Property
parentDataSource: DataSource

The parent data source of this data source, mull means it's a root data source.

type

inherited
Interface Property
type: string

The type of the data source

Inherited from DataSource.type

Methods

Hide inherited methods
MethodReturnsNotes
addSourceVersion()
 inherited 
void

When current data source is created from an array of records, it will be saved in sourceRecords. Add the version of sourceRecords.setSourceRecords will add the version by default.

addVersion()
 inherited 
void

Update data source version.

buildRecord(data)
 inherited 

Builds a data record only -- does not add the record into data source.

changeGDBVersion(gdbVersion)
void

Change the GDB version for all layers in the service.

clearRecords()
 inherited 
void

This function will clear the loaded records and won't clear the sourceRecords. Once the loaded records are cleared, the version in the data source info will be updated.

clearSourceRecords()
 inherited 
void

Clear both sourceRecords and loaded records. Both source version and version in data source info will be updated.

fetchSchema()
 inherited 

Fetch the data schema from an actual data source. If it's a statistic data source, the schema will not be fetched.

getAllChildDataSources()
 inherited 

Return all child data sources of a parent data source, includes the grandchildren

Return the derived data views and local data sources.

getChildDataSource(jimuChildId)
 inherited 

Get child data source by jimuChildId. You can get jimuChildId by getJimuChildId().

getChildDataSources()
 inherited 

Return child data sources of a parent data source.

getCountStatus()
 inherited 

Return data source count status.

getDataSourceJson()
 inherited 
IMDataSourceJson

The data source JSON object in app config.

getDataView(dataViewId)
 inherited 

Get data view by data view ID.

getDataViews()
 inherited 

Return all data views created from a main data source.

string

Get the service GDB version.

getIdField()
 inherited 
string

Return the data source ID field.

getInfo()
 inherited 
IMDataSourceInfo

Return the data source info in redux store.

getLabel()
 inherited 
string

Return data source label.

getListenSelection()
 inherited 
boolean

Return whether listen selection.

getLocalDataSource(localId)
 inherited 

Get local data source by local ID.

getLocalDataSources()
 inherited 

Return all local data sources created from a main data source or data view.

getMainDataSource()
 inherited 

Return the main data source.

getRecord(index)
 inherited 

Get record by index

getRecordById(id)
 inherited 

Get record by ID

getRecords()
 inherited 

Get records

If selected records are not loaded in the current data source, they will be concatenated to the end of records array. For example, record 1 is selected in data view 1 and it is not loaded in data view 2 (record 1 actually matches query params of data view 2), dataView2.getRecordsWithSelection() will return all loaded records in data view 2 and record 1.

getRootDataSource()
 inherited 

Return the root data source.

getSchema()
 inherited 

The schema returned here is the merged result of the configured schema and the fetched schema.

getSelectedRecordIds()
 inherited 
string[]

Get selected record IDs

number[]

Get selected record indexes

getSelectedRecords()
 inherited 

Get selected records

getSourceRecords()
 inherited 

Return the source records

getSourceVersion()
 inherited 
number

When current data source is created from an array of records, it will be saved in sourceRecords. Return the version of sourceRecords.

getStatus()
 inherited 

Return data source status.

getVersion()
 inherited 
number

Return data source version.

isInAppConfig()
 inherited 
boolean

Return whether the data source is added in builder and is saved in app config.

ready()
 inherited 
Promise<any>

Ready is resolved means the data source instance is ready for use.

selectRecordById(id, record?, forceCheck?)
 inherited 
void

Select a record by ID. When select record by ID, we can pass in the record. So when the selected record is not loaded, we can add it in. If forceCheck is true, will check whether the record match filters of the data source or not. Will select the record only if the check is passed.

selectRecordsByIds(ids, records?, forceCheck?)
 inherited 
void

Select records by IDs. When select records by IDs, we can pass in the records. So when the selected records are not loaded, we can add them in. If forceCheck is true, will check whether these records match filters of the data source or not. Will select the records which check is passed.

setCountStatus(status)
 inherited 
void

Update data source count status.

setDataSourceJson(dsJson)
 inherited 
void

Update data source JSON in data source instance

setListenSelection(listen)
 inherited 
void

Whether listen selected records from other data sources which are derived from the same main data source. If true, will update selected record IDs of current data source info when selecting records via other derived data sources. Will also update selected record IDs when selecting records via current data source itself. If false, won't change selected record IDs when selecting records via other derived data sources. Will update selected record IDs only when selecting records via current data source itself.

setRecords(records)
 inherited 
void

Update the records in the data source object only, does not update the source data. See DataSourceEditSourceOperations.updateRecords

setSourceRecords(records)
 inherited 
void

When current data source is created from an array of records, will save it in sourceRecords. These two methods are use to update or get the source data.

setStatus(status)
 inherited 
void

Update data source status.

updateSelectionInfo(ids, triggerDataSource, forceCheck?)
 inherited 
void

Update selected record IDs in data source info if the current data source listens selection change (see setListenSelection) or the current data source is the trigger data source (that is to say, select via it).

addSourceVersion

inherited
Interface Method
addSourceVersion(): void

When current data source is created from an array of records, it will be saved in sourceRecords. Add the version of sourceRecords.setSourceRecords will add the version by default.

Returns 
void

addVersion

optionalinherited
Interface Method
addVersion(): void

Update data source version.

Returns 
void
Inherited from DataSource.addVersion

buildRecord

inherited
Interface Method
buildRecord(dataany): DataRecord

Builds a data record only -- does not add the record into data source.

Parameters
ParameterType
data
any
Returns 
DataRecord
Inherited from DataSource.buildRecord

changeGDBVersion

Interface Method
changeGDBVersion(gdbVersionstring): void

Change the GDB version for all layers in the service.

Parameters
ParameterType
gdbVersion
string
Returns 
void

clearRecords

optionalinherited
Interface Method
clearRecords(): void

This function will clear the loaded records and won't clear the sourceRecords. Once the loaded records are cleared, the version in the data source info will be updated.

Returns 
void

clearSourceRecords

inherited
Interface Method
clearSourceRecords(): void

Clear both sourceRecords and loaded records. Both source version and version in data source info will be updated.

Returns 
void

fetchSchema

inherited
Interface Method
fetchSchema(): Promise<IMDataSourceSchema>

Fetch the data schema from an actual data source. If it's a statistic data source, the schema will not be fetched.

Returns 
Promise<IMDataSourceSchema>
Inherited from DataSource.fetchSchema

getAllChildDataSources

optionalinherited
Interface Method
getAllChildDataSources(): DataSource[]

Return all child data sources of a parent data source, includes the grandchildren

Returns 
DataSource[]

getAllDerivedDataSources

inherited
Interface Method
getAllDerivedDataSources(): DataSource[]

Return the derived data views and local data sources.

Returns 
DataSource[]

getChildDataSource

optionalinherited
Interface Method
getChildDataSource(jimuChildIdstring): DataSource

Get child data source by jimuChildId. You can get jimuChildId by getJimuChildId().

Parameters
ParameterType
jimuChildId
string
Returns 
DataSource

getChildDataSources

optionalinherited
Interface Method
getChildDataSources(): DataSource[]

Return child data sources of a parent data source.

Returns 
DataSource[]

getCountStatus

inherited
Interface Method
getCountStatus(): DataSourceStatus

Return data source count status.

Returns 
DataSourceStatus

getDataSourceJson

inherited
Interface Method
getDataSourceJson(): IMDataSourceJson

The data source JSON object in app config.

Returns 
IMDataSourceJson

getDataView

inherited
Interface Method
getDataView(dataViewIdstring): DataSource

Get data view by data view ID.

Parameters
ParameterType
dataViewId
string
Returns 
DataSource
Inherited from DataSource.getDataView

getDataViews

inherited
Interface Method
getDataViews(): DataSource[]

Return all data views created from a main data source.

Returns 
DataSource[]

getGDBVersion

Interface Method
getGDBVersion(): string

Get the service GDB version.

Returns 
string

getIdField

inherited
Interface Method
getIdField(): string

Return the data source ID field.

Returns 
string
Inherited from DataSource.getIdField

getInfo

inherited
Interface Method
getInfo(): IMDataSourceInfo

Return the data source info in redux store.

Returns 
IMDataSourceInfo
Inherited from DataSource.getInfo

getLabel

inherited
Interface Method
getLabel(): string

Return data source label.

Returns 
string
Inherited from DataSource.getLabel

getListenSelection

inherited
Interface Method
getListenSelection(): boolean

Return whether listen selection.

Returns 
boolean

getLocalDataSource

inherited
Interface Method
getLocalDataSource(localIdstring): DataSource

Get local data source by local ID.

Parameters
ParameterType
localId
string
Returns 
DataSource

getLocalDataSources

inherited
Interface Method
getLocalDataSources(): DataSource[]

Return all local data sources created from a main data source or data view.

Returns 
DataSource[]

getMainDataSource

inherited
Interface Method
getMainDataSource(): DataSource

Return the main data source.

Returns 
DataSource

getRecord

inherited
Interface Method
getRecord(indexnumber): DataRecord

Get record by index

Parameters
ParameterType
index
number
Returns 
DataRecord
Inherited from DataSource.getRecord

getRecordById

inherited
Interface Method
getRecordById(idstring): DataRecord

Get record by ID

Parameters
ParameterType
id
string
Returns 
DataRecord

getRecords

inherited
Interface Method
getRecords(): DataRecord[]

Get records

Returns 
DataRecord[]
Inherited from DataSource.getRecords

getRecordsWithSelection

inherited
Interface Method
getRecordsWithSelection(): DataRecord[]

If selected records are not loaded in the current data source, they will be concatenated to the end of records array. For example, record 1 is selected in data view 1 and it is not loaded in data view 2 (record 1 actually matches query params of data view 2), dataView2.getRecordsWithSelection() will return all loaded records in data view 2 and record 1.

Returns 
DataRecord[]

getRootDataSource

inherited
Interface Method
getRootDataSource(): DataSource

Return the root data source.

Returns 
DataSource

getSchema

inherited
Interface Method
getSchema(): IMDataSourceSchema

The schema returned here is the merged result of the configured schema and the fetched schema.

Returns 
IMDataSourceSchema
Inherited from DataSource.getSchema

getSelectedRecordIds

optionalinherited
Interface Method
getSelectedRecordIds(): string[]

Get selected record IDs

Returns 
string[]

getSelectedRecordIndexes

optionalinherited
Interface Method
getSelectedRecordIndexes(): number[]

Get selected record indexes

Returns 
number[]

getSelectedRecords

optionalinherited
Interface Method
getSelectedRecords(): DataRecord[]

Get selected records

Returns 
DataRecord[]

getSourceRecords

inherited
Interface Method
getSourceRecords(): DataRecord[]

Return the source records

Returns 
DataRecord[]

getSourceVersion

inherited
Interface Method
getSourceVersion(): number

When current data source is created from an array of records, it will be saved in sourceRecords. Return the version of sourceRecords.

Returns 
number

getStatus

inherited
Interface Method
getStatus(): DataSourceStatus

Return data source status.

Returns 
DataSourceStatus
Inherited from DataSource.getStatus

getVersion

inherited
Interface Method
getVersion(): number

Return data source version.

Returns 
number
Inherited from DataSource.getVersion

isInAppConfig

inherited
Interface Method
isInAppConfig(): boolean

Return whether the data source is added in builder and is saved in app config.

Returns 
boolean

ready

inherited
Interface Method
ready(): Promise<any>

Ready is resolved means the data source instance is ready for use.

Returns 
Promise<any>
Inherited from DataSource.ready

selectRecordById

optionalinherited
Interface Method
selectRecordById(idstring, record?DataRecord, forceCheck?boolean): void

Select a record by ID. When select record by ID, we can pass in the record. So when the selected record is not loaded, we can add it in. If forceCheck is true, will check whether the record match filters of the data source or not. Will select the record only if the check is passed.

Parameters
ParameterTypeNotes
id
string

The ID to be selected. The selection will be cleared if the ID is null.

record
DataRecord
forceCheck
boolean
Returns 
void

selectRecordsByIds

optionalinherited
Interface Method
selectRecordsByIds(idsstring[], records?DataRecord[], forceCheck?boolean): void

Select records by IDs. When select records by IDs, we can pass in the records. So when the selected records are not loaded, we can add them in. If forceCheck is true, will check whether these records match filters of the data source or not. Will select the records which check is passed.

Parameters
ParameterTypeNotes
ids
string[]

The IDs to be selected. The selection will be cleared if the IDs are null.

records
DataRecord[]
forceCheck
boolean
Returns 
void

setCountStatus

optionalinherited
Interface Method
setCountStatus(statusDataSourceStatus): void

Update data source count status.

Parameters
ParameterType
status
DataSourceStatus
Returns 
void

setDataSourceJson

inherited
Interface Method
setDataSourceJson(dsJsonIMDataSourceJson): void

Update data source JSON in data source instance

Parameters
ParameterType
dsJson
IMDataSourceJson
Returns 
void

setListenSelection

inherited
Interface Method
setListenSelection(listenboolean): void

Whether listen selected records from other data sources which are derived from the same main data source. If true, will update selected record IDs of current data source info when selecting records via other derived data sources. Will also update selected record IDs when selecting records via current data source itself. If false, won't change selected record IDs when selecting records via other derived data sources. Will update selected record IDs only when selecting records via current data source itself.

Main data source and its data views will listen selected records by default, local data source does not listen selected records by default.

Parameters
ParameterType
listen
boolean
Returns 
void

setRecords

inherited
Interface Method
setRecords(recordsDataRecord[]): void

Update the records in the data source object only, does not update the source data. See DataSourceEditSourceOperations.updateRecords

Parameters
ParameterType
records
DataRecord[]
Returns 
void
Inherited from DataSource.setRecords

setSourceRecords

inherited
Interface Method
setSourceRecords(recordsDataRecord[]): void

When current data source is created from an array of records, will save it in sourceRecords. These two methods are use to update or get the source data.

Parameters
ParameterType
records
DataRecord[]
Returns 
void

setStatus

optionalinherited
Interface Method
setStatus(statusDataSourceStatus): void

Update data source status.

Parameters
ParameterType
status
DataSourceStatus
Returns 
void
Inherited from DataSource.setStatus

updateSelectionInfo

optionalinherited
Interface Method
updateSelectionInfo(idsstring[], triggerDataSourceDataSource, forceCheck?boolean): void

Update selected record IDs in data source info if the current data source listens selection change (see setListenSelection) or the current data source is the trigger data source (that is to say, select via it).

Before update info, will check whether these selected records match filters of the current data source firstly, and then only set the matched selected records to info. Will skip the check in some cases to improve performance if the forceCheck is not passed in or is false. For example, if the curren data source is main data source (we suppose that main data source contains all records, no need to check). But if the forceCheck is true, won't skip the check.

Parameters
ParameterType
ids
string[]
triggerDataSource
DataSource
forceCheck
boolean
Returns 
void

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.