ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Desktop.Editing Namespace / KnowledgeGraphDocumentDescription Class
Members Example

In This Topic
    KnowledgeGraphDocumentDescription Class
    In This Topic
    Represents a document row in a knowledge graph.
    Object Model
    KnowledgeGraphDocumentDescription ClassGeometry Class
    Syntax
    public sealed class KnowledgeGraphDocumentDescription 
    Public NotInheritable Class KnowledgeGraphDocumentDescription 
    Remarks
    A KnowledgeGraphDocumentDescription is used to create a row in the Knowledge Graph document table. Once defined, use EditOperation.Create or EditOperation.Create to create the row. The Create method will auto-populate the Url, Name, FileExtension and contentType fields of the document row from the path supplied. Use the Text property in the KnowledgeGraphDocumentDescription to specify custom text. If no value is supplied and text can be extracted from the document (for example a .txt file), then the Text field will be auto-populated with this extracted value. Specify values for the Title, Keywords and Metadata properties to populate values in those fields when the row is created.

    The Create operations return a RowToken - a representation of the future or "to be" created row. Create a RowHandle with this rowToken and use with a KnowledgeGraphRelationshipDescription to create the relationship between an entity and the document row.

    Example
    Create an Entity, a Document, a HasDocument and a Provenance record
    await QueuedTask.Run(() =>
    {
      //Instantiate an operation for the Create
      var edit_op = new EditOperation()
      {
        Name = "Create a records",
        SelectNewFeatures = true
      };
    
      // create the entity
      var personToken = edit_op.Create(personLayer, personAtts);
    
      // create the document
      var kgDocDesc = new KnowledgeGraphDocumentDescription(@"D:\Data\BirthCertificate.jpg");
      var docToken = edit_op.Create(docLayer, kgDocDesc);
    
      // create RowHandles from the returned RowTokens
      var personHandle = new RowHandle(personToken);
      var docHandle = new RowHandle(docToken);
    
      // create the "hasDocument" relationship
      var rd = new KnowledgeGraphRelationshipDescription(personHandle, docHandle);
      edit_op.Create(hasDocLayer, rd);
    
      // create the provenance record for the person entity using the document entity
      // provenance record is on the "name" field 
      var pd = new KnowledgeGraphProvenanceDescription(personHandle, "name", docHandle, "", "comments");
      edit_op.Create(pd);
    
      // execute - create all the entities and relationship rows _together_
      edit_op.Execute();
    });
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Editing.KnowledgeGraphDocumentDescription

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also