NAME

MOBY::Client::CrossReference - a small object describing a MOBY Simple input/output article


SYNOPSIS

   use MOBY::CrossReference;
   # do stuff with xref ... read below


DESCRIPTION

This holds all of the relevant information for a MOBY cross reference of either the Xref type, or the Object type. Object cross-references have only namespace and id attributes, while Xref cross-references have namespace, id, authURI, serviceName, xref_type, and evidence_code attributes. To determine which type of cross-reference you have in-hand, call the ``type'' method.


AUTHORS

Mark Wilkinson (markw at illuminae dot com)


METHODS

new

 Usage     :    my $XR = MOBY::Client::CrossReference->new(%args)
 Function  :    create SimpleArticle object
 Returns   :    MOBY::Client::CrossReference object
 Args      :    type      => object || xref (required)
                namespace => $ns            (required)
                id        => $id            (required)
                authURI   => $authURI
                serviceName => $serviceName
                evidence_code => $evidence_code
                xref_type=> $xref_ontology_term
                Object  =>  The XML of a base MOBY Object in this ns/id

type

 Usage     :    $type = $XR->type($name)
 Function  :    get/set type attribute
 Returns   :    string;  returns last value if new value set
 Arguments :    (required)one of "xref" or "object", depending on the
                type of cross-ref you are making (new, or v0.5 API)

namespace

 Usage     :    $ns = $XR->namespace($ns)
 Function  :    get/set namespace
 Returns   :    string; returns last value if new value set
 Arguments :    (optional) string representing namespace to set

id

 Usage     :    $id = $XR->id($id)
 Function  :    get/set id for the cross-reference
 Returns   :    string; returns last value if new value set
 Arguments :    (optional) the id of the cross-reference

authURI

 Usage     :    $auth = $XR->authURI($auth)
 Function  :    get/set id for the authority for the xref
 Returns   :    string; returns last value if new value set
 Arguments :    (optional) the new authority of the xref type reference

serviceName

 Usage     :    $name = $XR->serviceName($name)
 Function  :    get/set serviceName for the cross-reference
 Returns   :    string; returns last value if new value set
 Arguments :    (optional) the new serviceName of the cross-reference

evidence_code

 Usage     :    $code = $XR->evidence_code($code)
 Function  :    get/set evidence_code for the cross-reference
 Returns   :    string; returns last value if new value set
 Arguments :    (optional) the evidence_code of the cross-reference

xref_type

 Usage     :    $xreftype = $XR->xref_type($xreftype)
 Function  :    get/set xref_type for the cross-reference
 Returns   :    string; returns last value if new value set
 Arguments :    (optional) the xref_type of the cross-reference

Object

 Usage     : $XML = $XR->Object()
 Function  : retrieve a base MOBY Object XML (e.g. to send to a service)
 Returns   : XML or empty string if there is no namespace or id value