Class ConversionWrapper

All Implemented Interfaces:
GraphObject, Node

public class ConversionWrapper extends EventWrapper
Wrapper for the Conversion class.
Author:
Ozgun Babur
  • Field Details

    • conv

      protected Conversion conv
      Wrapped Conversion.
    • direction

      protected boolean direction
      The direction that the Conversion is wrapped. A separate wrapper is used for each direction if the Conversion is reversible.
    • transcription

      protected boolean transcription
      Flag to say this Conversion is a transcription.
    • LEFT_TO_RIGHT

      public static final boolean LEFT_TO_RIGHT
      Direction LEFT_TO_RIGHT.
      See Also:
    • RIGHT_TO_LEFT

      public static final boolean RIGHT_TO_LEFT
      Direction RIGHT_TO_LEFT.
      See Also:
  • Constructor Details

    • ConversionWrapper

      protected ConversionWrapper(Conversion conv, GraphL3 graph)
      Constructor with the Conversion to wrap and the owner graph.
      Parameters:
      conv - Conversion to wrap
      graph - Owner graph
  • Method Details

    • getDirection

      public boolean getDirection()
      Returns:
      Direction of the conversion
    • getReverse

      public ConversionWrapper getReverse()
      Returns:
      The reverse Conversion wrapper if exists
    • init

      public void init()
      Extracts the direction, creates the reverse if necessary.
      Specified by:
      init in interface Node
      Overrides:
      init in class AbstractNode
    • initUpstream

      public void initUpstream()
      Binds inputs and controllers.
      Overrides:
      initUpstream in class AbstractNode
    • initDownstream

      public void initDownstream()
      Binds products.
      Overrides:
      initDownstream in class AbstractNode
    • isTranscription

      public boolean isTranscription()
      Description copied from class: EventWrapper
      Say if the event is a transcription.
      Specified by:
      isTranscription in interface Node
      Specified by:
      isTranscription in class EventWrapper
      Returns:
      Whether this is a transcription
    • getKey

      public String getKey()
      RDF ID of the Conversion and the direction is used for the key.
      Returns:
      Key
    • getConversion

      public Conversion getConversion()
      Returns:
      Wrapped Conversion
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      Display name with the ID