uk.ac.starlink.sog.photom
Class AnnulusPhotom

java.lang.Object
  extended by uk.ac.starlink.util.PrimitiveXMLEncodeDecode
      extended by uk.ac.starlink.sog.photom.BasePhotom
          extended by uk.ac.starlink.sog.photom.AnnulusPhotom
All Implemented Interfaces:
Cloneable, uk.ac.starlink.util.XMLEncodeDecode

public class AnnulusPhotom
extends BasePhotom

Extends BasePhotom to add facilities for storing the inner and outer scale of an annular region around the aperture. This is usually used to estimate the local sky value.

Version:
$Id$
Author:
Peter W. Draper

Field Summary
 
Fields inherited from class uk.ac.starlink.sog.photom.BasePhotom
CIRCLE, defaultDouble, ELLIPSE, INTEGER_CIRCLE, INTEGER_ELLIPSE
 
Fields inherited from class uk.ac.starlink.util.PrimitiveXMLEncodeDecode
listeners
 
Constructor Summary
AnnulusPhotom()
          Create an instance with default values all around.
 
Method Summary
 Object clone()
          Create a clone of this object.
 void encode(Element rootElement)
           
static String getDescription(int index)
          Return a description of a value returned by index.
 double getInnerscale()
          Get the innerscale
static int getNumberValues()
          Return a count of the number of values used by this class.
 double getOuterscale()
          Get the outerscale
 String getSpecificDescription(int index)
          Return a description for the column.
 int getSpecificNumberValues()
          Return a count of the number of values used by this object.
 String getTagName()
           
 Object getValue(int index)
          Return a value stored by this class by index.
 boolean sameValue(AnnulusPhotom comparison)
           
 void setFromString(String name, String value)
          Set the value of a member variable by matching its name to a known local property string.
 void setInnerscale(double value)
          Set the innerscale
 void setOuterscale(double value)
          Sets the outerscale
 String toString()
          Return a string representation of this object.
 
Methods inherited from class uk.ac.starlink.sog.photom.BasePhotom
getAngle, getIdent, getMagnitude, getMagnitudeError, getSemimajor, getSemiminor, getShape, getSignal, getSky, getStatus, getXcoord, getYcoord, sameValue, setAngle, setIdent, setMagnitude, setMagnitudeError, setSemimajor, setSemiminor, setShape, setSignal, setSky, setStatus, setXcoord, setYcoord
 
Methods inherited from class uk.ac.starlink.util.PrimitiveXMLEncodeDecode
addCDATASection, addChangeListener, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, booleanFromString, booleanToString, decode, doubleFromString, doubleToString, fireChanged, getChildElements, getChildren, getElementName, getElementValue, intFromString, intToString, longFromString, longToString, removeChangeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnulusPhotom

public AnnulusPhotom()
Create an instance with default values all around.

Method Detail

getInnerscale

public double getInnerscale()
Get the innerscale

Returns:
the value

setInnerscale

public void setInnerscale(double value)
Set the innerscale

Parameters:
value - The innerscale

getOuterscale

public double getOuterscale()
Get the outerscale

Returns:
the value

setOuterscale

public void setOuterscale(double value)
Sets the outerscale

Parameters:
value - the value

sameValue

public boolean sameValue(AnnulusPhotom comparison)

clone

public Object clone()
Description copied from class: BasePhotom
Create a clone of this object. This does a deep copy of the current state. Sub-classes should also implement this.

Overrides:
clone in class BasePhotom

toString

public String toString()
Return a string representation of this object.

Overrides:
toString in class BasePhotom

getNumberValues

public static int getNumberValues()
Return a count of the number of values used by this class.


getSpecificNumberValues

public int getSpecificNumberValues()
Description copied from class: BasePhotom
Return a count of the number of values used by this object. This same as getNumberValues, except it will work correctly for polymorphic objects.

Overrides:
getSpecificNumberValues in class BasePhotom

getValue

public Object getValue(int index)
Return a value stored by this class by index. Starts from 0 to getNumberValues(), in the same order as the short descriptions returned by getDescription. Returns an Object, which will be a Number of some kind for numeric values and a String otherwise.

Overrides:
getValue in class BasePhotom

getDescription

public static String getDescription(int index)
Return a description of a value returned by index.


getSpecificDescription

public String getSpecificDescription(int index)
Description copied from class: BasePhotom
Return a description for the column. This same as getDescription, except it will work correctly for polymorphic objects.

Overrides:
getSpecificDescription in class BasePhotom

getTagName

public String getTagName()
Specified by:
getTagName in interface uk.ac.starlink.util.XMLEncodeDecode
Overrides:
getTagName in class BasePhotom

encode

public void encode(Element rootElement)
Specified by:
encode in interface uk.ac.starlink.util.XMLEncodeDecode
Overrides:
encode in class BasePhotom

setFromString

public void setFromString(String name,
                          String value)
Description copied from class: BasePhotom
Set the value of a member variable by matching its name to a known local property string.

Overrides:
setFromString in class BasePhotom
Parameters:
name - symbolic name of the value
value - the value encoded as a String


Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.