The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Webservice::InterMine::Query::Template - A representation of a webservice template

SYNOPSIS

  use Webservice::InterMine 'www.flymine.org/query/service';

  my $template = Webservice::InterMine->template('Probe_Genes');

  $template->get_constraint('B')->switch_off;

  my $results = $template->results_with(value1 => '1634044_at');

DESCRIPTION

Templates are shortcuts to frequently run queries. They differ from other ways to acheive this (saved queries and scripts using the webservice) in a couple of ways:

  • Templates can be public, and each webservice has dozens ready for you to use now

  • They have more flexibility: some constraints are optional, others can be edited

  • They are accessible in very few steps via the web app and the webservice api

Generally they have all the same methods as queries do (see Webservice::InterMine::Query), but they have a couple of extra methods:

METHODS

results_with( as => $format, opA => $op, valueA => $value, valueC => $value )

results_with returns results in the same format as the normal query results method (which is also available to templates). This method requires the user to specify any values and operators which are different to the template defaults.

Extra Constraint Methods:

  • editable_constraints

    Returns a list of the constraint objects which represent editable constraints. all_constraints still returns all the constraint objects, some of which may not be editable.

  • show_constraints

    returns a human readable string with information about what each constraint does, listed by code.

  • switch_off | switch_on

    These methods are used on constraints if they are switchable.

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

You can also look for information at:

COPYRIGHT AND LICENSE

Copyright 2006 - 2010 FlyMine, all rights reserved.

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