Object representation of the node element.
Object fields are:
Scalar: metadataIdRef,
Scalar: id,
Object reference: name => type HASH,
Object reference: hostName => type HASH,
Object reference: description => type HASH,
Object reference: location => type HASH,
Object reference: contact => type HASH,
Object reference: parameters => type HASH,
Object reference: port => type HASH,
The constructor accepts only single parameter, it could be a hashref to parameters hash or DOM with 'node' element
use perfSONAR_PS::Datatypes::v2_0::pingertopo::Topology::Domain::Node;
my $el = perfSONAR_PS::Datatypes::v2_0::pingertopo::Topology::Domain::Node->new($DOM_Obj);
creates object, accepts DOM with element tree or hashref to the list of
keyd parameters
metadataIdRef => undef,
id => undef,
name => HASH,
hostName => HASH,
description => HASH,
location => HASH,
contact => HASH,
parameters => HASH,
port => HASH,
accept parent DOM
return node object DOM, generated from object contents
depending on config it will return some hash ref to the initialized fields
for example querySQL ()
accepts one optional prameter - query hashref
will return:
{ ip_name_src => 'hepnrc1.hep.net' },}
merge with another node ( append + overwrite if exists )
we can do it differently
method #1:
convert to dom both objects and then get resulted object from combined dom
method #2 default:
through the introspection of the object
if any of subelements has id then get a map of it in form of
hashref to { element}{id} = index in array and store in the idmap field
will parse all subelements and register all namepspaces within the node namespace
Maxim Grigoriev (FNAL) 2007-2008, maxim@fnal.gov