public abstract class AbstractNode extends java.lang.Object implements Node
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractNode.AttributesLazyInitializer |
Modifier and Type | Field and Description |
---|---|
protected long |
address |
protected AbstractNode.AttributesLazyInitializer |
attributes |
protected org.apache.commons.lang3.concurrent.LazyInitializer<ObjectHeader> |
header |
protected java.lang.String |
name |
protected Group |
parent |
Modifier | Constructor and Description |
---|---|
protected |
AbstractNode(HdfBackingStorage hdfBackingStorage,
long address,
java.lang.String name,
Group parent) |
Modifier and Type | Method and Description |
---|---|
long |
getAddress()
This returns the byte offset into the file of the object header for this
node.
|
Attribute |
getAttribute(java.lang.String name)
Gets the attribute with the given name.
|
java.util.Map<java.lang.String,Attribute> |
getAttributes()
Gets the attributes associated with this
Node . |
java.io.File |
getFile()
Gets the
File object containing this Node .Call Node.getFileAsPath() instead if the file does not reside in the default file system. |
java.nio.file.Path |
getFileAsPath()
Gets the
Path object containing this Node . |
HdfFile |
getHdfFile()
Gets the parent
HdfFile of this node can be useful if you want to
resolve an absolute path in this file. |
ObjectHeader |
getHeader() |
protected <T extends Message> |
getHeaderMessage(java.lang.Class<T> clazz) |
java.lang.String |
getName()
Gets the name of this
Node |
Group |
getParent()
|
java.lang.String |
getPath()
Gets the absolute path within the file of this node including the nodes name.
|
boolean |
isAttributeCreationOrderTracked()
If
true the insertion order of attributes is tracked (recorded)
in the file. |
boolean |
isGroup()
|
boolean |
isLink()
|
protected final long address
protected final java.lang.String name
protected final Group parent
protected final org.apache.commons.lang3.concurrent.LazyInitializer<ObjectHeader> header
protected final AbstractNode.AttributesLazyInitializer attributes
protected AbstractNode(HdfBackingStorage hdfBackingStorage, long address, java.lang.String name, Group parent)
public boolean isGroup()
Node
public java.lang.String getName()
Node
Node
public java.lang.String getPath()
Node
public long getAddress()
Node
getAddress
in interface Node
public java.io.File getFile()
Node
File
object containing this Node
.Node.getFileAsPath()
instead if the file does not reside in the default file system.public java.nio.file.Path getFileAsPath()
Node
Path
object containing this Node
.getFileAsPath
in interface Node
public HdfFile getHdfFile()
Node
HdfFile
of this node can be useful if you want to
resolve an absolute path in this file.getHdfFile
in interface Node
Node
public boolean isLink()
Node
protected <T extends Message> T getHeaderMessage(java.lang.Class<T> clazz)
public java.util.Map<java.lang.String,Attribute> getAttributes()
Node
Node
.getAttributes
in interface Node
public Attribute getAttribute(java.lang.String name)
Node
Node.getAttributes()
.get(name).getAttribute
in interface Node
name
- of the requested attributenull
if not availablepublic boolean isAttributeCreationOrderTracked()
Node
true
the insertion order of attributes is tracked (recorded)
in the file.isAttributeCreationOrderTracked
in interface Node
true
if attribute creation order is tracked.public ObjectHeader getHeader()