Class CustomTree

java.lang.Object
overit.geocall.platform.CustomTree

public class CustomTree extends Object
Class used to search for a resource within the customizations defined by the various CustomLayers.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Utility class containing the information of a resource discovered during the search phase
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of CustomTree from a reference layer, used as a resource search base.
  • Method Summary

    Modifier and Type
    Method
    Description
    This method looks for all the resources that match with the one passed by, searching through the various custom layers, and returns the reference to the real resources.
     
    search(JavaResource resource)
    This method looks for the resource passed in input by searching through the various custom layers, and returns the reference to the real resource, or null in case the resource does not exist in any of the registered layers.
    void
    setCollectSearchSteps(boolean collectSteps)
    Enable or disable search step saving

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CustomTree

      public CustomTree(CustomLayer layer)
      Creates an instance of CustomTree from a reference layer, used as a resource search base.
      Parameters:
      layer - the reference layer
  • Method Details

    • setCollectSearchSteps

      public void setCollectSearchSteps(boolean collectSteps)
      Enable or disable search step saving
      Parameters:
      collectSteps - true to enable the search step saving; false otherwise
    • getSearchSteps

      public CustomTree.SearchNode getSearchSteps()
      Returns:
      the tree built during the research phase of a resource
    • search

      public JavaResource search(JavaResource resource)
      This method looks for the resource passed in input by searching through the various custom layers, and returns the reference to the real resource, or null in case the resource does not exist in any of the registered layers.
      Parameters:
      resource - the resource to find
      Returns:
      the instance of the real resource or null if the resource does not exist in any of the registered layers.
    • collect

      public List<JavaResource> collect(JavaResource resource)
      This method looks for all the resources that match with the one passed by, searching through the various custom layers, and returns the reference to the real resources.
      Parameters:
      resource - the resource to find
      Returns:
      the list containing the real resources. empty list means that the resource does not exist in any of the registered layers.