

public sealed class KnowledgeGraphSubGraphBuilder
Public NotInheritable Class KnowledgeGraphSubGraphBuilder
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.
System.Object
ArcGIS.Core.Data.Knowledge.Analytics.KnowledgeGraphSubGraphBuilder
Target Platforms: Windows 11, Windows 10