public class AcceleratorSeqCombo extends AcceleratorSeq
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
s_strType |
_sequences, m_arrNodes, m_bucSequence, nodeTable
channelSuite, m_bolIsSoft, m_bolStatus, m_bolValid, m_bucAlign, m_bucAper, m_bucTwiss, m_dblLen, m_dblPos, m_dblS, m_mapAttrs, m_objAccel, m_seqParent, m_strEId, m_strId, m_strPId
Constructor and Description |
---|
AcceleratorSeqCombo(java.lang.String strID,
Accelerator accelerator,
DataAdaptor adaptor)
Constructor
|
AcceleratorSeqCombo(java.lang.String strID,
java.util.List<AcceleratorSeq> seqs)
Primary constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object sequence)
Override the equals method to return true if and only if the two combo sequences
have equal IDs, are both combo sequences and have equal constituents.
|
java.util.List<AcceleratorNode> |
getAllInclusiveNodes()
Get all nodes including this sequence and constituent sequences and all of their children.
|
java.util.List<AcceleratorNode> |
getAllNodes()
Fetch all nodes looking deeply through nested child sequences.
|
java.util.List<AcceleratorSeq> |
getBaseConstituents()
Get the constituent sequences looking deeply even if the combo sequences are nested in many layers.
|
java.util.List<AcceleratorSeq> |
getBaseConstituentsWithQualifier(TypeQualifier qualifier)
Get the constituent sequences looking deeply even if the combo
sequences are nested in many layers.
|
java.util.List<java.lang.String> |
getConstituentNames()
gets the list of the names of the constituent seqnences
|
java.util.List<AcceleratorSeq> |
getConstituents()
Get the constituent sequences.
|
java.util.List<AcceleratorSeq> |
getConstituentsWithQualifier(TypeQualifier qualifier)
Get the constituent sequences that are matched by the qualifier.
|
java.lang.String |
getEntranceID()
Get the ID of the first base constituent sequence of this combo sequence.
|
static AcceleratorSeqCombo |
getInstance(Accelerator accelerator,
DataAdaptor adaptor)
Instantiate a an AcceleratorSeqCombo or a subclass depending on whether the sequences form a ring.
|
static AcceleratorSeqCombo |
getInstance(java.lang.String strID,
Accelerator accelerator,
DataAdaptor adaptor)
Instantiate a an AcceleratorSeqCombo or a subclass depending on whether the sequences form a ring.
|
static AcceleratorSeqCombo |
getInstance(java.lang.String strID,
java.util.List<AcceleratorSeq> sequences)
Instantiate a an AcceleratorSeqCombo or a subclass depending on whether the sequences form a ring.
|
static AcceleratorSeqCombo |
getInstanceForRange(java.lang.String comboID,
AcceleratorSeq startSequence,
AcceleratorSeq endSequence)
Get an instance of a non-cycling combo sequence which starts and ends between the specified sequences inclusively.
|
static java.util.List<AcceleratorSeqCombo> |
getInstancesForRange(java.lang.String comboID,
AcceleratorSeq startSequence,
AcceleratorSeq endSequence)
Get the list of all non-cycling combo sequences which start and end between the specified sequences inclusively.
|
double |
getLength()
override the total length for this combo sequence
|
java.util.List<AcceleratorNode> |
getNodes()
Shallow fetch of nodes.
|
AcceleratorNode |
getNodeWithId(java.lang.String label)
Search deeply for and get the node with the specified id.
|
double |
getPosition(AcceleratorNode node)
get the position of a node in the sequence, including
the extra length of the sequence starting position itself
Note: this way could also be done in the parent AcceleratorSeq class,
be we choose to use a more efficient scheme there, specfic to
primary sequences.
|
java.util.List<AcceleratorSeq> |
getSequences()
Shallow fetch of sequences.
|
protected static java.util.List<AcceleratorSeq> |
getSequences(Accelerator accelerator,
DataAdaptor adaptor)
Get the sequences in the accelerator which are referenced in the adaptor.
|
java.lang.String |
getType()
Override to identify this sequence as a combo sequence
|
int |
hashCode()
Override hashCode() as required when overriding equals()
|
void |
write(DataAdaptor adaptor)
Write this sequence's definition to a data adaptor.
|
addBucket, addNode, addNodeAt, addSequenceChain, addSoft, appendNodesOfClassWithQualifier, appendNodesWithQualifier, canPrecede, contains, dataLabel, filterNodesByClass, filterNodesByStatus, formsRing, getAllInclusiveNodes, getAllInclusiveNodesWithQualifier, getAllNodes, getAllNodesOfType, getAllNodesWithQualifier, getAllSeqs, getDistanceBetween, getIndexOfNode, getLeaves, getNodeAt, getNodeCount, getNodes, getNodesOfClassWithQualifier, getNodesOfClassWithQualifier, getNodesOfClassWithStatus, getNodesOfType, getNodesOfType, getNodesWithQualifier, getNodesWithQualifier, getPredecessors, getPrimaryAncestor, getRelativePosition, getRelativePosition, getSequence, getSequenceBuc, getSequences, getShortestRelativePosition, indexToAddNode, isLinear, orderSequences, recurNodeSearch, recurSeqSearch, removeAllNodes, removeNode, setSequence, sortNodes, sortNodesByProximity, sortNodesByRelativePosition, update, writeDeeply
channelSuite, clear, findChannel, getAccelerator, getAlign, getAndConnectChannel, getAper, getBucket, getBuckets, getChannel, getDesignPropertyValue, getEId, getHandles, getId, getLivePropertyChannels, getLivePropertyValue, getParent, getPId, getPitchAngle, getPosition, getRollAngle, getSDisplay, getSoftType, getStatus, getTwiss, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, isKindOf, isMagnet, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setLength, setParent, setPitchAngle, setPosition, setRollAngle, setSDisplay, setStatus, setTwiss, setValid, setXOffset, setYawAngle, setYOffset, setZOffset, toString
public static final java.lang.String s_strType
public AcceleratorSeqCombo(java.lang.String strID, java.util.List<AcceleratorSeq> seqs)
public AcceleratorSeqCombo(java.lang.String strID, Accelerator accelerator, DataAdaptor adaptor)
public static AcceleratorSeqCombo getInstance(java.lang.String strID, java.util.List<AcceleratorSeq> sequences)
strID
- The identifier of the new combo sequencesequences
- The sequences to flatten into a combo sequencepublic static AcceleratorSeqCombo getInstance(java.lang.String strID, Accelerator accelerator, DataAdaptor adaptor)
strID
- The identifier of the new combo sequenceaccelerator
- The accelerator that holds to the sequencesadaptor
- the data adaptor for specifying the sequences to combinepublic static AcceleratorSeqCombo getInstance(Accelerator accelerator, DataAdaptor adaptor)
accelerator
- The accelerator that holds to the sequencesadaptor
- the data adaptor for specifying the sequences to combinepublic static AcceleratorSeqCombo getInstanceForRange(java.lang.String comboID, AcceleratorSeq startSequence, AcceleratorSeq endSequence)
comboID
- unique ID to assign to the new combo sequencestartSequence
- first sequence in comboendSequence
- last sequence in combopublic static java.util.List<AcceleratorSeqCombo> getInstancesForRange(java.lang.String comboID, AcceleratorSeq startSequence, AcceleratorSeq endSequence)
comboID
- unique ID to assign to the new combo sequencestartSequence
- first sequence in comboendSequence
- last sequence in comboprotected static java.util.List<AcceleratorSeq> getSequences(Accelerator accelerator, DataAdaptor adaptor)
accelerator
- the accelerator from which to get the sequencesadaptor
- the combo sequence adaptorpublic void write(DataAdaptor adaptor)
write
in interface DataListener
write
in class AcceleratorSeq
adaptor
- the adaptor to which to write out this combo sequence's definition.public java.lang.String getType()
getType
in class AcceleratorSeq
public double getLength()
getLength
in class AcceleratorSeq
public java.util.List<java.lang.String> getConstituentNames()
public double getPosition(AcceleratorNode node)
getPosition
in class AcceleratorSeq
node
- - the node for which the position is wantedpublic java.lang.String getEntranceID()
getEntranceID
in class AcceleratorSeq
public AcceleratorNode getNodeWithId(java.lang.String label)
getNodeWithId
in class AcceleratorSeq
label
- The id of the node we are seeking.public java.util.List<AcceleratorNode> getNodes()
getNodes
in class AcceleratorSeq
public java.util.List<AcceleratorSeq> getSequences()
getSequences
in class AcceleratorSeq
public java.util.List<AcceleratorSeq> getConstituents()
public java.util.List<AcceleratorSeq> getConstituentsWithQualifier(TypeQualifier qualifier)
qualifier
- The qualifier to restrict which constituents are returnedpublic java.util.List<AcceleratorSeq> getBaseConstituents()
public java.util.List<AcceleratorSeq> getBaseConstituentsWithQualifier(TypeQualifier qualifier)
qualifier
- The qualifier for matching which constituents get returnedpublic java.util.List<AcceleratorNode> getAllInclusiveNodes()
getAllInclusiveNodes
in class AcceleratorSeq
public java.util.List<AcceleratorNode> getAllNodes()
getAllNodes
in class AcceleratorSeq
public boolean equals(java.lang.Object sequence)
equals
in class java.lang.Object
sequence
- the sequence against which to comparepublic int hashCode()
hashCode
in class java.lang.Object