InterMine > InterMine-Model-0.9901 > InterMine::Model::Reference

Download:
InterMine-Model-0.9901.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

InterMine::Model::Reference - represents a reference in an InterMine class

SYNOPSIS ^

 use InterMine::Model::Reference
 ...
 my $field = InterMine::Model::Reference->new(name => 'protein',
                                              model => $model,
                                              referenced_type_name => $ref_type,
                                              reverse_reference_name =>
                                                         $reverse_reference);
 ...

DESCRIPTION ^

Objects of this class describe the references and collections of a class in an InterMine model. Reference objects are generally part of ClassDescriptor objects.

CONSTANTS ^

TAG_NAME

the name for serialising references to xml

ATTRIBUTES ^

referenced_type_name (Str, ro)

The name of the class of object this reference points to

referenced_classdescriptor (ClassDescriptor, ro)

The class of the object that this reference points to

rev_referenced_classdescriptor (ClassDescriptor, ro)

The class that the other end of this reference points to.

reverse_reference (Reference, ro)

The reference (if it exists) that points back to this one

predicate: has_reverse_reference

reverse_reference_name (Str, ro)

The name of the reference that points back to this

METHODS ^

is_many_to_many

Return true if this reference is one end of a many-to-many relation, ie. this end is a collection and the other end is a collection

is_many_to_one

Return true if this is the reference end of a one-to-many relation, ie. this end is a reference and the other end is a collection

is_many_to_0

Return true if this is a collection and there is no reverse reference

is_one_to_many

Return true if this is the collection end of a one-to-many relation, ie. this end is a collection and the other end is a reference

is_one_to_0

Return true if this is a reference and there is no reverse reference

to_xml

Return the xml representation of the attribute descriptor

SEE ALSO ^

InterMine::Model::ClassDescriptor
InterMine::Model::Role::Field
InterMine::Model::Role::Descriptor

AUTHOR ^

FlyMine <support@flymine.org>

BUGS ^

Please report any bugs or feature requests to support@flymine.org.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc InterMine::Model::Reference

You can also look for information at:

COPYRIGHT & LICENSE ^

Copyright 2006,2007,2008,2009,2010,2011 FlyMine, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: