Class Edge

    • Method Detail

      • getSource

        public AbstractLocation getSource()
        Returns the source location (the beginning of the edge).
        Returns:
        abstract location (can be BranchPoint)
      • getTarget

        public AbstractLocation getTarget()
        Returns the target location (the end of the edge).
        Returns:
        abstract location (can be BranchPoint)
      • getNails

        public Nail getNails()
        Returns the first nail (if any).
        Returns:
        nail or null if there are no nails on this edge.
      • setSource

        public void setSource​(AbstractLocation source)
        Sets the origin of this edge.
        Parameters:
        source - the origin: Location or BranchPoint
      • setTarget

        public void setTarget​(AbstractLocation target)
        Sets the destination of this edge.
        Parameters:
        target - the destination: Location or BranchPoint
      • createNail

        public Nail createNail()
        Creates a nail based on prototype, the nail has to be inserted into an edge.
        Returns:
        a new nail
      • accept

        public void accept​(Visitor visitor)
                    throws Exception
        Description copied from class: Element
        Accept a visitor. This method is specialized in every subclass. Part of the visitor pattern.
        Overrides:
        accept in class Node
        Parameters:
        visitor - - The visitor
        Throws:
        Exception - the visitor threw an exception.
      • getPrototypeFromParent

        public Element getPrototypeFromParent​(Element parent)
        Returns the #edge property value of the parent argument.
        Overrides:
        getPrototypeFromParent in class Element
        Parameters:
        parent - - The parent element
        Returns:
        The property element
      • getName

        public String getName()
        Constructs a human-friendly name of this edge. The result contains a source and target location names separated by an arrow.
        Returns:
        a human-friendly name for this edge
      • getXMLLabelKinds

        public String[] getXMLLabelKinds()
        Description copied from class: Element
        Returns possible XML label kinds this element supports.
        Overrides:
        getXMLLabelKinds in class Element
        Returns: