Skip to content
Ben Tupper edited this page Nov 4, 2015 · 12 revisions

NodeRefClass

NodeRefClass is the root super class containing the XML::xmlNode for database entities (containers, artifacts, sample, processes, etc.), managing http/RESTful transactions (GET, PUT, POST, DELETE, etc.) and providing generic convenience methods (get_name, get_type, toString, etc.)

Each NodeRefClass contains a LimsRefClass reference which has methods methods for managing http transactions and permits casting of XML::xmlNode content to one of the NodeRefClass family. By default the methods try to return a NodeRefClass or one of its subclasses. While the LimsRefClass instance is typically shared by all Nodes during an R session, multiple instances of LimsRefClass are allowed.

Superclasses

None.

Properties
  • lims LimsRefClass instance for managing transactions, possibly NULL
  • uri the uri of the entity, possibly ""
  • ns XML::XMLNamespace value
  • node XML::xmlNode, possibly NULL

Subclasses may add other properties; see each subclass for details.

Methods

These methods are wrappers around LimsRefClass methods of the same name. Not all subclasses implement these VERB-like methods - some subclasses override these methods when the transaction is not support. Be advised that not ALL subclasses will have this override implemented even if the transaction is disallowed. The descriptions are taken directly from this.

  • GET() Transfer a current representation of the target resource.
  • PUT() Replace all current representations of the target resource with the request payload.
  • POST() Perform resource-specific processing on the request payload.
  • DELETE() Remove all current representations of the target resource.

The methods below are for the programmer's convenience and may be overwritten by subclasses.

  • show() prints pretty output to the console
  • unames() retrieve the unique names of thx XML::xmlChildren
  • toString() Retrieve a character reprsentation of the node via XML::toString.XMLNode
  • has_child(x) determine is the node contains the child XML::xmlNode or child name
  • get_field(name) retrieve the value of the UDF child node specified by name
  • get_type() retrieve the node type (possibly "")
  • get_name() retrieve the name of the node (not necessarily the same as XML::xmlNames()1, possibly "")
  • set_udfs(v) set one or more UDF child nodes (create or update as needed)
Related functions

The following are related functions

  • get_childvalue(x, name) retrieve the value of the child specified by name in the node x, possibly ""
  • set_udfs(x, v) add or update one or more UDF children
Clone this wiki locally