Project

General

Profile

Actions

This inventory of existing data access methods and classes of the data portal prototype is used as base and reference for the development of CdmDataportal and of the CdmAPI.

class: TAXIC_TaxonName

Taxon Name

Fields

  • nameId

  • name

  • fullName

  • authors

  • rankId

  • rankAbbrev

  • nomRef

  • nameNotes

  • nomRefNotes

Fields which are not initialized by the constructor (lazy loading)

  • relNameQualifierId - loaded when / by ???

  • relNameQualifier - loaded when / by ???

  • relNameNotes - loaded when / by ???

  • commonName - loaded when / by ???

Constructor Parameters

  • nameId - the id of the taxon name

Object Methods

  • getShortName() - crop generic name (genus names) for taxon names which have a epithet: RankId >= 60 (species)

class: TAXIC_PTaxon

taxon concepts inherits from TAXIC_TaxonName

Fields

additional to those from TAXIC_TaxonName loaded by constructor:

  • refId

  • ref

  • refYear

  • ridentifier

  • treeIndex

  • namePhrase

  • status

  • statusId

  • refNotes

  • conceptNotes

Fields which are not initialized by the constructor (lazy loading)

  • protologues - lazy loading by object method getProtologues()

  • relPTaxon - Ptaxon to which this one is related to

  • relQualifierId - loaded when / by ???

  • relQualifier - loaded when / by ???

  • relRef - loaded when / by ???

  • relRefYear - loaded when / by ???

  • relInversion - by default false, but can be set true to invert the relation between this and relPTaxon. This flag is set true by the accepted_for() so that render_related_ptname() knowns how to render the relation in this special case.

  • basionymFullName - used in find_sysnonyms() and in render_synonyms()

  • basionymNameId - used in find_sysnonyms() and in render_synonyms()

Constructor Parameters

  • nameId - the id of the taxon name

  • refId - the id of the concept reference

Object Methods

  • _loadNameFacts($fid) - loads the load name facts. Sould of course be a method of TAXIC_TaxonName than beeing a method of TAXIC_PTaxon

  • getProtologues() - used by render_nomRef() when rendering the nomenclatural reference including the link to display the protologue

  • isAccepted()

  • hasRelatedConcept()

class: TAXIC_TaxonTree

taxon concepts inherits from TAXIC_TaxonName

Fields

  • tree - an array containing the root level of TAXIC_TaxonTreeItems which again contain a set of TAXIC_TaxonTreeItems

Constructor Parameters

  • nameId - the id of the taxon name

  • refId - the id of the concept reference

Object Methods

  • findTreeItem($nameId, $refId) - return a TAXIC_TaxonTreeItem for the taxoniomic concept specified by its NameID and RefID

  • findAcceptedChilds($parentItem, $recurseDepth = 0) - returns an array of child TAXIC_TaxonTreeItems. If $parentItem has no childs the array returned is empty. May return a complete subtree if recurseDepth is true.

  • findRoots($recurseDepth = 0) - returns the root level of the taxonomic tree

  • findParent($item) - find the parent of a TAXIC_PTaxon

  • buildTreeUpFrom($activeTreeItem) - Builds the complete tree unfolded to the $activeTreeItem. The resulting tree will be stored in the field tree which can publically be accessed by getTree().

class: TAXIC_TaxonTreeItems

inhertit from TAXIC_PTaxon extending this class by the field childs

Fields

  • childs - an array containing the child TAXIC_TaxonTreeItems of this

acceptedNameFor($nameId)

Find and the related accepted Taxon-Concept for the taxon name given as parameter

Parameters

  • nameId - ID of Taxon Name

Returns

TAXIC_PTaxon an TAXIC_PTaxon instance or false if not found.

The relation ($ptaxon->relQualifierId, $ptaxon->relQualifier) of the instance is inverted ( $ptaxon->relInversion = true )

Usage

when displaying the

  • list of names to find the acceptetd name for a not accepted one and to find accepted names for not accepted related taxa.

relatedNames($nameId)

Find and render all taxon names which are related to the taxon name specified by the parameter $nameId.

Parameters

  • nameId - the nameId

Returns

An array of related TAXIC_TaxonName instances

Usage

when displaying

  • list of names to find the related names

findBasionym($nameId)

Find the basionym for a taxon name.

Parameters

  • nameId - the nameId

Returns

A TAXIC_TaxonName instance or false

Usage

  • unused

findSynonyms($nameId, $refId, $excludeMisapplied = true, $recursive = false)

Finds all kinds of synonyms for a given potential taxon which is specified by the parameters nameId & refId. The resulting list is orderend historically. The homotypic synomys occur ontop of the list, followed by the heterotypic synonyms. Missapplied ones are lest section.

Parameters

  • nameId - the name id of the taxon concept

  • refId - the reference id of the taxon concept

  • excludeMisapplied (default is true) - whether to exclude misapplied names

  • recursive (default is false) - whether to recurse into the synonymy to find synonyms of synonyms

