|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.resource.CorrelatorBasebandAbs
public abstract class CorrelatorBasebandAbs
A partial implementation of a CorrelatorBaseband
.
Version Info:
$Revision: 2289 $ |
$Date: 2009-05-07 16:13:41 -0600 (Thu, 07 May 2009) $ |
$Author: dharland $ (last person to modify) |
Field Summary | |
---|---|
protected Frequency |
bandwidth
|
protected List<CorrelatorSubbandAbs> |
subbands
|
Fields inherited from interface edu.nrao.sss.util.Identifiable |
---|
UNIDENTIFIED |
Constructor Summary | |
---|---|
protected |
CorrelatorBasebandAbs()
Helps create a new correlator baseband. |
Method Summary | |
---|---|
protected void |
addNewSubband(CorrelatorSubbandAbs newSubband)
The CorrelatorBaseband.addSubband(CorrelatorSubband) method
of classes that extend this one should call this method. |
void |
clearId()
Resets this instance's ID, and the IDs of all its components, to a value that represents the unidentified state. |
CorrelatorBasebandAbs |
clone()
Returns a copy of this baseband. |
protected void |
createdSubbandsFromPersistentStore()
Called after subbands were created from a persistent store, such as a database or XMl file. |
boolean |
equals(Object o)
Returns true if o is equal to this baseband. |
Frequency |
getAllowableBandwidthClosestTo(Frequency frequency)
Returns the allowable frequency that is closest to the parameter. |
Frequency |
getAllowableBandwidthFor(Frequency frequency)
Returns the smallest allowable bandwidth that is greater than desiredWidth . |
Frequency |
getBandwidth()
Returns a copy of the bandwidth of this baseband. |
protected abstract CorrelatorConfiguration |
getContainer()
Returns the correlator configuration that holds this baseband. |
Long |
getId()
|
protected FrequencyRange |
getProxiedRange(Signal signal)
Returns the original frequency range represented by signal and
the smaller of the signal's bandwidth and the bandwidth of this baseband. |
int |
getSubbandCount()
Returns the number of subbands currently held by this baseband. |
List<CorrelatorSubband> |
getSubbands()
Returns a list of this baseband's subbands. |
int |
hashCode()
Returns a hash code value for this baseband. |
boolean |
isPair()
Returns true if this is a paired baseband. |
int |
removeAllSubbands()
Removes all subbands from this baseband. |
protected boolean |
removeOldSubband(CorrelatorSubbandAbs unwantedSubband)
|
boolean |
removeSubband(CorrelatorSubband unwantedSubband)
Removes the unwantedSubband from this baseband, if present. |
CorrelatorSubbandAbs |
removeSubbandAt(int index)
Removes from this baseband the subband at the given index. |
void |
setBandwidth(Frequency newWidth)
Sets the bandwidth of this baseband. |
protected abstract void |
setContainer(CorrelatorConfiguration newContainer)
Sets the correlator configuration to which this baseband belongs. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.nrao.sss.model.resource.CorrelatorBaseband |
---|
addSubband, getInitialQuantization, getMaxSubbandCount, getName, getPolarization, getPolarizations, getProxiedRange, getSubbandGrid, isSinglet, makeNewSubband, proxiedRangeIsReversed |
Methods inherited from interface edu.nrao.sss.model.resource.HasBandwidth |
---|
getAllowableBandwidths, getMaximumBandwidth, getMinimumBandwidth, hasDiscreteBandwidths |
Field Detail |
---|
protected Frequency bandwidth
protected List<CorrelatorSubbandAbs> subbands
Constructor Detail |
---|
protected CorrelatorBasebandAbs()
Method Detail |
---|
public Long getId()
getId
in interface Identifiable
public void clearId()
CorrelatorBaseband
This method is useful for preparing an instance for storage in a database. The ID property (as of now, though this may change in the future) is used by our persistence mechanism to identify objects. If you are persisting this instance for the first time, you may need to call this method before performing a save. This is especially true if you have created this instance from XML, as the XML unmarshalling brings along the ID property.
clearId
in interface CorrelatorBaseband
public boolean isPair()
CorrelatorBaseband
polarizations
represented by this baseband
should be two.
Either this method or CorrelatorBaseband.isSinglet()
, but not both, should
be true. Only single and paired basebands are anticipated.
isPair
in interface CorrelatorBaseband
protected abstract CorrelatorConfiguration getContainer()
protected abstract void setContainer(CorrelatorConfiguration newContainer)
newContainer
is allowed to be null.
public Frequency getAllowableBandwidthFor(Frequency frequency)
HasBandwidth
desiredWidth
. If no allowable bandwidth is greater than
desiredWidth
, the maximum allowable bandwidth is returned.
getAllowableBandwidthFor
in interface HasBandwidth
frequency
- a desired bandwidth for which an allowable bandwidth is sought.
desiredWidth
.public Frequency getAllowableBandwidthClosestTo(Frequency frequency)
HasBandwidth
getAllowableBandwidthClosestTo
in interface HasBandwidth
frequency
- a bandwidth for which the closest allowable bandwidth is desired.
If this value is below the minimum, the minimum allowable value
is returned. If it is above the maximum, the maximum is returned.
If this value is null, the minimum value is returned.
desiredWidth
.public void setBandwidth(Frequency newWidth)
CorrelatorBaseband
An attempt to set the bandwidth to a value lower than this baseband's minimum will result in a bandwidth equal to the lowest allowable, and likewise for exceeding this bandwidth's maximum.
If this baseband has a discrete set of allowable bandwidths, then this
method will set the bandwidth to the smallest allowable value that is
greater than newWidth
.
setBandwidth
in interface CorrelatorBaseband
newWidth
- the new bandwidth of this baseband.public Frequency getBandwidth()
getBandwidth
in interface HasBandwidth
protected FrequencyRange getProxiedRange(Signal signal)
signal
and
the smaller of the signal's bandwidth and the bandwidth of this baseband.
signal
- a signal that may have been manipulated in such a way that its frequency
range is no longer the same as it had been when the signal was created.
signal
.public int getSubbandCount()
CorrelatorBaseband
getSubbandCount
in interface CorrelatorBaseband
public List<CorrelatorSubband> getSubbands()
CorrelatorBaseband
getSubbands
in interface CorrelatorBaseband
protected void addNewSubband(CorrelatorSubbandAbs newSubband)
CorrelatorBaseband.addSubband(CorrelatorSubband)
method
of classes that extend this one should call this method.
This method will:
IllegalArgumentException
is thrown.newSubband
from its former baseband, if any.newSubband
that this is its new baseband.newSubband
to this baseband's collection of subbands.
newSubband
- a new subband for this baseband.public boolean removeSubband(CorrelatorSubband unwantedSubband)
CorrelatorBaseband
unwantedSubband
from this baseband, if present.
The unwanted subband will belong to no baseband after its removal.
removeSubband
in interface CorrelatorBaseband
unwantedSubband
- the subband to be removed from this baseband.
newSubband
.protected boolean removeOldSubband(CorrelatorSubbandAbs unwantedSubband)
public CorrelatorSubbandAbs removeSubbandAt(int index)
CorrelatorBaseband
removeSubbandAt
in interface CorrelatorBaseband
index
- the index of the unwanted subband in this baseband's list of subbands.
index
.public int removeAllSubbands()
CorrelatorBaseband
removeAllSubbands
in interface CorrelatorBaseband
protected void createdSubbandsFromPersistentStore()
public String toString()
toString
in class Object
public CorrelatorBasebandAbs clone()
If anything goes wrong during the cloning procedure,
a RuntimeException
will be thrown.
clone
in interface CorrelatorBaseband
clone
in class Object
public boolean equals(Object o)
Most, but not all, public attributes take place in the comparison Those that do not are:
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |