Standard metadata

Node type metadata

Node types are created using the system.TYPE_TYPE node type, or another node type which carries node type metadata. system.TYPE_TYPE does not define all possible node type metadata, and in some cases other node types have to be used to define node types.

Most types only need name, description and member type list.

NameReferenceDescription
Name system.NODE_NAME The name of the type.
Description system.NODE_DESCRIPTION A description of the type.
Member Type List system.MEMBER_TYPE_LIST A list of links to member types for this node type, which define the data that nodes of this type will have. Each item in the list has:
  • value - a short reference to show the user for the member type, prefixed by the tab reference and a slash if tabs are used. This default to a sequence number, and appears as nestedSequence in the service output. See Views and Tabs.
  • scale - a measure of the amount or weight of the member
  • target - the member type itself
Set Tags system.SET_TAGS A list of "tags", which are just nodes, which will be added to the system.TAG_LIST member of instances.
Tab List system.TAB_LIST A list of tabs, i.e. pages, on which to show this node.

The tab list is optional. Of omitted, then nodes of this type are always shown on a single page. See Views and Tabs for more details.

If the tab list is provided, each item has a value of form tabReference/tabName, where tabReference relates to the tab references used on the member type list, and tabName is the name to use for the tab. If tab reference and tab name are the same, the slash can be omitted.

Display Properties system.DISPLAY_PROPERTIES A list of display properties for nodes created with this type. See Display properties.

Each property is specified by a target which links to the property node, and a value which gives the value of the property.

Type Node Controller Class system.TYPE_NODE_CONTROLLER_CLASS The Java class used to control access to nodes of this type. See Node controller classes.
Copy initial values from system.COPY_INITIAL_VALUES_FROM Node from which data should be copied into newly created instances of this type. Original data is copied, not derived data.
Inherit From system.INHERIT_FROM What this type is based on. See Inheritance.
Do Not Inherit system.DO_NOT_INHERIT Member types that should not be inherited. See Inheritance.
Owner Only List system.OWNER_ONLY_LIST Lists member types that should only be modified by the node owner. See Ownership.
Package Content Change Behaviour system.PACKAGE_CONTENT_CHANGE_BEHAVIOUR If the node of which this is a type is acting as a package, what should happen if the contents of the package change. This can be omitted, or set to one of four values:
  • Update Nothing  (system.UPDATE_NOTHING) - changes to package content do not impact the package
  • Update Package And Dependents (system.UPDATE_PACKAGE_AND_DEPENDENTS) - changes to package content trigger updates to both the derived data of the package and that of the package's dependents.system.
  • Update Dependents (system.UPDATE_DEPENDENTS) - changes to package content do not trigger an update of derived data of the package, but do trigger an update of the derived data of the package's dependents.
  • Update Package (system.UPDATE_PACKAGE) - changes to package content trigger an update of the derived data of the package, but not of the package's dependents.

If omitted, the behaviour is the same as Update Nothing.

The different change behaviours meet different needs.

  • Update nothing is suitable for simple packages. It is the most efficient because the package is not set out of date as the package content changes. This is particularly useful for packages which contain automatically generated nodes, where the updating of the package node would cause contention problems as nodes are generated.
  • Update package and dependents is for packages that act as libraries, and which need to maintain indexes to the library content (in addition to the simple package listing).
  • Update dependents is a halfway house between update nothing and update package and dependents. It allows the package to be used efficiently for changing content, and yet allows other nodes to index the package content.
  • Update package is a more specialised option. It is used on packages that act as top-level containers (e.g. the survey project package), to prevent package changes inside the container from impacting nodes outside the container.
Type Derivation Script system.TYPE_DERIVATION_SCRIPT A derivation script for the type. See Derivation scripts.
Type Extension Script system.TYPE_EXTENSION_SCRIPT A script which defines extensions to the node data (used to dynamically generate data associated with the node). See Extension scripts.

To set the node extension script, use the type system.TYPE_WITH_EXTENSIONS_SCRIPT_TYPE in place of system.TYPE_TYPE. Also, set the type node controller class to com.metrici.xerula.CustomNodeControllerWithExtensionScripts.

Type Edit Extension Script system.TYPE_EDIT_EXTENSION_SCRIPT Like system.TYPE_EXTENSION_SCRIPT, but adds the extension to the edit view of the data.

Member type metadata

Member types are created using the system.MEMBER_TYPE_CLASS node type, or another node type which carries member type metadata. Not all member type metadata can be defined through system.MEMBER_TYPE_CLASS, and other node types have to be used to defined some member types.

