Node

Node objects are items in the Metadata's single-rooted tree-like structure. Each Node item is a collection of its lower level Node type. There are 5 types of Metadata Node objects:

The MetaJob is a collection of MetaGroup objects, where each MetaGroup is a collection of one or more MetaDocument objects, and so on, except for the MetaPage which does not have child nodes.

Properties and methods

All Node objects share a number of properties and methods that are common to all Node object types. There are also properties and methods that are either unique to a specific Node object type, or shared between only a few of them.

Each Node object type provides methods to access its children (in other words, Nodes that are located underneath that Node item in the tree structure). The method's name varies to match the type of Node. For example, the child accessor method in a MetaDocument node is named Datapage.
There is also a generic accessor method named Item that is common across all Node object types. The Item method of the MetaGroup returns a MetaDocument, while the same method for a MetaDatapage returns a MetaPage.
Note: The MetaPage object does not have a child accessor method as it does not contain any Node objects.

For the available properties and methods see the Node type's documentation: MetaJob, MetaGroup, MetaDocument, MetaDatapage, and MetaPage.

Including or excluding nodes from the output

The Selected property of any Node object is used to select whether the node - and all of its children, down to the smallest unit - are to be included in the final output or not.

If a node has its Selected property set to true, all of its children that also have their own Selected property set to true will print.

If Selected is false, its children will not print, regardless of their Selected status.

Methods like Count, Index or PageCount work on all nodes, regardless of their Selected attributes.
Methods whose names start with "Selected" however are meant to work with selected nodes. In other words, "Selected..." methods only consider nodes that are set to be part of the output.
SelectedCount only considers child nodes that have their Selected property set to true, but also checks if their parents also have their Selected property to true. It is therefore possible that a node is selected but is not counted.
The SelectedState property can be used to verify the effective selection state of a node, i.e. whether or not a node will be part of the output and, if not, whether it is because it is itself not selected or one of its parents is not.

Attributes and Fields

In addition to being a collections of objects, a Metadata Node also contains two types of elements, called Attributes and Fields. These are name/value pairs, where the name is case-insensitive.

  • An Attribute is a read-only, system-defined element which holds certain information about a certain node in the Metadata structure. This information can be static (e.g. the size of a physical page) or evaluated on-the-fly (e.g. the number of documents in a group). Attributes are non-repetitive (i.e. name is unique) and do not persist through Metadata recreation.
    For an overview of Attributes and in which Node objects they are available, see the Metadata Attributes reference.
  • A Field is a read-write, user-defined element which holds custom information about a certain node in the Metadata structure. Fields are repetitive (i.e. the same field may appear multiple times) and persist through Metadata recreation.

They are each stored in a collection container object (a MetaAttributeCollection and a MetaFieldCollection, respectively).
As is the case with Nodes, both collections share a number of methods and properties. The Fields collection however has additional methods to support multiple entries with the same name, which is forbidden with attributes.