|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.resource.CorrelationProductGroupAbs
public abstract class CorrelationProductGroupAbs
Partial implementation of a
correlation product group
.
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 SortedMap<StokesParameter,Integer> |
channels
A sorted map whose keys are correlation types and whose values are spectral channel counts. |
protected boolean |
needToRecalcChannels
Set to true when the previously calculated channels is a stale value. |
Fields inherited from interface edu.nrao.sss.util.Identifiable |
---|
UNIDENTIFIED |
Constructor Summary | |
---|---|
protected |
CorrelationProductGroupAbs()
Helps create a new group. |
Method Summary | |
---|---|
boolean |
addPolarizationProduct(StokesParameter stokes)
Attempts to add the given product to this group. |
void |
clearId()
Resets this instance's ID, and the IDs of all its components, to a value that represents the unidentified state. |
protected void |
copyInto(CorrelationProductGroupAbs other)
Sets other 's internal variables to the same values as those of
this group. |
boolean |
equals(Object o)
Returns true if o is equal to this group. |
SortedSet<StokesParameter> |
getAllowablePolarizationProducts()
Returns a set of the polarization products that may be obtained from this group. |
protected CorrelatorSubbandAbs |
getContainer()
Primarily for use by persistence mechanism. |
Long |
getId()
|
int |
getSpectralChannels()
Returns the total number of spectral channels, summed over all correlation products, for this group. |
int |
getSpectralChannels(StokesParameter stokes)
Returns the number of spectral channels of this group that are allocated to the given product. |
String |
getUUID()
Returns an ID that attempts to be universally unique. |
int |
hashCode()
|
protected abstract void |
recalculateChannels()
Called when something that can influence the total number of channels, or the distribution of channels among products, has changed. |
void |
removeAllPolarizationProducts()
Removes all polarization products from this group. |
protected void |
removeDisallowedProducts()
Removes from the channels map any entries for Stokes parameters that are not in the allowable set. |
int |
removePolarizationProduct(StokesParameter stokes)
Removes the given product from this group, if present. |
protected void |
setContainer(CorrelatorSubbandAbs newContainer)
Primarily for use by persistence mechanism. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.nrao.sss.model.resource.CorrelationProductGroup |
---|
getMinimumTotalIntegrationTime, getTotalIntegrationTime, setTotalIntegrationTime |
Field Detail |
---|
protected SortedMap<StokesParameter,Integer> channels
protected boolean needToRecalcChannels
Constructor Detail |
---|
protected CorrelationProductGroupAbs()
Method Detail |
---|
public Long getId()
getId
in interface Identifiable
public void clearId()
CorrelationProductGroup
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 CorrelationProductGroup
public String getUUID()
CorrelationProductGroup
getUUID
in interface CorrelationProductGroup
protected void setContainer(CorrelatorSubbandAbs newContainer)
protected CorrelatorSubbandAbs getContainer()
protected abstract void recalculateChannels()
protected void removeDisallowedProducts()
public SortedSet<StokesParameter> getAllowablePolarizationProducts()
CorrelationProductGroup
getAllowablePolarizationProducts
in interface CorrelationProductGroup
public boolean addPolarizationProduct(StokesParameter stokes)
CorrelationProductGroup
allowable product
.
This method returns true if it already contained
stokes or if this method successfully added it.
addPolarizationProduct
in interface CorrelationProductGroup
stokes
- the product to be added to this group.
stokes
after a
call to this method.public int removePolarizationProduct(StokesParameter stokes)
CorrelationProductGroup
removePolarizationProduct
in interface CorrelationProductGroup
stokes
- the product to be removed to this group.
public void removeAllPolarizationProducts()
CorrelationProductGroup
removeAllPolarizationProducts
in interface CorrelationProductGroup
public int getSpectralChannels()
CorrelationProductGroup
getSpectralChannels
in interface CorrelationProductGroup
public int getSpectralChannels(StokesParameter stokes)
CorrelationProductGroup
getSpectralChannels
in interface CorrelationProductGroup
stokes
- the product for which a number of channels is requested.
stokes
.protected void copyInto(CorrelationProductGroupAbs other)
other
's internal variables to the same values as those of
this group. The exceptions are the ID, which is cleared, and the UUID.
other
- a correlation product group whose values should be set to mimic the
values in this group.public boolean equals(Object o)
Items not compared in the equality tests:
Note that the number and type of correlation products is examined, but not the channels for each. Subclasses may use such a check in their overrides of this method.
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 |