Returns

An array of TAXIC_PTaxon instances

Usage

Used in render_synonyms(..) which is called when displaying

  • taxon details.

  • search results

getLaterHomonyms(TAXIC_TaxonName $taxon)

Find the later homonyms for a taxon name.

Parameters

  • taxon - a TAXIC_TaxonName instance

Returns

An array of TAXIC_TaxonName instances

Usage

Used in render_homonyms(TAXIC_TaxonName $taxon) which is called when displaying

  • taxon details.

searchNames($refId, $startingWith = _, $onlyAccepted = false, $count = false){

Portet to : cdm_ws_list_names

Function to get a list of scientific taxon names. The startingWith parameter is used to provide a simple alphabetic pager which provides one page for every letter of the alphabet.

This approach however is not flexibel enough, since some pages may be empty and others pages may contain to many entries. E.g. http://cybertaxonomy.eu/dataportal/cichorieae/names.php?pl=C contains over 3000 entries!. A better solution would be actually limit the number of items per page, lets say for example 20 items per page. The pager widget would now display a page index of starting letters for the first entry of each page, such as the very page index is distinguishable from the one before. E.g:

A | AF | Cic | Cicerbita x fav  | Cichorium pumi | Crepis vesic | Crepis vesicaria L. subsp. ves | ... 

This seems also not feasible since the pager index becomes too long and would contains to many strings. So a more dynamic approach should be choosen!

An other solution to this dilemma could be a pager widget like the following:

[first] | [back] | [autocomplete text field] | [next] | [last]

The 'autocomplete text field' searches for matching taxon name while the user is typing, once the user leves the field or enter is pressed the page is populated with the matching item followed by the next max_items - 1 items.

What do you think ? ANY COMMENTS ARE HIGHLY APPRECIATED

[m.doering:] My view on this is that in general paging should have fixed page sizes and a page or record start index. For example pagesize=20,startpage=2 == pagesize=20,startrecord=21. The record index is more flexible, the page number index is easier to use in clients. That is true for all searches and wherever you potentially get larger resultlists.

An alphabetical index is definitely nicer for browsing. But that could be combined. The widget allows you to hop into the numerical paging by clicking on a letter C:

A B C D E F G H I J K L M N

C would then return a pagable resultlist

I definetely like the autocomplete search box. That should be in.

The CDM terms accepted taxa only Taxon and synonyms Synonyms. So I would prefer to call the parameter onlyAccepted inclSynonyms if that is ok with you.

Parameters

  • refId - the refId corresponding to the preferred view/opinion

  • startingWith - the first letters of the taxon names to restrict the search result to.

  • onlyAccepted - if set to true the results will be restricted to TaxonConcept which are accepted in any view.

  • count - determines the type an content of the result returned by this method:

    • true - the number of rows in the result set is returned
    • false - an array containing TAXIC_TaxonName and TAXIC_PTaxon instances is returned depending on whether the name has a corresponding TaxonConcept or not. the TAXIC_PTaxon instances my be accepted or not in sense of the preferred view specified by the $refId parameter.

Returns

An integer value or an array of TAXIC_TaxonName instances depending on the count parameter (see count parameter for a detailed description)

Usage

Used when displaying

  • list of taxon names

search_find_PTNames(recurseIntoRelated = false, $commonNames = false)

Function to search for scientific and for common names, the search parameters are derived from the user session where all search form data is stored. search_find_PTNames() gets the parameters by calling search_find_PTNames()

Parameters

Method Parameters:

  • recurseIntoRelated - whether to return also synonyms of matching names

  • commonNames - search for common names when sett true. If set false which is also default a search for schientific names is performed.

Parameters derived from search_find_PTNames():

  • string

  • vernacular

  • filter_on

  • lang

  • display_synonyms

Returns

An array of TAXIC_TaxonName instances.

Usage

  • search results

getAllFacts($ptaxon)

get all facts for the given taxon concept.

Parameters

  • ptaxon - the taxon concept as TAXIC_PTaxon instance

Returns

Returns an array of all facts not includiung the name facts

Usage

  • taxon detail

getFacts($ptaxon, $factCategoryId)

Gets the according facts for the specified EDIT_PTaxon by the factCategoryId. Only facts having PublishFlag=NULL or PublishFlag=1 are taken into account.

Parameters

  • ptaxon - the TAXIC_PTaxon instance

  • factCategoryId - the fact category

Returns

Returns an array of all fact as string matching the given taxon and category

Usage

  • unused

getLanguages()

Parameters

parameterless

Returns

An associative array of all languages available, keys are:LanguageId, Language, LanguageOriginal, ISO639_1, ISO639_2, Notes

Usage

Used when rendering the language selection list for the search box.

getStatistics()

Queries the database for a simple statistic which reports the number of names, taxon copncepts, genera, species etc.

Parameters

parameterless

Returns

An array of intergers

Usage

used in about page

Updated by Katja Luther almost 2 years ago · 8 revisions