public abstract class Node extends Object implements Session, Serializable
Record
,
Field
,
ArrayValue
,
SingleValue
,
ValueNode
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
Node.DuplicateNodeAction
DuplicateNodeAction lists all actions that can be taken automatically when a target field already exists during a record copy or lookup.
|
static class |
Node.NodeType
NodeType lists all concrete data node types used in Data Pipeline.
|
Session.SessionImpl
Modifier and Type | Field and Description |
---|---|
protected Session.SessionImpl |
session |
Constructor and Description |
---|
Node() |
Modifier and Type | Method and Description |
---|---|
protected void |
assertNotAncestorOf(Node parentNode) |
<T> boolean |
containsSessionProperty(Class<T> type) |
<T> boolean |
containsSessionProperty(Class<T> type,
String name) |
boolean |
containsSessionProperty(String name) |
void |
copySessionPropertiesFrom(Session sourceSession) |
int |
getNodeDepth()
Returns this node's distance from its root node.
|
abstract Node.NodeType |
getNodeType() |
Field |
getParentField()
Returns the closest parent record's field that this node is the child of, otherwise null if one does not exist.
|
abstract Node |
getParentNode() |
Record |
getParentRecord()
Returns the closest parent record that this node is the child of, otherwise null if one does not exist.
|
<T> T |
getSessionProperty(Class<T> type) |
<T> T |
getSessionProperty(Class<T> type,
String name) |
<T> T |
getSessionProperty(String name) |
abstract boolean |
hasChildNodes()
Returns
true if this node contains any sub nodes. |
abstract boolean |
hasChildRecords()
Returns
true if this node contains any descendant, record nodes. |
boolean |
isAncestorOf(Node node)
Returns
true if the supplied node is a descendant of this one. |
boolean |
isChildNode()
Indicates if this record has a parent record (i.e.
|
abstract boolean |
isNotNull()
Returns
true if this node does not contain a null value. |
abstract boolean |
isNull()
Returns
true if this node contains a null value. |
boolean |
isValueNode()
Returns
true if this node is a ValueNode (Record, ArrayValue, or SingleValue). |
Set<String> |
keySet() |
protected abstract void |
removeChildNode(Node child) |
<T> void |
setSessionProperty(Class<T> type,
Object value) |
<T> void |
setSessionProperty(Class<T> type,
String name,
Object value) |
void |
setSessionProperty(String name,
Object value) |
abstract String |
toString() |
protected transient Session.SessionImpl session
public abstract Node getParentNode()
protected abstract void removeChildNode(Node child)
public abstract boolean isNull()
true
if this node contains a null value. In concrete terms, only Field
and SingleValue
can contain nulls while not
being null themselves. Both Record
and ArrayValue
will return false
even if they have no values or null only values.public abstract boolean isNotNull()
true
if this node does not contain a null value. In concrete terms, only Field
and SingleValue
can contain nulls
while not being null themselves. Both Record
and ArrayValue
will return true
even if they have no values or null only
values.public Field getParentField()
public Record getParentRecord()
getParentField()
,
isChildNode()
,
hasChildRecords()
,
getNodeDepth()
,
Field.getValueAsRecord()
,
Field#getValueAsRecords()
public abstract Node.NodeType getNodeType()
public boolean isChildNode()
getParentField()
can be used to retrieve the parent record's field that this
record is attached to.getParentField()
,
getParentRecord()
,
hasChildRecords()
,
#getRecordDepth()
,
Field.getValueAsRecord()
,
Field#getValueAsRecords()
public abstract boolean hasChildNodes()
true
if this node contains any sub nodes.public abstract boolean hasChildRecords()
true
if this node contains any descendant, record nodes.public int getNodeDepth()
public boolean isAncestorOf(Node node)
true
if the supplied node is a descendant of this one.protected void assertNotAncestorOf(Node parentNode)
public boolean isValueNode()
true
if this node is a ValueNode (Record, ArrayValue, or SingleValue).public <T> boolean containsSessionProperty(Class<T> type, String name)
containsSessionProperty
in interface Session
public <T> boolean containsSessionProperty(Class<T> type)
containsSessionProperty
in interface Session
public boolean containsSessionProperty(String name)
containsSessionProperty
in interface Session
public void copySessionPropertiesFrom(Session sourceSession)
copySessionPropertiesFrom
in interface Session
public <T> T getSessionProperty(Class<T> type, String name)
getSessionProperty
in interface Session
public <T> T getSessionProperty(Class<T> type)
getSessionProperty
in interface Session
public <T> T getSessionProperty(String name)
getSessionProperty
in interface Session
public <T> void setSessionProperty(Class<T> type, String name, Object value)
setSessionProperty
in interface Session
public <T> void setSessionProperty(Class<T> type, Object value)
setSessionProperty
in interface Session
public void setSessionProperty(String name, Object value)
setSessionProperty
in interface Session
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.