perfSONAR_PS::Datatypes::Store - this is the store object


perfSONAR_PS-Services-PingER documentation  | view source Contained in the perfSONAR_PS-Services-PingER distribution.

Index


DESCRIPTION

Top

   it is an aggregation of    Data and   MetaData  objects

   new will throw exception in case of wrong parameters
  it accepts only one parameter -  hashref to the hash of this form:
    {
     name => 'store', ### store by default

       } 

   Namespaces wil lbe added dynamically from the underlying data and metadata

SYNOPSIS

Top

  


	     use perfSONAR_PS::Datatypes::Store ;

	     


	     my ($DOM) = $requestMessage->getElementsByTag('store');

	     my $message = new perfSONAR_PS::Datatypes::Store($DOM);
             $message = new perfSONAR_PS::Datatypes::Store({ id => '2345', 
	                                                     type = 'SetupDataResponse',
							     namespace=>{nmwg=> 'something'}, 
							     MetaData => {'id1' =>   <obj>},
							     Data=> {'id1' => <obj>}}); 

	    #######   add data element, namespaces will be added from this object to  store object namespace declaration
             $message->addDataById('id1', new perfSONAR_PS::Datatypes::Store::Data({id=> 'id1', id => 'id1', datum => 'OK'}));

	    ########add metadata element, namespaces will be added from this object to  store object namespace declaration
	     $message->addMetaDataById('id1', new perfSONAR_PS::Datatypes::Store::MetaData({metaID=> 'id1' });

	     my $dom = $message->getDOM(); # get as DOM 
	     print $message->asString();  # print the whole store

	     


METHODS

Top

new( )

      creates store object, accepts DOM with nmwg:store element tree or hashref to the list of
        type => <string>, id => <string> , namespace => {}, MetaData => {}, ...,   Data   => { }  ,

AUTHORS

Top

   Maxim Grigoriev (FNAL)   2007


perfSONAR_PS-Services-PingER documentation  | view source Contained in the perfSONAR_PS-Services-PingER distribution.