Class Eventable

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class Eventable
    extends org.jgrapht.graph.DefaultEdge
    implements Serializable
    Eventable class: an element having an event attached to it (onclick, onmouseover, ...) so that it can change the DOM state.
    Author:
    mesbah
    See Also:
    Serialized Form
    • Constructor Detail

      • Eventable

        public Eventable()
        Default constructor to support saving instances of this class as an XML.
      • Eventable

        public Eventable​(Identification identification,
                         Eventable.EventType eventType)
        Create a new Eventable for a identification and eventType.
        Parameters:
        identification - the identification object.
        eventType - the event type.
      • Eventable

        public Eventable​(Identification identification,
                         Eventable.EventType eventType,
                         String relatedFrame)
        Create a new Eventable for a identification and eventType.
        Parameters:
        identification - the identification object.
        eventType - the event.
        relatedFrame - the frame containing this element.
      • Eventable

        public Eventable​(Node node,
                         Eventable.EventType eventType)
        Create a new Eventable for a node and eventType.
        Parameters:
        node - The DOM element.
        eventType - the event type.
      • Eventable

        public Eventable​(CandidateElement candidateElement,
                         Eventable.EventType eventType,
                         long id)
        Create a new Eventable for a candidateElement and eventType.
        Parameters:
        candidateElement - The CandidateElement element.
        eventType - the event type. TODO ali remove
    • Method Detail

      • setEventType

        public void setEventType​(Eventable.EventType eventType)
        Parameters:
        eventType - the eventType to set
      • getId

        public long getId()
        Returns:
        the id
      • setId

        public void setId​(long id)
        Parameters:
        id - the id to set
      • getIdentification

        public Identification getIdentification()
        Returns:
        the identification
      • setIdentification

        public void setIdentification​(Identification identification)
        Parameters:
        identification - the identification to set
      • getElement

        public Element getElement()
        Returns:
        the element
      • setElement

        public void setElement​(Element element)
        Parameters:
        element - the element to set
      • getRelatedFormInputs

        public com.google.common.collect.ImmutableList<FormInput> getRelatedFormInputs()
        Retrieve the related form inputs.
        Returns:
        the formInputs
      • setRelatedFormInputs

        public void setRelatedFormInputs​(List<FormInput> relatedFormInputs)
        Set the list of formInputs.
        Parameters:
        relatedFormInputs - the list of formInputs
      • getSourceStateVertex

        public StateVertex getSourceStateVertex()
        Returns:
        the source state.
        Throws:
        CrawljaxException - if the source cannot be found.
      • getTargetStateVertex

        public StateVertex getTargetStateVertex()
        Returns:
        the target state.
        Throws:
        CrawljaxException - if the target cannot be found.
      • getRelatedFrame

        public String getRelatedFrame()
        Returns:
        the relatedFrame
      • setSource

        public void setSource​(StateVertex source)
      • setTarget

        public void setTarget​(StateVertex target)
      • toString

        public String toString()
        Overrides:
        toString in class org.jgrapht.graph.DefaultEdge
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getEdgeSource

        public Object getEdgeSource()
      • getEdgeTarget

        public Object getEdgeTarget()