//The `EntityType` 'person' may have the following properties.
[{
name: "first_name"
alias: "First Name",
defaultValue: null,
defaultVisibility: true,
editable: true,
fieldType: "geosceneFieldTypeString",
geometryType: "geosceneGeometryNull",
hasM: false,
hasZ: false,
nullable: true,
required: false,
searchable: false,
systemMaintained: false
},
{
name: "age",
alias: "Age",
defaultValue: null,
defaultVisibility: true,
editable: true,
fieldType: "geosceneFieldTypeNumber",
geometryType: "geosceneGeometryNull",
hasM: false,
hasZ: false,
nullable: false,
required: false,
searchable: true,
systemMaintained: false
}]
//example of a RelationshipType definition including properties.
{
"declaredClass": "geoscene.rest.knowledgeGraph.RelationshipType",
"name": "employed_by",
"alias": "Employed By",
"role": "Regular",
"strict": false,
"properties": [{
"declaredClass": "geoscene.rest.knowledgeGraph.GraphProperty",
"name": "id",
"alias": "id",
"fieldType": "geosceneFieldTypeGUID",
"geometryType": "geosceneGeometryNull",
"hasM": false,
"hasZ": false,
"nullable": false,
"editable": false,
"required": true,
"defaultVisibility": true,
"systemMaintained": true,
"role": "geosceneGraphPropertyRegular",
"defaultValue": null
},
{
"declaredClass": "geoscene.rest.knowledgeGraph.GraphProperty",
"name": "start_date",
"alias": "Start Date",
"fieldType": "geosceneFieldTypeString",
"geometryType": "geosceneGeometryNull",
"hasM": false,
"hasZ": false,
"nullable": false,
"editable": true,
"required": true,
"defaultVisibility": true,
"systemMaintained": false,
"role": "geosceneGraphPropertyRegular",
"defaultValue": null
}]
}
构造函数
属性概述
名称 | 类型 | 描述 | 类 |
---|---|---|---|
String | 属性的显示名称。 更多详情 | GraphProperty | |
String | 类的名称。 更多详情 | Accessor | |
unknown | 指定对象类型的默认值。 更多详情 | GraphProperty | |
Boolean | 指定默认情况下属性是否可见。 更多详情 | GraphProperty | |
Boolean | 指定属性是否可编辑。 更多详情 | GraphProperty | |
String | 指定属性的字段类型。 更多详情 | GraphProperty | |
String | 指定属性的几何类型。 更多详情 | GraphProperty | |
Boolean | 指定属性是否具有 m 值。 更多详情 | GraphProperty | |
Boolean | 指定属性是否具有 z 值。 更多详情 | GraphProperty | |
String | 属性的名称。 更多详情 | GraphProperty | |
Boolean | 指定属性是否可以为 | GraphProperty | |
Boolean | 指定属性是否是必需项。 更多详情 | GraphProperty | |
String | 指定属性的角色。 更多详情 | GraphProperty | |
Boolean | 指定属性是否由系统维护。 更多详情 | GraphProperty |
属性详细信息
-
alias String
-
属性的显示名称。
-
类的名称。声明的类名称格式化为
geoscene.folder.className
。
-
defaultValue unknown
-
指定对象类型的默认值。
-
defaultVisibility Boolean
-
指定默认情况下属性是否可见。
- 默认值:true
-
editable Boolean
-
指定属性是否可编辑。
- 默认值:true
-
fieldType String
-
指定属性的字段类型。
可能值:"geosceneFieldTypeSmallInteger"|"geosceneFieldTypeInteger"|"geosceneFieldTypeSingle"|"geosceneFieldTypeDouble"|"geosceneFieldTypeString"|"geosceneFieldTypeDate"|"geosceneFieldTypeOID"|"geosceneFieldTypeGeometry"|"geosceneFieldTypeBlob"|"geosceneFieldTypeRaster"|"geosceneFieldTypeGUID"|"geosceneFieldTypeGlobalID"|"geosceneFieldTypeXML"|"geosceneFieldTypeBigInteger"
示例// possible field types "geosceneFieldTypeSmallInteger" "geosceneFieldTypeInteger" "geosceneFieldTypeSingle" "geosceneFieldTypeDouble" "geosceneFieldTypeLong" "geosceneFieldTypeString" "geosceneFieldTypeDate" "geosceneFieldTypeOID" "geosceneFieldTypeGeometry" "geosceneFieldTypeBlob" "geosceneFieldTypeRaster" "geosceneFieldTypeGUID" "geosceneFieldTypeGlobalID" "geosceneFieldTypeXML"
-
geometryType String
-
指定属性的几何类型。如果属性不是
geometry
类型,则不会出现。
-
hasM Boolean
-
指定属性是否具有 m 值。这仅适用于属性类型为
geometry
的情况。
-
hasZ Boolean
-
指定属性是否具有 z 值。这仅适用于属性类型为
geometry
的情况。
-
name String
-
属性的名称。
-
nullable Boolean
-
指定属性是否可以为
null
。- 默认值:true
-
required Boolean
-
指定属性是否是必需项。
- 默认值:false
-
role String
-
指定属性的角色。具有角色
document
的实体类型具有使用特定角色的属性。可能值:"geosceneGraphPropertyRegular"|"geosceneGraphPropertyDocumentName"|"geosceneGraphPropertyDocumentTitle"|"geosceneGraphPropertyDocumentUrl"|"geosceneGraphPropertyDocumentText"|"geosceneGraphPropertyDocumentKeywords"|"geosceneGraphPropertyDocumentContentType"|"geosceneGraphPropertyDocumentMetadata"|"geosceneGraphPropertyDocumentFileExtension"
示例{ "declaredClass": "geoscene.rest.knowledgeGraph.EntityType", "name": "documents", "alias": "Documents", "role": "Regular", "strict": false, "properties": [ { "declaredClass": "geoscene.rest.knowledgeGraph.GraphProperty", "name": "Name", "alias": "Name", "fieldType": "geosceneFieldTypeString", "geometryType": "geosceneGeometryNull", "hasM": false, "hasZ": false, "nullable": true, "editable": true, "required": false, "defaultVisibility": true, "systemMaintained": false, "role": "geosceneGraphPropertyDocumentName", "defaultValue": null }, { "declaredClass": "geoscene.rest.knowledgeGraph.GraphProperty", "name": "text", "alias": "text", "fieldType": "geosceneFieldTypeString",d "geometryType": "geosceneGeometryNull", "hasM": false, "hasZ": false, "nullable": false, "editable": false, "required": true, "defaultVisibility": true, "systemMaintained": true, "role": "geosceneGraphPropertyDocumentText", "defaultValue": null } ] }
-
systemMaintained Boolean
-
指定属性是否由系统维护。
方法概述
名称 | 返回值类值 | 描述 | 类 |
---|---|---|---|
添加一个或多个与对象生命周期相关联的句柄 更多详情 | Accessor | ||
* | 创建此类的新实例并使用从 GeoScene 产品生成的 JSON 对象值对其进行初始化。 更多详情 | GraphProperty | |
Boolean | 如果存在指定的句柄组,则返回 true。 更多详情 | Accessor | |
移除对象拥有的句柄组。 更多详情 | Accessor | ||
Object | 将此类的实例转换为其 GeoScene Portal JSON 表示。 更多详情 | GraphProperty |
方法详细说明
-
addHandles(handleOrHandles, groupKey)inherited
-
添加一个或多个与对象的生命周期相关联的句柄。当对象被销毁时,将移除句柄。
// Manually manage handles const handle = reactiveUtils.when( () => !view.updating, () => { wkidSelect.disabled = false; }, { once: true } ); this.addHandles(handle); // Destroy the object this.destroy();
参数handleOrHandles WatchHandle|WatchHandle[]对象销毁后,标记为要移除的句柄。
groupKey *optional标识句柄应添加到的组的键。组中的所有句柄稍后都可使用 Accessor.removeHandles() 进行删除。如果未提供键,则句柄将被添加到默认组。
-
fromJSON(json){*}static
-
创建此类的新实例并使用从 GeoScene 产品生成的 JSON 对象值对其进行初始化。传入到输入
json
参数的对象通常来自对 REST API 中查询操作的响应或来自另一个 GeoScene 产品的 toJSON() 方法。参数json ObjectGeoScene 格式实例的 JSON 表示。
返回类型 描述 * 返回该类的新实例。
-
如果存在指定的句柄组,则返回 true。
参数groupKey *optional组键。
返回类型 描述 Boolean 如果存在指定的句柄组,则返回 true
。示例// Remove a named group of handles if they exist. if (obj.hasHandles("watch-view-updates")) { obj.removeHandles("watch-view-updates"); }
-
removeHandles(groupKey)inherited
-
移除对象拥有的句柄组。
参数groupKey *optional要移除的组键或组键的数组或集合。
示例obj.removeHandles(); // removes handles from default group obj.removeHandles("handle-group"); obj.removeHandles("other-handle-group");
-
toJSON(){Object}
-
将此类的实例转换为其 GeoScene Portal JSON 表示。有关详细信息,请参阅使用 fromJSON() 指南主题。
返回类型 描述 Object 此类实例的 GeoScene Portal JSON 表示。