NodeImpl class

The implementation of the node interface.

This Class denotes one node containing sub-nodes in a tree-like structure. Each node may have n children. Each node may be a skeleton-only node (contains only name and a reference to a mapper), or may be materialized (contains all data). Typically when fetching a node, the node is materialized but its sub-nodes are skeleton-only nodes. All skeleton nodes materialize automatically if their data is accessed.

Implemented types

Constructors

NodeImpl(String name, String nodeOwner, [String? parent, Visibility vis = Visibility.red, List<NodeValue> nodeValues = const <NodeValue>[]])
creates a fully fledged new empty node.
NodeImpl.createSkeleton(String path, String nodeOwner, StorageController? _controller)
Constructor creating a skeleton node.

Properties

controller StorageController?
get the controller needed for materializing the node if required.
getter/setter pairoverride
extendedLastModified String
Gets a worldwide unique sortable timestamp.
no setteroverride
hashCode int
The hash code for this object.
no setteroverride
lastModified int
Gets a system wide unique timestamp in milliseconds.
getter/setter pairoverride
name String
Gets the name of the current node.
no setteroverride
owner String
Gets the owner of the current object.
getter/setter pairoverride
parentPath String?
Gets the parent path of the node.
no setteroverride
path String
Gets the full path with name of the current node.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skeleton bool
Returns true if the current node is not yet materialized.
no setteroverride
tombstone bool
Checks if the current node is marked as TOMBSTONE (old deleted node).
no setteroverride
visibility Visibility
Gets the current visibility according to the TLP protocol.
getter/setter pairoverride

Methods

addChild(Node node) Future<void>
Adds a child node to this node.
override
addOrUpdateValue(NodeValue value) Future<void>
Add a key/value pair to the node.
override
addValue(NodeValue value) Future<void>
Add a key/value pair to the node.
override
deepClone() Future<Node>
Create a deep clone of the current node.
override
equals(Object? n2, [bool ignoreTimestamp = true]) bool
Checks if two NodeValue are equivalent in values.
override
get(Field field) Future<String?>
Gets an ordinal field of the node.
getChild(String name) Future<Node?>
Gets a child node from the current node.
override
getChildNodesCsv() Future<String>
Gets the child nodes as CVS export.
override
getChildren() Future<Map<String, Node>>
Get a map of all existing child nodes.
override
getValue(String key) Future<NodeValue?>
Get a specific value of the node.
override
getValues() Future<Map<String, NodeValue>>
Get a deep copy of all values stored in the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeChild(String name) Future<void>
Removes a child node from this node.
override
removeValue(String key) Future<NodeValue?>
Removes a value from the node.
override
set(Field field, String? value) Future<String?>
Sets an ordinal field of the node.
shallowClone() Future<Node>
Create a shallow clone of the current node.
override
toByteArrayStream(ByteSink out) → void
Writes the current object to the output stream.
override
toString({String prefix = '', bool showTimestamp = true, bool showOrdinals = true, bool showChildren = true}) String
A string representation of this object.
override
touch() → void
updates the timestamp to reflect that this node has been touched.
override
update(Node n2, {bool deepClone = true}) Future<void>
Update all data of the node with the data of the given node.
override
updateValue(NodeValue value) Future<NodeValue>
Update a specific value of the node.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromByteArrayStream(ByteStream in_) Future<NodeImpl>
Deserializes a NodeValue from a byteStream.
override
fromNode(Node node) Future<Node>
fromPath(String path, String owner, {bool? isTombstone, Visibility? visibility, List<NodeValue>? nodeValues, List<Node>? childNodes}) Future<Node>
Create a empty node for the given path.
getNameFromPath(String? path) String?
Returns the name part from a fully qualified node path.
getParentFromPath(String? path) String?
Returns the fully qualified node path of the parental node.

Constants

serialversionUID → const int