Overview

Namespaces

  • AnalyseModule
    • Models
  • BaseModule
    • Exceptions
    • Models
    • Repository
    • Services
  • DispatchModule
    • Helpers
    • Models
    • Tools
  • PredictModule
  • SearchModule

Classes

  • AnnotationDbTool
  • BaseTool
  • Cppredict2Tool
  • DbTool
  • SimilarityTool
  • TaxonomyDbTool

Interfaces

  • ToolInterface
  • Overview
  • Namespace
  • Class

Class DbTool

DbTool - retrieves information from database - used (mainly) by search

Nette\Object
Extended by BaseModule\Services\BaseService
Extended by DispatchModule\Tools\BaseTool
Extended by DispatchModule\Tools\DbTool implements DispatchModule\Tools\ToolInterface

Direct known subclasses

DispatchModule\Tools\AnnotationDbTool, DispatchModule\Tools\TaxonomyDbTool
Namespace: DispatchModule\Tools
Located at DispatchModule/DbTool.php
Methods summary
public
# __construct( Nette\DI\Container $container, ...Object $initialization )

Constructor used to save container

Constructor used to save container

Parameters

$container
$initialization
triplet label, description, wanted parameters; or an array with database tools to union

Overrides

BaseModule\Services\BaseService::__construct()
public boolean
# addCriteria( string $name, mixed $value )

Adds search criteria

Adds search criteria

Parameters

$name
$value

Returns

boolean

Implementation of

DispatchModule\Tools\ToolInterface::addCriteria()
public ResultSet
# execute( )

Executes query

Executes query

Returns

ResultSet

Implementation of

DispatchModule\Tools\ToolInterface::execute()
public integer
# getCount( string $accession = null, integer $start = null, integer $stop = null )

Executes count query, returns resultset size

Executes count query, returns resultset size

Parameters

$accession
$start
$stop

Returns

integer
size of the result
protected boolean
# checkReservedWord( string $name, string $value )

Checks whether incoming key is a reserved word

Checks whether incoming key is a reserved word

Parameters

$name
parameter name
$value
parameter value

Returns

boolean
true, if key is reserved word
protected string|false
# containsAttribute( string $name )

Check whether the *db_attribute exists in the completeData and returns its prefix.

Check whether the *db_attribute exists in the completeData and returns its prefix.

Parameters

$name
name of the input

Returns

string|false
prefix with that the attribut exists
protected array|false
# getCriteriaParam( string $name, string $value )

Returns array with information for db criteria (table attribute name and rule)

Returns array with information for db criteria (table attribute name and rule)

Parameters

$name
name of the input
$value
user input value

Returns

array|false
contains three elements, criteria ('eq', 'gt'), attribute key and its value; returns false if parameter does not add criteria
protected Nette\Database\Table\Selection
# prepareCriteria( string $select, string $base = 'vw_acc_ann_tax' )

Prepares criteria for query

Prepares criteria for query

Parameters

$select
select part of the query
$base
base view to select from - vw_acc_ann_tax, vw_acc_ann_tax_grouped_acc, vw_acc_ann_tax_grouped_name

Returns

Nette\Database\Table\Selection
query with all criteria
protected string
# prepareKey( string $key, string $base )

Replaces key for use in SQL query (replaces %BASE_VIEW% for actual view name)

Replaces key for use in SQL query (replaces %BASE_VIEW% for actual view name)

Parameters

$key
desired key
$base
base table

Returns

string
database key
protected string
# chooseBaseTable( )

Chooses proper base table - vw_acc_ann_tax_grouped_acc, vw_acc_ann_tax_grouped_name or vw_acc_ann_tax

Chooses proper base table - vw_acc_ann_tax_grouped_acc, vw_acc_ann_tax_grouped_name or vw_acc_ann_tax

Returns

string
base table name
public string
# getLabel( )

Gets human-readable short description (name) of the tool

Gets human-readable short description (name) of the tool

Returns

string
human-readable short description of the tools

Implementation of

DispatchModule\Tools\ToolInterface::getLabel()
protected array
# getPredictionFeatures( integer $predictionId, string $type )

Gets specified characteristic for prediction (with its positions)

Gets specified characteristic for prediction (with its positions)

Parameters

$predictionId
id of prediction
$type
name of the characteristic - bulges, foverhangs, hairpins, helices, junctions, loops or toverhangs

Returns

array
arary containing information about predicted characteristics
protected
# defineMultipliedRules( string $key, array $allValues, array $allDirections )

Sets possible second length criteria

Sets possible second length criteria

Parameters

$key
attribute key
$allValues
all length values
$allDirections
all length directions (lesser than, greater than)
protected string
# getTaxonomyPath( integer $value )

Gets taxonomy path for specified taxonomy record (category)

Gets taxonomy path for specified taxonomy record (category)

Parameters

$value
taxonomy.id

Returns

string
taxonomy path
protected integer
# lastTaxonomySelected( array $value )

Selects id of the last taxonomic category in the tree (from array of category inputs)

Selects id of the last taxonomic category in the tree (from array of category inputs)

Parameters

$value
taxonomy category inputs

Returns

integer
id of last category
public Array
# getNameValues( String $organismName )

Returns organism names containing $organismName

Returns organism names containing $organismName

Parameters

$organismName
Organism name

Returns

Array
organism names
public
# setSimpleSearch( boolean $val )

Set simple search flag - defines, whether only basic sequence info should be loaded

Set simple search flag - defines, whether only basic sequence info should be loaded

Parameters

$val
new simpleSearch value
Methods inherited from DispatchModule\Tools\BaseTool
getName(), getWantedParameters(), requireParameter(), used()
Constants summary
string RULE_EQ

Equals rule (can be also used as IN rule, if value is an array)

Equals rule (can be also used as IN rule, if value is an array)

# 'eq'
string RULE_GT

Greater than rule

Greater than rule

# 'gt'
string RULE_LT

Less than than rule

Less than than rule

# 'lt'
string RULE_LIKE

Like rule

Like rule

# 'like'
string RULE_PREFIX

Prefix like rule

Prefix like rule

# 'prefix'
Properties summary
protected BaseModule\Repository\TestRepository $repository

Test repository

Test repository

Inject

#
protected array $wantedParameters

array of wanted parameters

array of wanted parameters

#
protected integer $offset

offset of results

offset of results

# 0
protected integer $limit

limitation of result count

limitation of result count

# 0
public string $label

short name of the tool

short name of the tool

#
protected boolean $aggregateByAccession

if true, only record with longest sequence each accession number is returned

if true, only record with longest sequence each accession number is returned

# false
protected boolean $simpleSearch

indicates whether simple search loading only basic sequence info should be performed

indicates whether simple search loading only basic sequence info should be performed

# false
protected array $criteria

list of criterias for query

list of criterias for query

# array( self::RULE_EQ => array(), self::RULE_GT => array(), self::RULE_LT => array(), self::RULE_LIKE => array(), self::RULE_PREFIX => array() )
Properties inherited from DispatchModule\Tools\BaseTool
$completeData, $description, $fileName
Properties inherited from BaseModule\Services\BaseService
$container
API documentation generated by ApiGen