NAME

MOBY::Client::SecondaryArticle - a small object describing the Simple articles from the findService Response message of MOBY Central


SYNOPSIS

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


DESCRIPTION

A module used to describe secondary articles in moby


AUTHORS

Mark Wilkinson (markw at illuminae dot com)


METHODS

new

 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)

articleName

 Usage     :    $name = $SA->articleName($name)
 Function  :    get/set articleName
 Returns   :    string
 Arguments :    (optional) string representing articleName to set

datatype

 Usage     :    $name = $SA->datatype($type)
 Function  :    get/set datatype: Integer, Float, DateTime, Boolean, String
 Returns   :    the datatype
 Arguments :

min

 Usage     :    $name = $SA->min($value)
 Function  :    get/set the minimum value of a datatype
 Returns   :    min value 
 Arguments :

max

 Usage     :    $name = $SA->max($value)
 Function  :    get/set maximum value of the datatype
 Returns   :    max value 
 Arguments :

default

 Usage     :    $name = $SA->default($value)
 Function  :    get/set the default value of parameter
 Returns   :    default value
 Arguments :

enum

 Usage     :    $name = $SA->enum(\@possible_values)
 Function  :    get/set the enumerated values for discreet variables
 Returns   :    listref of string values
 Arguments :

addEnum

 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 :

description

 Usage     :    $namespaces = $SA->description("text description here")
 Function  :    get/set description of the parameter
 Returns   :    string
 Arguments :    (optional) string description

XML

 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>

XML_DOM

 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

isSecondary

 Usage     :    $boolean = $IN->isSecondary()
 Function  :    is this a SecondaryArticle type? (yes, I know this is obvious)
 Returns   :    1 (true)

isSimple

 Usage     :    $boolean = $IN->isSimple()
 Function  :    is this a SimpleArticle type
 Returns   :    0 (false)

isCollection

 Usage     :    $boolean = $IN->isCollection()
 Function  :    is this a CollectionArticle type
 Returns   :    0 for false