Aaron Brown > perfSONAR_PS-Services-PingER-0.09 > perfSONAR_PS::Datatypes::Namespace

Download:
perfSONAR_PS-Services-PingER-0.09.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.09   Source  

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::Datatypes::Namespace; 
    # create Namespace object with default URIs
    $ns = perfSONAR_PS::Datatypes::Namespace->new();
    
    # overwrite  Namespace object with  custom URIs
    $nss =  {'pinger' => 'http://newpinger/namespace/'};
    $ns = perfSONAR_PS::Datatypes::Namespace->new(-hash => $nss);
    
    # overwrite only specific Namespace   with  custom URI 
    
    $ns = perfSONAR_PS::Datatypes::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 utilized as Class method:
   my $URI =   'perfSONAR_PS::Datatypes::Namespace::getNsByKey($key);  

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.

syntax highlighting: