uk.ac.starlink.ndx
Class WrapperNdxImpl

java.lang.Object
  extended by uk.ac.starlink.ndx.WrapperNdxImpl
All Implemented Interfaces:
NdxImpl

public class WrapperNdxImpl
extends Object
implements NdxImpl

Provides an NdxImpl based on an Ndx.

Author:
Mark Taylor (Starlink)

Constructor Summary
WrapperNdxImpl(Ndx ndx)
           
 
Method Summary
 int getBadBits()
          Returns the bad bits mask used to mask the image/variance arrays against the quality array.
 Source getEtc()
          Gets an XML Source holding the extension information.
 NDArray getImage()
          Gets an NDArray containing the image data.
 String getLabel()
          Gets the label component.
 NDArray getQuality()
          Gets an NDArray containing the quality data.
 String getTitle()
          Gets the title component.
 String getUnits()
          Gets the units component.
 NDArray getVariance()
          Gets an NDArray containing the variance data.
 Object getWCS()
          Gets an object representing the world coordinate systems of this Ndx.
 boolean hasEtc()
          Indicates whether an extensions DOM is available.
 boolean hasLabel()
          Indicates whether a label component is available.
 boolean hasQuality()
          Indicates whether quality array data is present.
 boolean hasTitle()
          Indicates whether a title component is available.
 boolean hasUnits()
          Indicates whether a units component is available.
 boolean hasVariance()
          Indicates whether variance array data is present.
 boolean hasWCS()
          Indicates whether a WCS component is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrapperNdxImpl

public WrapperNdxImpl(Ndx ndx)
Method Detail

getBadBits

public int getBadBits()
Description copied from interface: NdxImpl
Returns the bad bits mask used to mask the image/variance arrays against the quality array. A value of 0 (quality has no effect) should be returned if no other value is available.

Specified by:
getBadBits in interface NdxImpl
Returns:
the bad bits mask

hasTitle

public boolean hasTitle()
Description copied from interface: NdxImpl
Indicates whether a title component is available.

Specified by:
hasTitle in interface NdxImpl
Returns:
true if and only if NdxImpl.getTitle() will return a string

getTitle

public String getTitle()
Description copied from interface: NdxImpl
Gets the title component. This method will only be called if NdxImpl.hasTitle() returns true.

Specified by:
getTitle in interface NdxImpl
Returns:
a string containing the Ndx title

hasLabel

public boolean hasLabel()
Description copied from interface: NdxImpl
Indicates whether a label component is available.

Specified by:
hasLabel in interface NdxImpl
Returns:
true if and only if NdxImpl.getLabel() will return a string

getLabel

public String getLabel()
Description copied from interface: NdxImpl
Gets the label component. This method will only be called if NdxImpl.hasLabel() returns true.

Specified by:
getLabel in interface NdxImpl
Returns:
a string containing the Ndx label (data description)

hasUnits

public boolean hasUnits()
Description copied from interface: NdxImpl
Indicates whether a units component is available.

Specified by:
hasUnits in interface NdxImpl
Returns:
true if and only if NdxImpl.getUnits() will return a string

getUnits

public String getUnits()
Description copied from interface: NdxImpl
Gets the units component. This method will only be called if NdxImpl.hasUnits() returns true.

Specified by:
getUnits in interface NdxImpl
Returns:
a string containing the units of the Ndx data

hasEtc

public boolean hasEtc()
Description copied from interface: NdxImpl
Indicates whether an extensions DOM is available.

Specified by:
hasEtc in interface NdxImpl
Returns:
true if and only if getEtc will return an XML Source giving extension information for this Ndx

getEtc

public Source getEtc()
Description copied from interface: NdxImpl
Gets an XML Source holding the extension information. This method will only be called if NdxImpl.hasEtc() returns true. The result must represent an element, or a document with a root element, whose tagname is "etc". This method may be called more than once by BridgeNdx, so it must not return a source which may have been exhausted by a previous call (for instance an old StreamSource).

Specified by:
getEtc in interface NdxImpl
Returns:
the extension information in XML form

hasWCS

public boolean hasWCS()
Description copied from interface: NdxImpl
Indicates whether a WCS component is available.

Specified by:
hasWCS in interface NdxImpl
Returns:
true if and only if getWCS will return a representation of the world coordinate system of this Ndx

getWCS

public Object getWCS()
Description copied from interface: NdxImpl
Gets an object representing the world coordinate systems of this Ndx. This may be returned in one of a number of forms; currently This method will only be called if NdxImpl.hasWCS() returns true.

Specified by:
getWCS in interface NdxImpl
Returns:
a FrameSet or Element object representing the WCS

getImage

public NDArray getImage()
Description copied from interface: NdxImpl
Gets an NDArray containing the image data.

Specified by:
getImage in interface NdxImpl
Returns:
image NDArray

hasVariance

public boolean hasVariance()
Description copied from interface: NdxImpl
Indicates whether variance array data is present.

Specified by:
hasVariance in interface NdxImpl
Returns:
true if and only if variance data is available

getVariance

public NDArray getVariance()
Description copied from interface: NdxImpl
Gets an NDArray containing the variance data. This method will only be called if NdxImpl.hasVariance() returns true.

Specified by:
getVariance in interface NdxImpl
Returns:
variance NDArray

hasQuality

public boolean hasQuality()
Description copied from interface: NdxImpl
Indicates whether quality array data is present.

Specified by:
hasQuality in interface NdxImpl
Returns:
true if and only if quality data is present

getQuality

public NDArray getQuality()
Description copied from interface: NdxImpl
Gets an NDArray containing the quality data. This method will only be called if NdxImpl.hasQuality() returns true.

Specified by:
getQuality in interface NdxImpl
Returns:
quality NDArray


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