uk.ac.starlink.ndx
Interface MutableNdx

All Superinterfaces:
Ndx
All Known Implementing Classes:
DefaultMutableNdx

public interface MutableNdx
extends Ndx

Extends the Ndx interface to provide methods for setting the data and metadata.

Author:
Mark Taylor (Starlink)

Method Summary
 void setBadBits(int badbits)
          Sets the bad bits mask for this Ndx.
 void setEtc(Node etc)
          Sets the Etc component of this Ndx.
 void setImage(NDArray image)
          Sets the Image component of this Ndx.
 void setLabel(String label)
          Sets the label component of this Ndx.
 void setQuality(NDArray quality)
          Sets the Quality component of this Ndx.
 void setTitle(String title)
          Sets the title component of this Ndx.
 void setUnits(String units)
          Sets the units component of this Ndx.
 void setVariance(NDArray variance)
          Sets the Variance component of this Ndx.
 void setWCS(Object wcs)
          Sets the WCS component of this Ndx.
 
Methods inherited from interface uk.ac.starlink.ndx.Ndx
getAst, getBadBits, getEtc, getHdxFacade, getImage, getLabel, getQuality, getTitle, getUnits, getVariance, hasEtc, hasLabel, hasQuality, hasTitle, hasUnits, hasVariance, hasWCS, isPersistent, toXML
 

Method Detail

setImage

void setImage(NDArray image)
Sets the Image component of this Ndx. It is an error to set it to the null value.

Parameters:
image - the new Image component
Throws:
NullPointerException - if image is null

setVariance

void setVariance(NDArray variance)
Sets the Variance component of this Ndx. If set to null the Ndx will be considered to have no Variance component.

Parameters:
variance - the new Variance component

setQuality

void setQuality(NDArray quality)
Sets the Quality component of this Ndx. The supplied NDArray must be of an integer type. If set to null the Ndx will be considered to have no Quality component.

Parameters:
quality - the new Quality component
Throws:
IllegalArgumentException - if quality is an NDArray with a Type other than Type.BYTE, Type.SHORT or Type.INT

setTitle

void setTitle(String title)
Sets the title component of this Ndx.

Parameters:
title - the new title. If null, this Ndx will be considered to have no title

setLabel

void setLabel(String label)
Sets the label component of this Ndx.

Parameters:
label - the new label. if null, this Ndx will be considered to have no label

setUnits

void setUnits(String units)
Sets the units component of this Ndx.

Parameters:
units - the new units string. if null, this Ndx will be considered to have no units component

setBadBits

void setBadBits(int badbits)
Sets the bad bits mask for this Ndx.

Parameters:
badbits - the new bad bits mask

setWCS

void setWCS(Object wcs)
Sets the WCS component of this Ndx. This may be provided in one of a number of forms, currently

Parameters:
wcs - an object representing the new WCS component If null, a default WCS will be used
Throws:
IllegalArgumentException - if wcs is not one of the permitted types or otherwise fails to represent a legal WCS component

setEtc

void setEtc(Node etc)
Sets the Etc component of this Ndx. If not null the supplied Node should be a Document or Element of type <etc>.

Parameters:
etc - the new user-defined extensions component as a DOM node. If null, this Ndx will be considered to have no extensions
Throws:
IllegalArgumentException - if etc is not an Element or Document of type <etc>


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