generated.docs.javadoc.org.eclipse.dawnsci.analysis.tree.impl.DataNodeImpl.html Maven / Gradle / Ivy
DataNodeImpl (h5jan API)
org.eclipse.dawnsci.analysis.tree.impl
Class DataNodeImpl
- java.lang.Object
-
- org.eclipse.dawnsci.analysis.tree.impl.NodeImpl
-
- org.eclipse.dawnsci.analysis.tree.impl.DataNodeImpl
-
public class DataNodeImpl
extends NodeImpl
implements DataNode, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected static long
serialVersionUID
-
Fields inherited from class org.eclipse.dawnsci.analysis.tree.impl.NodeImpl
attributes, id, INDENT
-
Constructor Summary
Constructors
Constructor and Description
DataNodeImpl(long oid)
Construct a data node with given object ID
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
long[]
getChunkShape()
ILazyDataset
getDataset()
Returns the dataset for the data node.
long[]
getMaxShape()
int
getMaxStringLength()
Get maximum length of any string contained in node when it is encoded as bytes
int
getRank()
Get the rank of the dataset
java.lang.String
getString()
Get a string if this dataset is a string or dataset
java.lang.String
getTypeName()
ILazyWriteableDataset
getWriteableDataset()
Returns the ILazyWriteableDataset
for the data node
This can return null if the dataset for this datanode is not writeable or is empty
boolean
isAugmented()
boolean
isDataNode()
boolean
isString()
boolean
isSupported()
boolean
isUnsigned()
void
setAugmented()
Set state to indicate dataset has been augmented with metadata
void
setChunkShape(long... chunkShape)
Set chunk shape of dataset
void
setDataset(ILazyDataset lazyDataset)
Set given (lazy) dataset
void
setEmpty()
Set dataset to be empty
void
setMaxShape(long... maxShape)
Set maximum shape of dataset
void
setMaxStringLength(int length)
Set maximum length of any string contained in node when it is encoded as bytes
void
setString(java.lang.String text)
Set string
void
setTypeName(java.lang.String name)
Set HDF5 type name
void
setUnsigned(boolean isUnsigned)
java.lang.String
toString()
-
Methods inherited from class org.eclipse.dawnsci.analysis.tree.impl.NodeImpl
addAttribute, containsAttribute, getAttribute, getAttributeIterator, getAttributeNameIterator, getID, getNumberOfAttributes, isGroupNode, isSymbolicNode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.dawnsci.analysis.api.tree.Node
addAttribute, containsAttribute, getAttribute, getAttributeIterator, getAttributeNameIterator, getID, getNumberOfAttributes, isGroupNode, isSymbolicNode
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
- See Also:
- Constant Field Values
-
Constructor Detail
-
DataNodeImpl
public DataNodeImpl(long oid)
Construct a data node with given object ID
- Parameters:
oid
- object ID
-
Method Detail
-
isUnsigned
public boolean isUnsigned()
- Specified by:
isUnsigned
in interface DataNode
- Returns:
- true if data is unsigned
-
setUnsigned
public void setUnsigned(boolean isUnsigned)
- Specified by:
setUnsigned
in interface DataNode
-
isString
public boolean isString()
-
getMaxStringLength
public int getMaxStringLength()
Description copied from interface: DataNode
Get maximum length of any string contained in node when it is encoded as bytes
- Specified by:
getMaxStringLength
in interface DataNode
- Returns:
- length in bytes or -1 if not a string
-
setMaxStringLength
public void setMaxStringLength(int length)
Description copied from interface: DataNode
Set maximum length of any string contained in node when it is encoded as bytes
- Specified by:
setMaxStringLength
in interface DataNode
- Parameters:
length
- in bytes
-
getTypeName
public java.lang.String getTypeName()
- Specified by:
getTypeName
in interface DataNode
- Returns:
- HDF5 type name
-
setTypeName
public void setTypeName(java.lang.String name)
Description copied from interface: DataNode
Set HDF5 type name
- Specified by:
setTypeName
in interface DataNode
-
getMaxShape
public long[] getMaxShape()
- Specified by:
getMaxShape
in interface DataNode
- Returns:
- maximum shape (can be null)
-
setMaxShape
public void setMaxShape(long... maxShape)
Description copied from interface: DataNode
Set maximum shape of dataset
- Specified by:
setMaxShape
in interface DataNode
-
getRank
public int getRank()
Description copied from interface: DataNode
Get the rank of the dataset
-
getChunkShape
public long[] getChunkShape()
- Specified by:
getChunkShape
in interface DataNode
- Returns:
- chunk shape (can be null)
-
setChunkShape
public void setChunkShape(long... chunkShape)
Description copied from interface: DataNode
Set chunk shape of dataset
- Specified by:
setChunkShape
in interface DataNode
-
isSupported
public boolean isSupported()
- Specified by:
isSupported
in interface DataNode
- Returns:
- true if this dataset is supported
-
setEmpty
public void setEmpty()
Description copied from interface: DataNode
Set dataset to be empty
-
getString
public java.lang.String getString()
Description copied from interface: DataNode
Get a string if this dataset is a string or dataset
-
setString
public void setString(java.lang.String text)
Description copied from interface: DataNode
Set string
-
getDataset
public ILazyDataset getDataset()
Description copied from interface: DataNode
Returns the dataset for the data node.
This can return null for empty datasets
- Specified by:
getDataset
in interface DataNode
- Returns:
- lazy dataset
-
getWriteableDataset
public ILazyWriteableDataset getWriteableDataset()
Description copied from interface: DataNode
Returns the ILazyWriteableDataset
for the data node
This can return null if the dataset for this datanode is not writeable or is empty
- Specified by:
getWriteableDataset
in interface DataNode
- Returns:
- lazy writeable dataset
-
setDataset
public void setDataset(ILazyDataset lazyDataset)
Description copied from interface: DataNode
Set given (lazy) dataset
- Specified by:
setDataset
in interface DataNode
-
isAugmented
public boolean isAugmented()
- Specified by:
isAugmented
in interface DataNode
- Returns:
- true if dataset has been augmented with metadata
-
setAugmented
public void setAugmented()
Description copied from interface: DataNode
Set state to indicate dataset has been augmented with metadata
- Specified by:
setAugmented
in interface DataNode
-
isDataNode
public boolean isDataNode()
- Specified by:
isDataNode
in interface Node
- Overrides:
isDataNode
in class NodeImpl
- Returns:
true
if this node is a DataNode
,
false
otherwise