ArcGIS Pro 3.6 API Reference Guide
ArcGIS.Core.Data.Knowledge.Analytics Namespace / KnowledgeGraphSubGraphBuilder Class
Members

In This Topic
    KnowledgeGraphSubGraphBuilder Class
    In This Topic
    A builder for creating a ArcGIS.Core.CIM.CIMKnowledgeGraphSubGraph for use in KnowledgeGraph operations such as centrality.
    Object Model
    KnowledgeGraphSubGraphBuilder ClassCIMKnowledgeGraphSubGraph Class
    Syntax
    public sealed class KnowledgeGraphSubGraphBuilder 
    Public NotInheritable Class KnowledgeGraphSubGraphBuilder 
    Remarks
    This builder aids in building a ArcGIS.Core.CIM.CIMKnowledgeGraphSubGraph from a ArcGIS.Core.Data.Knowledge.KnowledgeGraphIDSet. To build a more complex ArcGIS.Core.CIM.CIMKnowledgeGraphSubGraph or use property filters (ArcGIS.Core.CIM.CIMKnowledgeGraphNamedTypeFilterByType.PropertyFilterPredicate), create the ArcGIS.Core.CIM.CIMKnowledgeGraphSubGraph and its component filters ArcGIS.Core.CIM.CIMKnowledgeGraphNamedTypeFilterByInstances and ArcGIS.Core.CIM.CIMKnowledgeGraphNamedTypeFilterByType manually.

    The following are examples of what a CIMKnowledgeGraphSubGraph would look like given a Knowledge Graph with entity types (A, B, C, D).
    Refer to ArcGIS.Core.CIM.CIMKnowledgeGraphSubGraph.EntityFilters defining the list of filters for entities, and ArcGIS.Core.CIM.CIMKnowledgeGraphNamedTypeFilter.FilterType defining whether a particular filter includes or excludes the instances it represents. Ordering of filters does not matter.

    o When the collection of filters in the CIMKnowledgeGraphSubGraph is null, all entities are implicitly in the subgraph, i.e the resulting set of entities in the subgraph is {A, B, C, D}.
    o When there is a single filter and it includes A, the resulting set of entities in the subgraph is {A}.
    o When there is a single filter and it excludes A, the resulting set of entities in the subgraph is {B, C, D}.
    o When there are two filters, one filter includes A and one filter excludes B, the resulting set of entities in the subgraph is still {A}. (i.e. B, C, and D are all excluded, the "exclusion" filter was unnecessary in this case as only A was explicitly included)

    To include or exclude just a specific subset of entities within a given entity type, use either ArcGIS.Core.CIM.CIMKnowledgeGraphNamedTypeFilterByInstances.InstancesIDs or ArcGIS.Core.CIM.CIMKnowledgeGraphNamedTypeFilterByType.PropertyFilterPredicate.

    The filtering behaviors described above for entities apply equally to relationships - which are configured in exactly the same way. Refer to ArcGIS.Core.CIM.CIMKnowledgeGraphSubGraph.RelationshipFilters.
    Note: relationships having at least one entity endpoint that is not in the subgraph are also not in the subgraph.

    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.Data.Knowledge.Analytics.KnowledgeGraphSubGraphBuilder

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.6 or higher.
    See Also