|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ndx.BridgeNdx
public class BridgeNdx
Default Ndx implementation.
This class builds an Ndx from an NdxImpl
.
The static initialiser for this class is also responsible
for creating and registering the
HdxResourceType
which corresponds to
Ndx. For this to happen, this BridgeNdx
class must be named in a
Hdx.properties
file, as described in class
HdxResourceType
.
Nested Class Summary | |
---|---|
protected class |
BridgeNdx.BridgeNdxHdxFacade
|
Field Summary | |
---|---|
protected Document |
ndxDocumentCache
|
Constructor Summary | |
---|---|
BridgeNdx(NdxImpl impl)
Constructs an Ndx implementation from an NdxImpl
object. |
Method Summary | |
---|---|
FrameSet |
getAst()
Get the world coordinate system of the NDX as an AST FrameSet. |
int |
getBadBits()
Gets the value of the badBits mask. |
Source |
getEtc()
Returns the XML containing extension information for this NDX. |
HdxFacade |
getHdxFacade()
Obtains a HdxFacade, which enables us to examine and manipulate the Ndx in a DOM-like way. |
static HdxResourceType |
getHdxResourceType()
Returns the Hdx type corresponding to Ndx objects. |
NDArray |
getImage()
Returns the image component of this NDX. |
String |
getLabel()
Returns the label string for this Ndx. |
NDArray |
getQuality()
Returns the quality component of this NDX. |
String |
getTitle()
Returns the title of this Ndx. |
String |
getUnits()
Returns the units string for this Ndx. |
NDArray |
getVariance()
Returns the variance component of this NDX. |
boolean |
hasEtc()
Find out if the NDX contains user-defined extension information. |
boolean |
hasLabel()
Indicates whether there is a label component. |
boolean |
hasQuality()
Indicates whether there is a quality component. |
boolean |
hasTitle()
Indicates whether there is a title component. |
boolean |
hasUnits()
Indicates whether there is a units component. |
boolean |
hasVariance()
Indicates whether there is a variance component. |
boolean |
hasWCS()
Find out if the NDX has World Coordinate System information. |
boolean |
isPersistent()
Indicates whether this Ndx represents a persistent object. |
Source |
toXML(URL base)
Deprecated. replaced by getHdxFacade().getSource(URLUtils.urlToUri(base)) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Document ndxDocumentCache
Constructor Detail |
---|
public BridgeNdx(NdxImpl impl)
Ndx
implementation from an NdxImpl
object.
impl
- object which provides services to this BridgeNdxMethod Detail |
---|
public NDArray getImage()
Ndx
Note that this returns the raw image NDArray object,
which should not in general be used directly for reading image
data, since it has not been masked by a quality component if present.
To obtain a properly masked version of the image data for read access,
use the Ndxs.getMaskedImage(Ndx)
method.
getImage
in interface Ndx
public NDArray getVariance()
Ndx
Note that this returns the raw variance NDArray object,
which should not in general be used directly for reading variance
data, since it has not been masked by a quality component if present.
To obtain a properly masked version of the variance data for read access,
use the Ndxs.getMaskedVariance(Ndx)
method.
May only be called if Ndx.hasVariance()
returns true.
getVariance
in interface Ndx
public NDArray getQuality()
Ndx
May only be called if Ndx.hasQuality()
returns true.
getQuality
in interface Ndx
public boolean hasVariance()
Ndx
hasVariance
in interface Ndx
Ndx.getVariance()
may be calledpublic boolean hasQuality()
Ndx
hasQuality
in interface Ndx
Ndx.getQuality()
may be calledpublic boolean hasTitle()
Ndx
hasTitle
in interface Ndx
Ndx.getTitle()
may be calledpublic boolean hasLabel()
Ndx
hasLabel
in interface Ndx
Ndx.getLabel()
may be calledpublic boolean hasUnits()
Ndx
hasUnits
in interface Ndx
Ndx.getUnits()
may be calledpublic boolean hasEtc()
Ndx
hasEtc
in interface Ndx
Ndx.getEtc()
may be calledpublic boolean hasWCS()
Ndx
If it exists, then the Ndx.getAst()
method may be called to
access it as an AST FrameSet
.
Note: in due course, when the uk.ac.starlink.wcs package has been released a getWCS method will be provided to access it as a WCS object.
hasWCS
in interface Ndx
Ndx.getAst()
(and in due course getWCS
can be calledpublic String getTitle()
Ndx
Ndx.hasTitle()
returns true.
getTitle
in interface Ndx
public String getLabel()
Ndx
Ndx.hasLabel()
returns true.
getLabel
in interface Ndx
public String getUnits()
Ndx
Ndx.hasUnits()
returns true.
getUnits
in interface Ndx
public Source getEtc()
Ndx
Ndx.hasEtc()
returns true.
getEtc
in interface Ndx
SourceReader
public int getBadBits()
Ndx
getBadBits
in interface Ndx
public FrameSet getAst()
Ndx
Note: This method is intended as a temporary measure until the uk.ac.starlink.wcs package has been released. At that time a getWCS method will be provided, and this one will be deprecated.
getAst
in interface Ndx
Ndx.hasWCS()
public boolean isPersistent()
Ndx
Ndx.toXML(java.net.URL)
method all contain URLs referencing
genuine resources. If false, then this Ndx is in some sense
virtual, and one or more of the array elements in the the XML
generated by toXML will reference phantom resources.
isPersistent
in interface Ndx
public Source toXML(URL base)
getHdxFacade().getSource(URLUtils.urlToUri(base))
Does not currently throw HdxException
if the
XML cannot be generated, but it should.
toXML
in interface Ndx
base
- URL against which others are to be relativised
PluginException
- (unchecked) if the XML cannot be generatedSourceReader
public static HdxResourceType getHdxResourceType()
public HdxFacade getHdxFacade()
Ndx
getHdxFacade
in interface Ndx
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |