The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Namespace - a container for namespaces

DESCRIPTION

The purpose of this module is to create OO interface to namespace registration and therefore add the layer of abstraction for any namespace related operation. All perfSONAR-PS classes should work with the instance of this class and avoid using explicit namespace declaration.

SYNOPSIS

    use perfSONAR_PS::XML::Namespace; 
    # create Namespace object with default URIs
    $ns = perfSONAR_PS::XML::Namespace->new();
    
    # overwrite  Namespace object with  custom URIs
    $nss =  {'pinger' => 'http://newpinger/namespace/'};
    $ns = perfSONAR_PS::XML::Namespace->new(-hash => $nss);
    
    # overwrite only specific Namespace   with  custom URI 
    
    $ns = perfSONAR_PS::XML::Namespace->new(-pinger =>   'http://newpinger/namespace/');
      
    $pinger_uri = $ns->getNsByKey('pinger'); ## get URI by key
    $ns->setNsByKey('pinger' =>  'http://newpinger/namespace/'); ## set URI by key
    
 

API

There are many get/set methods

new(-NS => \%nss)

Creates a new object, pass hash ref as collection of namespaces or new(-pinger => http://ggf.org/ns/nmwg/tools/pinger/2.0/", 'nmwgr' => "http://ggf.org/ns/nmwg/result/2.0/")

getNsByKey()

Returns namespace string by id of the namespace, where kyes are: 'nmwg', 'nmwgr 'nmwgt' ( aliased as 'topo' too),'nmwgtopo3' 'nmtl3','nmtl4', 'nmtm' 'select', 'average' 'traceroute','snmp', 'ping', 'owamp', 'netutil', 'bwctl','pinger', 'iperf

 Might be utized as Class method:
   my $URI =   Namespace::getNsByKey($key);  

setNsByKey('pinger' => 'http://newpinger/namespace/' )

Sets namespace URI string by id of the namespace or defnies the new one

SEE ALSO

To join the 'perfSONAR-PS' mailing list, please visit:

  https://mail.internet2.edu/wws/info/i2-perfsonar

The perfSONAR-PS subversion repository is located at:

  https://svn.internet2.edu/svn/perfSONAR-PS 
  

Questions and comments can be directed to the author, or the mailing list.

AUTHOR

Maxim Grigoriev, <maxim@fnal.gov>

COPYRIGHT AND LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.