Aaron Brown > perfSONAR_PS-Services-PingER-0.09 > perfSONAR_PS::Datatypes::v2_0::nmwg::Message::Data

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

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 2.0.0   Source  

NAME ^

 perfSONAR_PS::Datatypes::v2_0::nmwg::Message::Data  - A base class, implements  'data'  element from the perfSONAR_PS RelaxNG schema

DESCRIPTION ^

   Object representation of the data element.
   Object fields are:
    Scalar:     metadataIdRef, 
    Scalar:     id, 
    Object reference:   commonTime => type ARRAY,
    Object reference:   datum => type ARRAY,
    Object reference:   key => type HASH,
   
   The constructor accepts only single parameter, it could be a hashref to parameters hash  or DOM with  'data' element 

SYNOPSIS ^

              use perfSONAR_PS::Datatypes::v2_0::nmwg::Message::Data;
          
          my $el =  perfSONAR_PS::Datatypes::v2_0::nmwg::Message::Data->new($DOM_Obj);

METHODS ^

new( )

      creates   object, accepts DOM with  element tree or hashref to the list of
      keyd parameters
         metadataIdRef   => undef, 
         id   => undef, 
         commonTime => ARRAY,
         datum => ARRAY,
         key => HASH,

getDOM ($)

       accept parent DOM
       return data object DOM, generated from object contents 

addcommonTime()

    if any of subelements can be an arrray then this method will provide
    facility to add another element to the  array and will return ref to such array
    or just set the element to a new one

removeCommonTimeById()

     remove specific element from the array of commonTime elements by id ( if id is supported by this element )
     accepts single param - id - which is id attribute of the element
     if there is no array then it will return undef and warninig
     if it removed some id then $id will be returned

getCommonTimeByMetadataIdRef()

     get specific object from the array of commonTime elements by  MetadataIdRef( if  MetadataIdRef is supported by this element )
     accepts single param -  MetadataIdRef
     if there is no array then it will return just an object

getCommonTimeById()

     get specific element from the array of commonTime elements by id ( if id is supported by this element )
     accepts single param - id
     if there is no array then it will return just an object

adddatum()

    if any of subelements can be an arrray then this method will provide
    facility to add another element to the  array and will return ref to such array
    or just set the element to a new one

removeDatumById()

     remove specific element from the array of datum elements by id ( if id is supported by this element )
     accepts single param - id - which is id attribute of the element
     if there is no array then it will return undef and warninig
     if it removed some id then $id will be returned

getDatumByMetadataIdRef()

     get specific object from the array of datum elements by  MetadataIdRef( if  MetadataIdRef is supported by this element )
     accepts single param -  MetadataIdRef
     if there is no array then it will return just an object

getDatumById()

     get specific element from the array of datum elements by id ( if id is supported by this element )
     accepts single param - id
     if there is no array then it will return just an object

querySQL ()

      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

      merge with another data ( 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

buildIdMap()

    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

buildrefIdMap ()

    if any of subelements has  metadataIdRef  then get a map of it in form of
    hashref to { element}{ metadataIdRef } = index in array and store in the idmap field

asString()

   shortcut to get DOM and convert into the XML string
   returns XML string  representation of the  data object

registerNamespaces ()

   will parse all subelements and register all namepspaces within the data namespace

fromDOM ($)

   accepts parent XML DOM   element   tree as parameter 
   returns data  object

AUTHORS ^

   Maxim Grigoriev (FNAL)  2007-2008, maxim@fnal.gov
syntax highlighting: