Nevron Open Vision Documentation
Nevron.Nov.Dom Namespace / NNode Class
Members


In This Topic
    NNode Class
    In This Topic
    Represents an object, which can reside in a DOM (Document Object Model) hierarchy. Serves as base class for all types of nodes, implemented by the Nevron DOM and derivate modules and products.
    Object Model
    NNode Class
    Syntax
    'Declaration
     
    
    Public MustInherit Class NNode 
       Implements INDomDeepEquals, INDomDeeplyCloneable, Nevron.Nov.INDeeplyCloneable 
    'Usage
     
    
    Dim instance As NNode
    Remarks
    All objects in the Nevron DOM directly or indirectly derive from the NNode abstract class. In their core DOM hierarchies are tree structures the items of which are NNode instances (nodes).

    There is a single instance of the NSchema class associated with each instance of a NNode derivate. The node schema is used to extend the metadata information available for each type of node. The schema for a specific node instance can be obtained by the Schema property.

    Each node knows about its parent node and way in which it is aggregated in it. The parent node can be obtained from the ParentNode property, which is again of type NNode. The GetAggregationInfo() method returns information about the way in which a node is aggregated in its current parent. The NNode class provides an extensive set of methods that help you work with the ancestors context implied by the current parent node.

    Nodes implement the composition pattern in two ways:

    • each node may contain child nodes. The NNode class implements an extensive set of operations, help you deal with child and descendant nodes. Nodes, which are children of another node are considered to reside in the parent node Children Dimension. The current set of child nodes is obtained by the GetChildren() method.

      When the node schema is created (in the static node constructor), the user can specify the way in which the node contains its child nodes, by settings the NodeType property of the scheme to the one of the following values: Leaf - the default By default NNode derives are considered as leafs, which means that they cannot have any child nodes. In the case of a leaf node, some of the NNode methods that query the node children will raise an exception. All NNode methods that attempt to modify the node children will also raise an exception. Collection When declared as collection, the node children are accessed and modified via indexing. The children that can be added as child nodes, must be instances or derived from the schema specified by the NSchema.ChildrenBaseSchema property. In this way developers can create nodes, that are strongly typed collections of another specific node types. Container When declared as container, the node children are accessed and modified by child descriptors. A child descriptor or simply child is created for a node schema by calling the AddChild schema method. The method returns a NChild object, which just as in the case of properties needs to be stored as a static node field. The ability to mix collection and container children aggregation, gives developers the flexibility to create complex and neat children hierachies.

    • each node may have properties exposing other nodes. Nodes exposed by properties of another node are called Property Nodes. The node itself does not consider them to be child nodes, however property nodes consider the node to be their parent. The current set of of non-null property nodes is obtained by the GetPropertyNodes() method.

    Collectivelly, the set of Child Nodes and Property Nodes form the set of the Aggregated Nodes. The current set of Aggregated Nodes can be obtained by the GetAggregatedNodes() methods.

    Inheritance Hierarchy
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later)

    See Also