The data model defines the entity types and relationship types in a knowledge graph service as well as some additional settings. The DataModel resource allows users to query the properties of both entity and relationship types. By defining these types and their properties, the data model defines the schema of the graph.
Sample of a knowledge graph data model.
{
"dataModel": {
"declaredClass": "esri.rest.knowledgeGraph.DataModel",
"arcgisManaged": true,
"globalIdField": "globalid",
"identifierInfo": {
"IdentifierMappingInfo": {
"databaseNativeIdentifier": null,
"identifierInfoType": "esriIdentifierInfoTypeUniformProperty",
"uniformPropertyIdentifier": {
"identifierPropertyName": "globalid"
}
},
"identifierGenerationInfo": {
"uuidMethodHint": "esriUUIDESRI"
}
},
"timestamp": {},
"spatialReference": {
"latestWkid": 0,
"wkid": 4326,
"vcsWkid": 0,
"latestVcsWkid": 0
},
"strict": false,
"searchIndexes:": [
{
"analyzers": [
{
"name": "text_en"
}
],
"name": "esri__search_idx",
"searchProperties": [
{
"key": "Person",
"value": {
"propertyNames": [
"name",
"age"
]
}
}
],
"supportedCategory": null
}
],
"entityTypes": [
{
"declaredClass": "esri.rest.knowledgeGraph.EntityType",
"name": "company",
"alias": "Company",
"role": "Regular",
"strict": false,
"properties": [
{
"declaredClass": "esri.rest.knowledgeGraph.GraphProperty",
"name": "Name",
"alias": "Name",
"fieldType": "esriFieldTypeString",
"geometryType": "esriGeometryNull",
"hasM": false,
"hasZ": false,
"nullable": true,
"editable": true,
"required": false,
"defaultVisibility": true,
"systemMaintained": false,
"role": "esriGraphPropertyRegular",
"defaultValue": null
},
{
"declaredClass": "esri.rest.knowledgeGraph.GraphProperty",
"name": "id",
"alias": "id",
"fieldType": "esriFieldTypeOID",
"geometryType": "esriGeometryNull",
"hasM": false,
"hasZ": false,
"nullable": false,
"editable": false,
"required": true,
"defaultVisibility": true,
"systemMaintained": true,
"role": "esriGraphPropertyRegular",
"defaultValue": null
}
],
"fieldIndexes": [
{
"declaredClass": "esri.rest.knowledgeGraph.FieldIndex",
"name": "esri__id_idx",
"unique": true,
"ascending": true,
"description": "",
"fieldNames": [
"id"
]
},
{
"declaredClass": "esri.rest.knowledgeGraph.FieldIndex",
"name": "esri__name_idx",
"unique": true,
"ascending": true,
"description": "",
"fieldNames": [
"name"
]
}
]
}
],
"relationshipTypes": [
{
"declaredClass": "esri.rest.knowledgeGraph.RelationshipType",
"name": "employed_by",
"alias": "Employed By",
"role": "Regular",
"strict": false,
"properties": [
{
"declaredClass": "esri.rest.knowledgeGraph.GraphProperty",
"name": "id",
"alias": "id",
"fieldType": "esriFieldTypeGUID",
"geometryType": "esriGeometryNull",
"hasM": false,
"hasZ": false,
"nullable": false,
"editable": false,
"required": true,
"defaultVisibility": true,
"systemMaintained": true,
"role": "esriGraphPropertyRegular",
"defaultValue": null
},
{
"declaredClass": "esri.rest.knowledgeGraph.GraphProperty",
"name": "start_date",
"alias": "Start Date",
"fieldType": "esriFieldTypeDate",
"geometryType": "esriGeometryNull",
"hasM": false,
"hasZ": false,
"nullable": false,
"editable": false,
"required": true,
"defaultVisibility": true,
"systemMaintained": false,
"role": "esriGraphPropertyRegular",
"defaultValue": null
}
],
"fieldIndexes": [
{
"ascending": true,
"description": "index on id field",
"fieldNames": [
"id"
],
"name": "esri_id_idx",
"unique": "true"
}
],
"endpoints": [
{
"originEntityType": "Person",
"destinationEntityType": "Company"
}
]
}
]
}
}
Property Overview
Name | Type | Summary | Class |
---|---|---|---|
Boolean | Indicates if the data in the graph is managed by ArcGIS Knowledge. more details | DataModel | |
String | The name of the class. more details | Accessor | |
EntityType[] | A list of the entity types contained in the knowledge graph including their associated properties. more details | DataModel | |
Object | Information about the global ID for the knowledge graph. more details | DataModel | |
RelationshipType[] | A list of the relationship types in the knowledge graph including their associated properties. more details | DataModel | |
SearchIndex[] | List of the search indexes in the knowledge graph. more details | DataModel | |
SpatialReference | Specifies spatial reference information for the knowledge graph. more details | DataModel | |
Boolean | Indicates whether users can make changes to the data model. more details | DataModel | |
Date | The date the data model was last updated. more details | DataModel |
Property Details
-
arcgisManaged Booleanreadonly
-
Indicates if the data in the graph is managed by ArcGIS Knowledge. This is
true
for hosted knowledge graph services and ArcGIS managed external data stores where ArcGIS Knowledge can create, update and delete data. This property isfalse
for user managed external graph stores, in which the data and data model are read only from ArcGIS Knowledge.Note
Currently the only supported external graph store is Neo4j
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
-
entityTypes EntityType[]readonly
-
A list of the entity types contained in the knowledge graph including their associated properties.
-
identifierInfo Objectreadonly
-
Information about the global ID for the knowledge graph.
- Properties
-
identifierMappingInfo Object
Information on the type and format of the universally unique identifier
- Specification
-
identifierInfoType String
Indicates the type of the ID.
esriIdentifierInfoTypeDatabaseNative
is a durable, settable database native identifier.esriIdentifierInfoTypeUniformProperty
is a user-defined property that guarantees named type category uniqueness & is uniformly named across the graph.Possible Values:"esriIdentifierInfoTypeUniformProperty"|"esriIdentifierInfoTypeDatabaseNative"
databaseNativeIdentifier ObjectProperties of database native identifier.
uniformPropertyIdentifier ObjectProperties of the user defined unique identifier.
- Specification
-
identifierPropertyName String
The name of the unique identifier property for all records.
identifierGenerationInfo ObjectInformation on how the unique identifier is generated.
uuidMethodHint StringInformation on the format of the unique identifier.
esriUUIDESRI
is a universally unique ID in Esri/Microsoft format: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}UUID_RFC_4122
is a universally unique ID in RFC4122 lowercase format.Possible Values:"esriUUIDESRI"|"UUID_RFC_4122"
Example"identifierInfo": { "IdentifierMappingInfo": { "databaseNativeIdentifier": null, "identifierInfoType": "esriIdentifierInfoTypeUniformProperty", "uniformPropertyIdentifier": { "identifierPropertyName": "globalid" } }, "identifierGenerationInfo": { "uuidMethodHint": "esriUUIDESRI" } }
-
relationshipTypes RelationshipType[]readonly
-
A list of the relationship types in the knowledge graph including their associated properties.
-
searchIndexes SearchIndex[]readonly
-
List of the search indexes in the knowledge graph.
-
-
Specifies spatial reference information for the knowledge graph.
- Default Value:null
-
strict Booleanreadonly
-
Indicates whether users can make changes to the data model. If
true
, the data model cannot be modified and knowledgeGraphService.executeApplyEdits() will fail. Iffalse
, any user can make changes to the data model. The strict property of the data model can only be set by administrators or the knowledge graph service owner from the ArcGIS REST API Update (Edit Data Model).
-
timestamp Datereadonly
-
The date the data model was last updated.
Method Overview
Name | Return Type | Summary | Class |
---|---|---|---|
Adds one or more handles which are to be tied to the lifecycle of the object. more details | Accessor | ||
Boolean | Returns true if a named group of handles exist. more details | Accessor | |
Removes a group of handles owned by the object. more details | Accessor |
Method Details
-
addHandles(handleOrHandles, groupKey)inherited
-
Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.
// Manually manage handles const handle = reactiveUtils.when( () => !view.updating, () => { wkidSelect.disabled = false; }, { once: true } ); this.addHandles(handle); // Destroy the object this.destroy();
ParametershandleOrHandles WatchHandle|WatchHandle[]Handles marked for removal once the object is destroyed.
groupKey *optionalKey identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.
-
Returns true if a named group of handles exist.
ParametergroupKey *optionalA group key.
ReturnsType Description Boolean Returns true
if a named group of handles exist.Example// Remove a named group of handles if they exist. if (obj.hasHandles("watch-view-updates")) { obj.removeHandles("watch-view-updates"); }
-
removeHandles(groupKey)inherited
-
Removes a group of handles owned by the object.
ParametergroupKey *optionalA group key or an array or collection of group keys to remove.
Exampleobj.removeHandles(); // removes handles from default group obj.removeHandles("handle-group"); obj.removeHandles("other-handle-group");