NameReferenceDescription
Name system.NODE_NAME The name of the member type. Used as the heading when viewing or entering data.
Description system.NODE_DESCRIPTION A description of the member type. Used as the title/tool tip when viewing or entering data.
Use Value system.USE_VALUE_INDICATOR Set to true to indicate that members of this type have a value.
Use Scale system.USE_SCALE_INDICATOR Set to true to indicate that members of this type have a scale.
Use Target system.USE_TARGET_INDICATOR Set to true to indicate that members of this type have targets.
Target List system.TARGET_LIST List of nodes to which members of this type may link as targets.

Each item in the target list is composed of a value and/or a target.

If only the target is given, it is added to the list of nodes of potential links.

If a value is given, it is treated as a path relative to the instance node which describes which nodes should be included in the list. This follows the same general conventions for relative path statements on a POSIX-compliant computer.

All paths must start with a . or a slash. There can only be one *, and if this is present then this must be at the end. Trailing slashes are ignored. Absolute paths can be given; these should start with a slash. Parts of a node reference can be separated by a dot or a slash.

If both a value and a target is given, then the target is treated as a member type the targets of which are added to the list of nodes of potential links. This can not be used with the * option.

Where a value is used, the latest nodes are always returned.

A dynamically bound node can be specified as the value, using the syntax ${ref}, where ref is the binding reference. This is resolved relative to the node being edited. This can be followed by further path statements, and can be associated with a target. Where no further path statements are given, the bound version of the node will be used (which may not be the latest).

Only a single dynamic binding can be specified in each value, and it must be the start of the value.

If dynamic bindings are used, the Allow Other Targets (system.ALLOW_ANY_TARGET_INDICATOR) property should be set to true so that nodes can be moved to other packages which may have different bindings. The Enter Other Targets (system.PROPERTIES.enterOtherTargets) display property can be used to hide the entry of targets that are not on the lsit.

The current user's authority to link to the node is checked as the target list is built.

Examples. These all assume the instance is "somecompany.instance".

ValueTargetResolves to
  somecompany.othernode somecompany.othernode
/somecompany/othernode   somecompany.othernode
/somecompany.othernode   somecompany.othernode
../*   All contents of the somecompany package.
../libraries.people/*   All the contents of the somecompany.libraries.people package.
.. somecompany.tagtype All members of the somecompany.tagtype member type on the somecompany node.
./*   All members of the somecompany.instance package.
./child   somecompany.instance.child
${mynode}   Node bound to reference mynode.
${mynode}/*   A node in the package identified by binding mynode.
${mynode}/subnode   A node with a local reference of subnode in the package identified by binding mynode.
${mynode} system.NODE_LIST All targets within the node list of the node identified by binding mynode.
Allow Other Targets system.ALLOW_ANY_TARGET_INDICATOR Set to true to indicate that members may link to targets other than those in the target list.
Minimum Cardinality system.MINIMUM_CARDINALITY The minimum number of members allowed for this member type. Set to 1 to make this a mandatory member type.
Maximum Cardinality system.MAXIMUM_CARDINALITY The maximum number of members allowed for this member type. Leave blank or set to 0 to allow any number.
Display Properties system.DISPLAY_PROPERTIES A list of display properties for members of this type.

See Display properties. Each property is specified by a target which links to the property node, and a value which gives the value of the property.

Build Dependency system.BUILD_DEPENDENCY_INDICATOR For member types that use targets, set to true to indicate that the member target should be built before the node is built to ensure that a creation, build or load process works correctly. In nearly all cases, this can be set to false. It should only be set to true for member types used to produce member type lists, target lists or inheritance relationships for types or member types.
Member Type Validation Script system.MEMBER_TYPE_VALIDATION_SCRIPT A script to be used to validate data for this member type. See Validation scripts.
Derivation Priority system.DERIVATION_PRIORITY Dictates the order in which member type derivations are applied. Higher numbers are applied first. Leave blank for default. See Derivation scripts.
Member Type Derivation Script system.MEMBER_TYPE_DERIVATION_SCRIPT A script to be used to derive data for this member type. See Derivation scripts.

To set the derivation script, use the node type system.MEMBER_TYPE_CLASS_WITH_DERIVATION_SCRIPT or system.MEMBER_TYPE_CLASS_WITH_EXTENSION_SCRIPTS.

Member Type Extension Script system.MEMBER_TYPE_EXTENSION_SCRIPT A script which defines extensions for the member type, to dynamically generate data. See Extension scripts.

To set the derivation script, use the node type system.MEMBER_TYPE_CLASS_WITH_EXTENSION_SCRIPTS.

Member Extension Script system.MEMBER_EXTENSION_SCRIPT A script which defines extensions for each member, to dynamically generate data. See Extension scripts.To set the derivation script, use the node type system.MEMBER_TYPE_CLASS_WITH_EXTENSION_SCRIPTS.
Member Type Edit Extension Script system.MEMBER_TYPE_EDIT_EXTENSION_SCRIPT Like system.MEMBER_TYPE_EXTENSION_SCRIPT, but defines extensions to the edit view of the data.
Initial values system.INITIAL_VALUES

An initial set of members to be copied to nodes that use this member type, i.e. default values.

These values are only applied if [[system.COPY_INITIAL_MEMBERS_FROM]] is not specified on the node type.

Unlike Copy initial values from, this copies derived data from the member type, not original data. This seemingly inconsistent behaviour is deliberate. The purpose of Copy initial values from is to copy a template instance without modification, upon which derivation can then be applied. Initial values is part of the member type definition and should therefore use the full power of derived data.

Duplicate rule system.DUPLICATE_RULE

For member types with cardinality of 0 or greater than 1, controls the detection of duplicates. Set to one of five values:

Prior to version 3.4, this was controlled by setting Instance Node Controller Class, but from version 3.4 onwards, Duplicate rule is the preferred method for controlling this behaviour.

Instance Node Controller Class system.INSTANCE_NODE_CONTROLLER_CLASS The Java class used to control access to this member type. See Node controller classes.
Member Edit Extension Script system.MEMBER_EDIT_EXTENSION_SCRIPT Like system.MEMBER_EXTENSION_SCRIPT, but defines extensions to the edit view of the data.
Owner Only system.OWNER_ONLY_INDICATOR Set to true to restrict update of members to only the owner of the node. See Ownership.
Inherit From system.INHERIT_FROM What this type is based on. See Inheritance.
Do Not Inherit system.DO_NOT_INHERIT Member types that should not be inherited. See Inheritance.

Instance metadata

Instance metadata can apply to any node, though the node type has to include the instance metadata member types in the member type list for the node to access it.

NameReferenceDescription
Name system.NODE_NAME The name of the node.
Description system.NODE_DESCRIPTION A description of the node.
Inherit From system.INHERIT_FROM What this type is based on. See Inheritance.
Do Not Inherit system.DO_NOT_INHERIT Member types that should not be inherited. See Inheritance.
Instance Node Controller Class system.INSTANCE_NODE_CONTROLLER_CLASS The Java class used to control access to this member type. See Node controller classes.
Tag List system.TAG_LIST A list of "tags", which are just nodes, associated with this node.
Error system.NODE_ERROR Used to hold errors. Any value in this will be shown on the browse view.
Node Type system.NODE_TYPE Changes the type of the node to the given type.

This member is never inherited.

Node name and description are listed as special metadata because they are processed slightly differently from other data. They do not have to be entered directly for nodes, and can be created as the result of a derivation process.

Node types and member types do of course use the instance metadata.

Tags

Tags can be applied to any node with a tag list. Most tags are used to classify data and do not have any specific meaning. A small number of tags are defined within the system package which have a specific, system-defined meaning.

NameReferenceDescription
Tag system.TAG_TAG The node is a tag.
Verbatim system.VERBATIM_TAG Indicates that content on the node should not be filtered. This is protected - users do not generally have link permissions to this tag, and processes check the node owner's permission to link to the tag before recognising it.
Allow Stale Read system.ALLOW_STALE_READ_TAG If this node is not up-to-date, then return the out-of-date derived data without perform derivation.
Ignore Target Change system.IGNORE_TARGET_CHANGE_TAG Applied to member types. For the member type with the tag, if the target of the member is updated, do not set the member owner out of date. This is used, for example, for the member type that identifies a user's home node, since there is no particular need to recalculate the user node every time the home node is set out of date.
Deprecated system.DEPRECATED_TAG Indicates that a node is deprecated, which means it is an old feature that should no longer be used for new solutions and may be removed in the future.
Authorized system.AUTHORIZED_TAG Indicates that the node is in some way authorized. For example, built-in themes have this tag so that the set theme page does not ask for confirmation. This is protected - users do not have link permission to this tag and processes check the node owner's permission to link to the tag before recognising it.
Do Not Index system.DO_NOT_INDEX_TAG Exclude this node from the index that supports full-text search, i.e. prevents the node from being returned by search. Only applies when an external search service is being used.
Owner Only system.OWNER_ONLY_TAG Set on a member type to ensure that only node owner can set members. Same effect as the owner only indicator.
Protected system.PROTECTED_TAG Indicates that data should only be updateable when session protection is switched off. Applies to nodes or member types.