Package xal.smf.impl

Class GenericNode

java.lang.Object
xal.smf.AcceleratorNode
xal.smf.impl.GenericNode
All Implemented Interfaces:
Comparable, ElementType, DataListener

public class GenericNode extends AcceleratorNode
GenericNode represents a node whose properties are defined by the data input. Unlike other nodes, there are no predefined methods associated with the channels. Instead, GenericNode is used to load nodes from data on the fly (for example from an XML file) so they can be manipulated in the accelerator object graph. One can use the "getHandles()" and "getChannel()" methods of AcceleratorNode to interact in a meaningful way with the generic nodes.
Author:
tap
  • Field Details

    • strType

      protected String strType
  • Constructor Details

    • GenericNode

      public GenericNode(String strType, String strId, ChannelFactory channelFactory)
      Primary Constructor.
      Parameters:
      strType - type of this node (since it is Generic and there is no default type)
      strId - ID for this node
      channelFactory - factory from which to generate channels
    • GenericNode

      public GenericNode(String strType, String strId)
      Constructor using default channel factory.
      Parameters:
      strType - type of this node (since it is Generic and there is no default type)
      strId - ID for this node
  • Method Details

    • getType

      public String getType()
      Overriden to provide type signature
      Specified by:
      getType in class AcceleratorNode
    • newNode

      @Deprecated public static GenericNode newNode(String strType, String strId)
      Deprecated.
      Instantiate a new GenericNode
    • isKindOf

      public boolean isKindOf(String compType)
      Determine if this node is of the specified type. Override the inherited method since the types of generic nodes are not associated with the class unlike typical nodes.
      Specified by:
      isKindOf in interface ElementType
      Overrides:
      isKindOf in class AcceleratorNode
      Parameters:
      compType - The type to compare against.
      Returns:
      true if the node is a match and false otherwise.