Package com.orchestranetworks.addon.dmdv.data.filter

Provides the interfaces and class to define a filter that depends on the currently evaluated link. An administrator can include the custom filter in a link configuration. See the Developers Guide for more information.

Create custom filter class implements DisplayFilter:

  1. Example of getting the current link's start and end node:

    NodeContext startNodeContext = context.getLink().getStartNodeContext();
    NodeContext endNodeContext = context.getLink().getEndNodeContext();
            
  2. Example of getting the field's data from the start node:

    NodeContext startNodeContext = context.getLink().getStartNodeContext();
    Object id = startNodeContext.getNode().getRecord().get(Path.parse("./Id"));
            
  3. Example of getting all sources/targets/children/parents of start node:

    //get parents
    List<NodeContext> parentNodecontexts = context.getLink().getStartNodeContext()
            .getContexts(LinkType.CONTAINMENT, RelationShipType.TARGET);
    
    //get children
    List<NodeContext> childrenNodecontexts = context.getLink().getStartNodeContext()
            .getContexts(LinkType.CONTAINMENT, RelationShipType.SOURCE);
    
    //get sources
    List<NodeContext> sourcesNodecontexts = context.getLink().getStartNodeContext()
            .getContexts(LinkType.LINE, RelationShipType.SOURCE);
    
    //get targets
    List<NodeContext> targetsNodecontexts = context.getLink().getStartNodeContext()
            .getContexts(LinkType.LINE, RelationShipType.TARGET);