gov.sns.xal.smf.impl
Class GenericNode
java.lang.Object
|
+--gov.sns.xal.smf.AcceleratorNode
|
+--gov.sns.xal.smf.impl.GenericNode
- All Implemented Interfaces:
- DataListener, ElementType
- 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.
|
Field Summary |
protected java.lang.String |
m_strType
|
| Fields inherited from class gov.sns.xal.smf.AcceleratorNode |
channelSuite, m_bolIsSoft, m_bolStatus, m_bolValid, m_bucAlign, m_bucAper, m_bucTwiss, m_dblLen, m_dblPos, m_mapAttrs, m_objAccel, m_seqParent, m_strId |
|
Constructor Summary |
protected |
GenericNode(java.lang.String strId)
Creates a new instance of GenericNode. |
|
Method Summary |
java.lang.String |
getType()
Overriden to provide type signature |
boolean |
isKindOf(java.lang.String compType)
Determine if this node is of the specified type. |
static GenericNode |
newNode(java.lang.String strType,
java.lang.String strId)
Instantiate a new GenericNode |
| Methods inherited from class gov.sns.xal.smf.AcceleratorNode |
addBucket, channelSuite, clear, dataLabel, getAccelerator, getAlign, getAndConnectChannel, getAper, getBucket, getBuckets, getChannel, getHandles, getId, getLength, getParent, getPosition, getStatus, getTwiss, getValid, hasBucket, hasParent, isMagnet, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setLength, setParent, setPosition, setStatus, setTwiss, setValid, toString, update, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
m_strType
protected java.lang.String m_strType
GenericNode
protected GenericNode(java.lang.String strId)
- Creates a new instance of GenericNode. Use the static "newNode()"
method instead to instantiate a new GenericNode.
getType
public java.lang.String getType()
- Overriden to provide type signature
- Specified by:
getType in class AcceleratorNode
newNode
public static GenericNode newNode(java.lang.String strType,
java.lang.String strId)
- Instantiate a new GenericNode
isKindOf
public boolean isKindOf(java.lang.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.