Bio::Phylo::Meta - Single predicate/object annotation, attached to an xml-writable subject


SYNOPSIS

 use Bio::Phylo::Factory;
 my $fac = Bio::Phylo::Factory->new;
 my $base = 'http://8ball.sdsc.edu:6666/treebase-web/PhyloWS/tree/';
 my $proj = $fac->create_project->add_meta(
     $fac->create_meta(
         '-namespaces' => { 'cdao' => 'http://evolutionaryontology.org#' },
         '-triple'     => { 
             'cdao:hasMeta' => $fac->create_meta(
                 '-namespaces' => { 'cdao' => 'http://evolutionaryontology.org#' },
                 '-triple'     => { 'cdao:has_External_Reference' => $base . 'TreeBASE:2602' }
             )
         }
     )
 );


DESCRIPTION

To comply with the NeXML standard (http://www.nexml.org), Bio::Phylo implements metadata annotations which consist conceptually of RDF triples where the subject is a container object that subclasses of the Bio::Phylo::Util::XMLWritable manpage, and the predicate and object are defined in this class.

The objects of the triples provided by this class can be of any simple type (string, number) or one of the XML::DOM manpage, the XML::GDOME manpage, the XML::LibXML manpage, the XML::Twig manpage, the XML::DOM2 manpage, the XML::DOMBacked manpage, the XML::Handler manpage, the XML::Element manpage, the XML::API manpage, the XML::Code manpage or the XML::XMLWriter manpage or the RDF::Core::Model manpage.

When serialized, the Bio::Phylo::Meta object in NeXML is typically written out as an element called 'meta', with RDFa compliant attributes.


METHODS

CONSTRUCTOR

new()
 Type    : Constructor
 Title   : new
 Usage   : my $anno = Bio::Phylo::Meta->new;
 Function: Initializes a Bio::Phylo::Meta object.
 Returns : A Bio::Phylo::Meta object.
 Args    : optional constructor arguments are key/value
                   pairs where the key corresponds with any of
                   the methods that starts with set_ (i.e. mutators) 
                   and the value is the permitted argument for such 
                   a method. The method name is changed such that,
                   in order to access the set_value($val) method
                   in the constructor, you would pass -value => $val

MUTATORS

set_triple()

Populates the triple, assuming that the invocant is attached to a subject.

 Type    : Mutator
 Title   : set_triple
 Usage   : $meta->set_triple( $predicate, $object );
 Function: Populates the triple.
 Returns : Modified object.
 Args    : $predicate - a CURIE whose namespace prefix must 
                        have been bound previously using 
                        $meta->set_namespaces( $prefix, $uri );
           $object    - any of the valid object types: a number,
                        a string, a url, a nested annotation
                        or anything that can be adapted by
                        Bio::Phylo::Meta::XMLLiteral

ACCESSORS

get_object()

Returns triple object

 Type    : Accessor
 Title   : get_object
 Usage   : my $val = $anno->get_object;
 Function: Returns triple object
 Returns : A triple object
 Args    : NONE


SEE ALSO

the Bio::Phylo::Dictionary manpage

Annotation objects are combined into a dictionary.

the Bio::Phylo::Util::XMLWritable manpage

This object inherits from the Bio::Phylo::Util::XMLWritable manpage, so methods defined there are also applicable here.

the Bio::Phylo::Manual manpage

Also see the manual: the Bio::Phylo::Manual manpage and http://rutgervos.blogspot.com.


REVISION

 $Id: Annotation.pm 1040 2009-05-28 04:26:49Z rvos $

 Bio::Phylo::Meta - Single predicate/object annotation, attached to an xml-writable subject