ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.Knowledge Namespace / KnowledgeGraphEntityValue Class
Members Example

In This Topic
    KnowledgeGraphEntityValue Class
    In This Topic
    Represents a knowledge graph entity.
    Syntax
    public class KnowledgeGraphEntityValue : KnowledgeGraphNamedObjectValue, System.IDisposable  
    Public Class KnowledgeGraphEntityValue 
       Inherits KnowledgeGraphNamedObjectValue
       Implements System.IDisposable 
    Example
    Check Whether A KG Entity Is a Document
    //Use GetDocumentEntityTypeName(KnowledgeGraphDataModel kg_dm) from
    //the 'Get Whether KG Has a Document Type' snippet to
    //get the documentNameType parameter
    protected bool GetEntityIsDocument(KnowledgeGraphEntityValue entity,
      string documentNameType = "")
    {
      if (string.IsNullOrEmpty(documentNameType))
        return false;
      return entity.GetTypeName() == documentNameType;
    }
    
    Check Whether A Graph Type has a Spatial Property
    //Use GetDocumentEntityTypeName(KnowledgeGraphDataModel kg_dm) from
    //the 'Get Whether KG Has a Document Type' snippet to
    //get the documentNameType parameter
    protected bool HasGeometry(KnowledgeGraphNamedObjectType kg_named_obj)
    {
      var props = kg_named_obj.GetProperties();
      return props.Any(prop => prop.FieldType == FieldType.Geometry);
    }
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CoreObjectsBase
          ArcGIS.Core.Data.Knowledge.KnowledgeGraphValue
             ArcGIS.Core.Data.Knowledge.KnowledgeGraphObjectValue
                ArcGIS.Core.Data.Knowledge.KnowledgeGraphNamedObjectValue
                   ArcGIS.Core.Data.Knowledge.KnowledgeGraphEntityValue

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also