InterMine > Webservice-InterMine-1.0102 > Webservice::InterMine::ListFactory

Download:
Webservice-InterMine-1.0102.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source   Latest Release: Webservice-InterMine-1.0405

NAME ^

Webservice::InterMine::ListFactory - an object to manage lists and manipulate them

SYNOPSIS ^

  use Webservice::InterMine;

  my $service = Webservice::InterMine->get_service('www.flymine.org/query/service', $url, $password);

  my @lists = $service->get_lists();
  my $list = $service->list("name_of_list");
  my $new_list = $service->new_list(
    type => "Gene", content => 'indentifiers.list');
  my $intersection = $list ^ $new_list;

  while (<$intersection>) {
    printf $intersection->table_format, @$_;
  }

DESCRIPTION ^

The ListFactory object is a manager for lists located on the connected webservice. It is responsible for parsing, creating, and performing operations on list objects. Any changes made are are reflected by changes on the server.

However, its operations are not designed to be accessed directly. Instead call the methods available on InterMine::Webservice::Service objects, or on Webservice::InterMine::List objects, both of which use the ListFactory to provide their functionality.

get_list( $name ) -> List

Get the list with the given name, if it exists. Returns undef if the given list is not accessible (either because it does not exist or because the service is not authenticated to the correct user account).

get_lists() -> list[List]

Get all the lists that this service has access to.

list_names() -> list[Str]

Get all the names of the lists this service has access to.

new_list(content => $content, [type => $class], [name => $name], [description => $description])

Make a new list on the server with the given content and return a Webservice::InterMine::List object referring to it.

Args:

union(\@lists, [$name, $description)

Join the given lists to create a new one (with the optional name and description) from their union. The lists can be given as Webservice::InterMine::List objects, Webservice::InterMine::Query::Roles::Listable queries, or the names of the lists to join.

subtract(\@from, \@to_be_subtracted, [$name, $description])

Subtract the lists to be subtracted from the union of the list of lists to subtract from, creating a new one (with the optional name and description). The lists can be given as Webservice::InterMine::List objects, Webservice::InterMine::Query::Roles::Listable queries, or the names of lists the service has access to.

intersect(\@lists, [$name, $description)

Intersect the given lists to create a new one (with the optional name and description) from their intersection. The lists can be given as Webservice::InterMine::List objects, Webservice::InterMine::Query::Roles::Listable queries, or the names of lists the service has access to.

symmetric_difference(\@lists, [$name, $description)

Calculate the symmetric difference of the given lists to create a new one (with the optional name and description). The lists can be given as Webservice::InterMine::List objects, Webservice::InterMine::Query::Roles::Listable queries, or the names of lists the service has access to.

delete_lists(@lists)

Delete the given lists from the service. If the lists don't exist, an error will be thrown. Consider also calling the delete method directly on Webservice::InterMine::List objects.

delete_temp_lists()

Delete all anonymous list created by the programme. This method is automatically called on programme exist unless the variable $Webservice::InterMine::CLEAN_UP is set to a false value.

list_count -> Int

Get the number of lists in the service at present

refresh_lists

Make sure the list information this object has access to is up to date by checking for updates from the server. This method is called when any changes are made to lists.

AUTHOR ^

Alex Kalderimis dev@intermine.org

BUGS ^

Please report any bugs or feature requests to dev@intermine.org.

SUPPORT ^

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

    perldoc Webservice::InterMine::ListFactory

You can also look for information at:

COPYRIGHT AND LICENSE ^

Copyright 2006 - 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: