NodeBean

Name NodeBean
Usage HandcarHierarchyService
getRootNodes getChildNodes
NodeBean
Type Complex

Description

A node which holds other nodes representing a FRAGMENT of a hierarchy view of a network or graph of objects.

Note: This structure represents a hierarchical VIEW of the relationships between objects. Since it is just a VIEW (or lens)
by which these relationships are accessed, it may not be a true representation of the full structure. In particular if the
relationships do not actually represent a hierarchy because it is circular then the same object may appear multiple times in
this structure.

OSID reference: OsidNode

Structure Definition

ShortName Name Type Description Required? Read only? Implementation Notes
id Id String Unique identifier for the object within the service.

You DO NOT HAVE TO SET THE ID -- the service constructs it for you when you create an object.

However... You MAY set it to an "alias" by which you which to later access this object. The alias id MUST be unique across
all aliases for that kind of object.

The alias id is composed of 3 parts... namespace : identifier @ authority.

If a namespace is supplied it must match the namespace of the type of object being created, if not supplied the namespace
defaults to the namespace of the type of the object being created.

If the authority is supplied it must be the "USER-ALIAS" if not supplied then this authority will be used as the default.


Even if you do supply an alias Id when creating the object then the service still constructs and assigns an new unique
internal id for the object BUT it also adds the ID you supplied as an aliasId.

Note: if you do not assign an alias when you create the object you can assign one using the id service, addAliasId method.



The id is expected to be unique and should be treated as if the id is opaque. Opaque means that no consumer should
interrogate the structure of the string but should just manipulate it as a whole.

Having said that, there two things you should know about ids: (1) They should follow this structure:
namespace:identifier@authority . (2) All ids passed through the RESTful interface have been encoded so they do not mess up
URLS when fetched when used as parameters to fetch a particular object. They are decoded back when passed back in. This is
applied not just to this ID field but ALL ids passed in as parameters and fetched back as fields on beans.

These two issues should NOT make a difference to any processing, it just explains the structure you would find if you
examined the contents of an id.

OSID reference: Id *
Required Read only on updates  
sequestered Sequestered boolean Indicates whether or not this node can live outside of this hierarchy.

OSID reference: Containable.isSequestered
  Read only  
root Root boolean Tests if this node is an ABSOLUTE root in the underlying network or graph. I.e. that it really has no parents even in
the underlying representation.

OSID reference: OsidNode.isRoot
  Read only  
leaf Leaf boolean Tests if this node is an ABSOLUTE leaf in the underlying network or graph. I.e. that it really has no children even in
the underlying representation.

OSID reference: OsidNode.isLeaf
  Read only  
childNodes Child Nodes NodeBeanList Gets the child nodes, if any, in this FRAGMENT that has been fetched from the underlying representation.

Note: A node may not be an ABSOLUTE leaf even though this method returns an empty list

OSID reference: Node.parentNodes
  Read only  
sortKey Sort Key String Sort key that can be used to sort this object when in a list.

This value is NOT persisted but is calculated based on the query that was used to fetch the objects.

For example the larger the value the more relevant the keyword search applies to this object.
     
extensionRecord Extension Record ExtensionRecordBean Extension Record for this object if the method requested that the extension record be
included.
     

JSON Structure

{
     "type" : "Node",
     "id" : "id",
     "sequestered" : true,
     "root" : true,
     "leaf" : true,
     "childNodes" : [ {
          },
          ...],
     "sortKey" : "XXXX",
     "extensionRecord" :  {
          "recordTypeIds" : ["id", ...],
          "recordProperties" : [ {
               "displayName" :  {
                    "languageTypeId" : "id",
                    "scriptTypeId" : "id",
                    "formatTypeId" : "id",
                    "text" : "XXXX"
                    },
               "description" :  {
                    "languageTypeId" : "id",
                    "scriptTypeId" : "id",
                    "formatTypeId" : "id",
                    "text" : "XXXX"
                    },
               "recordTypeId" : "id",
               "value" : "XXXX",
               "displayLabel" :  {
                    "languageTypeId" : "id",
                    "scriptTypeId" : "id",
                    "formatTypeId" : "id",
                    "text" : "XXXX"
                    },
               "associatedId" : "id"
               },
               ...],
          "associatedId" : "id"
          }
}