Class Target


  • public class Target
    extends java.lang.Object
    The target of a scan
    Since:
    2.4.0
    • Constructor Detail

      • Target

        public Target​(boolean inScopeOnly)
      • Target

        public Target​(java.util.List<StructuralNode> startNodes)
      • Target

        public Target​(SiteNode startNode)
      • Target

        public Target​(SiteNode startNode,
                      boolean recurse)
      • Target

        public Target​(Context context)
      • Target

        public Target​(SiteNode startNode,
                      Context context,
                      boolean inScopeOnly,
                      int maxChildren,
                      int maxDepth)
        Constructs a Target with the given data.

        One or both startNode and context should be specified. If both a used then the startNode should belong to the context. Note that nodes can belong to multiple contexts.

        Parameters:
        startNode - the starting node
        context - the context
        inScopeOnly - true to only scan nodes that are in scope (only relevant if context not specified), false otherwise
        maxChildren - maximum number of child nodes to scan
        maxDepth - maximum depth to scan
      • Target

        public Target​(SiteNode startNode,
                      Context context,
                      boolean inScopeOnly,
                      boolean recurse)
    • Method Detail

      • isValid

        public boolean isValid()
      • getStartNode

        public SiteNode getStartNode()
      • getContext

        public Context getContext()
      • isInScopeOnly

        public boolean isInScopeOnly()
      • getMaxChildren

        public int getMaxChildren()
      • getMaxDepth

        public int getMaxDepth()
      • setStartNode

        public void setStartNode​(SiteNode startNode)
        Sets the given node as the start node.

        Start nodes previously set are discarded.

        Note: The call to this method as no effect if the node is null.

        Parameters:
        startNode - the start node.
      • setStartNode

        public void setStartNode​(StructuralNode startNode)
        Sets the given node as the start node.

        Start nodes previously set are discarded.

        Parameters:
        startNode - the start node.
        Since:
        2.8.0
      • setContext

        public void setContext​(Context context)
      • getStartNodes

        public java.util.List<StructuralNode> getStartNodes()
      • setInScopeOnly

        public void setInScopeOnly​(boolean inScopeOnly)
      • setMaxChildren

        public void setMaxChildren​(int maxChildren)
      • setMaxDepth

        public void setMaxDepth​(int maxDepth)
      • isRecurse

        public boolean isRecurse()
      • setRecurse

        public void setRecurse​(boolean recurse)
      • getDisplayName

        public java.lang.String getDisplayName()