Package pulse.util

Class UpwardsNavigable

  • All Implemented Interfaces:
    Serializable, Descriptive
    Direct Known Subclasses:
    AbstractResult, Group, TaskManager

    public abstract class UpwardsNavigable
    extends Object
    implements Descriptive, Serializable

    An UpwardsNavigable provides a two-way connection with the other Describable in an asymmetric (upwards-oriented) manner (hence its name). The UpwardsNavigable stores information about its parent, which stands higher in hierarchy than this object. The parent is always informed if any changes happen with its child properties.

    See Also:
    Serialized Form
    • Constructor Detail

      • UpwardsNavigable

        public UpwardsNavigable()
    • Method Detail

      • initListeners

        public void initListeners()
      • removeHierarchyListeners

        public final void removeHierarchyListeners()
      • removeHierarchyListener

        public final void removeHierarchyListener​(HierarchyListener l)
      • addHierarchyListener

        public final void addHierarchyListener​(HierarchyListener l)
      • tellParent

        public void tellParent​(PropertyEvent e)
        Recursively informs the parent, the parent of its parent, etc. of this UpwardsNavigable that an action has been taken on its child's properties specified by {
        Parameters:
        e - the property event
      • getParent

        public UpwardsNavigable getParent()
        Return the parent of this UpwardsNavigable -- if is has been previously explicitly set.
        Returns:
        the parent (which is also an UpwardsNavigable).
      • specificAncestor

        public UpwardsNavigable specificAncestor​(Class<? extends UpwardsNavigable> aClass)
        Finds an ancestor that looks similar to aClass by recursively calling getParent().
        Parameters:
        aClass - a class which should be similar to an ancestor of this UpwardsNavigable
        Returns:
        the ancestor, which is a parent, or grand-parent, or grand-grand-parent, etc. of this UpwardsNavigable.
      • setParent

        public final void setParent​(UpwardsNavigable parent)
        Explicitly sets the parent of this UpwardsNavigable.
        Parameters:
        parent - the new parent that will adopt this UpwardsNavigable.
      • identify

        public Identifier identify()
        Retrieves the Identifier of the SearchTaks this UpwardsNavigable belongs to.
        Returns:
        the identifier of the SearchTask
      • describe

        public String describe()
        Uses the SearchTask id (if present) to describe this UpwardsNavigable.
        Specified by:
        describe in interface Descriptive
        Returns:
        by default, this will return the name of the implementing class and the date of the calculation.