MOBY::Client::SecondaryArticle - a small object describing the Simple articles from the findService Response message of MOBY Central
Can be used either in this way:
use MOBY::CommonSubs qw{:all}; foreach my $queryID(keys %$inputs){ my $this_invocation = $inputs->{$queryID}; # this is the <mobyData> block with this queryID my $invocation_output = ""; if (my $input = $this_invocation->{'This_articleName'}){ # $input contains a MOBY::Client::SimpleArticle, ::CollectionArticle or ::SecondaryArticle next unless $input->isSecondary; # make sure it is a ::SecondaryArticle $prameter_value = $input->value; # get the value of the secondary parameter # do your business here and fill $invocation_output }
$MOBY_RESPONSE .= simpleResponse( # create an empty response for this queryID $invocation_output # response for this query , "myOutput" # the article name of that output object , $queryID); # the queryID of the input that we are responding to } return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));
or to construct a representation of a Secondary article from a findService call to MOBY::Central
A module used to describe secondary articles in moby
Mark Wilkinson (markw at illuminae dot com)
Usage : my $SA = MOBY::Client::SecondaryArticle->new(%args) Function : create SecondaryArticle object Returns : MOBY::Client::SecondaryArticle object Args : articleName => "NameOfArticle" datatype => Integer|Float|String|DateTime, default => $some_default_value, max => $maximum_value, min => $minimum_value, description => $free_text, enum => \@valid_values XML_DOM => $XML_DOM node of the Secondary article (optional) XML => $XML XML string representing the Secondary article (optional)
Usage : $name = $SA->articleName($name) Function : get/set articleName Returns : string Arguments : (optional) string representing articleName to set
Usage : $name = $SA->datatype($type) Function : get/set datatype: Integer, Float, DateTime, Boolean, String Returns : the datatype Arguments :
Usage : $name = $SA->min($value) Function : get/set the minimum value of a datatype Returns : min value Arguments :
Usage : $name = $SA->max($value) Function : get/set maximum value of the datatype Returns : max value Arguments :
Usage : $name = $SA->default($value) Function : get/set the default value of parameter Returns : default value Arguments :
Usage : $name = $SA->enum(\@possible_values) Function : get/set the enumerated values for discreet variables Returns : listref of string values Arguments :
Usage : $name = $SA->addEnum($new_possible_values) Function : add to the list of enumerated values for discreet variables Returns : new listref of string values Arguments :
Usage : $namespaces = $SA->description("text description here") Function : get/set description of the parameter Returns : string Arguments : (optional) string description
Usage : $SA = $SA->XML($XML) Function : set/reset all parameters for this object from the XML Returns : MOBY::Client::SecondaryArticle Arguments : (optional) XML fragment from and including <Simple>...</Simple>
Usage : $namespaces = $SA->XML_DOM($XML_DOM_NODE) Function : set/reset all parameters for this object from the XML::DOM node for <Simple> Returns : MOBY::Client::SecondaryArticle Arguments : (optional) an $XML::DOM node from the <Simple> article of a DOM
Usage : $boolean = $IN->isSecondary() Function : is this a SecondaryArticle type? (yes, I know this is obvious) Returns : 1 (true)
Usage : $boolean = $IN->isSimple() Function : is this a SimpleArticle type Returns : 0 (false)
Usage : $boolean = $IN->isCollection() Function : is this a CollectionArticle type Returns : 0 for false