public class NDFDataNode extends HDSDataNode
MAX_CHILDREN_PER_ARRAY
Constructor and Description |
---|
NDFDataNode(File file)
Constructs an NDFDataNode from the file name of a container file.
|
NDFDataNode(HDSObject hobj)
Constructs an NDFDataNode from an HDSObject.
|
NDFDataNode(String path)
Constructs an NDFDataNode from an HDS path.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowsChildren()
Indicates whether this node allows child nodes or not.
|
void |
configureDetail(DetailViewer dv)
No custom configuration is performed.
|
Iterator |
getChildIterator()
Returns the standard NDF components in a standard order.
|
Object |
getDataObject(DataType dtype)
The
DefaultDataNode implementation returns any data object
which has been registered using DefaultDataNode.registerDataObject(uk.ac.starlink.datanode.nodes.DataType, java.lang.Object) . |
String |
getDescription()
Gets a concise description of this object.
|
Icon |
getIcon()
Returns a default icon, unless setIconID has been called, in which
case it returns the one indicated by that call.
|
String |
getName()
Gets the name of this object.
|
String |
getNodeTLA()
Returns the string "NDF".
|
String |
getNodeType()
Returns a short sentence indicating what kind of node this is.
|
byte |
getQualityBadbits() |
NDShape |
getShape() |
boolean |
hasDataObject(DataType dtype)
The
DefaultDataNode implementation returns true for
only those data objects which have been registered using
DefaultDataNode.registerDataObject(uk.ac.starlink.datanode.nodes.DataType, java.lang.Object) . |
boolean |
isNdx() |
getHDSFromFile, getHDSFromPath, getParentObject, getPathElement, getPathSeparator, isMagic
beep, getChildMaker, getCreator, getLabel, makeChild, makeErrorChild, registerDataObject, setChildMaker, setCreator, setDescription, setIconID, setLabel, setName, setParentObject, toString
public NDFDataNode(HDSObject hobj) throws NoSuchDataException
NoSuchDataException
public NDFDataNode(File file) throws NoSuchDataException
NoSuchDataException
public NDFDataNode(String path) throws NoSuchDataException
NoSuchDataException
public boolean allowsChildren()
HDSDataNode
HDSDataNode
may allow children
in two ways: it may either be a scalar structure, in which case
its children will be its components, or it may be an array of
structures, in which case its children will be the elements of
the array. Here the term structure is used in the HDS sense.
We do not consider the elements of an array to be children if the if there are 'too many' elements (more than MAX_CHILDREN_PER_ARRAY). This is arbitrary, but is intended to prevent display getting too unwieldy.
Another possibility would be to allow the elements of an array of primitives to be considered as elements. Following the (sensible) behaviour of HDSTRACE We don't do this.
allowsChildren
in interface DataNode
allowsChildren
in class HDSDataNode
true
if the node is of a type which can have
child nodes, false
otherwisepublic Iterator getChildIterator()
getChildIterator
in interface DataNode
getChildIterator
in class HDSDataNode
DataNode
s considered to be the
children of this nodepublic Icon getIcon()
DefaultDataNode
getIcon
in interface DataNode
getIcon
in class DefaultDataNode
public String getDescription()
DataNode
getName
method, since they may be presented together.
It should be on one line, and preferably no longer than around
70 characters. The null
value may be returned if
there is nothing to say.getDescription
in interface DataNode
getDescription
in class HDSDataNode
public String getName()
DataNode
getName
in interface DataNode
getName
in class HDSDataNode
public String getNodeTLA()
getNodeTLA
in interface DataNode
getNodeTLA
in class HDSDataNode
public String getNodeType()
DataNode
getNodeType
in interface DataNode
getNodeType
in class HDSDataNode
DataNode
public void configureDetail(DetailViewer dv)
DefaultDataNode
configureDetail
in interface DataNode
configureDetail
in class HDSDataNode
dv
- the detail viewer which this node is given an opportunity
to configurepublic boolean hasDataObject(DataType dtype)
DefaultDataNode
DefaultDataNode
implementation returns true for
only those data objects which have been registered using
DefaultDataNode.registerDataObject(uk.ac.starlink.datanode.nodes.DataType, java.lang.Object)
.hasDataObject
in interface DataNode
hasDataObject
in class HDSDataNode
dtype
- data object type of interestgetDataObject(type)
is likely to be successfulpublic Object getDataObject(DataType dtype) throws DataObjectException
DefaultDataNode
DefaultDataNode
implementation returns any data object
which has been registered using DefaultDataNode.registerDataObject(uk.ac.starlink.datanode.nodes.DataType, java.lang.Object)
.getDataObject
in interface DataNode
getDataObject
in class HDSDataNode
dtype
- data object type of interesttype
DataObjectException
public byte getQualityBadbits()
public boolean isNdx()
public NDShape getShape()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.