function tripal_publication_exists

2.x tripal_pub.api.inc tripal_publication_exists($pub_details)
3.x tripal_chado.module.DEPRECATED.api.inc tripal_publication_exists($pub_details)

The publication table of Chado only has a unique constraint for the uniquename of the publiation, but in reality a publication can be considered unique by a combination of the title, publication type, published year and series name (e.g. journal name or conference name). The site administrator can configure how publications are determined to be unique. This function uses the configuration specified by the administrator to look for publications that match the details specified by the $pub_details argument and indicates if one ore more publications match the criteria.

Parameters

$pub_details: An associative array with details about the publications. The expected keys are: 'Title': The title of the publication. 'Year': The published year of the publication. 'Publication Type': An array of publication types. A publication can have more than one type. 'Series Name': The series name of the publication. 'Journal Name': An alternative to 'Series Name'. 'Conference Name': An alternative to 'Series Name'. 'Citation': The publication citation (this is the value saved in the pub.uniquename field and must be unique).

If this key is present it will also be checked 'Publication Dbxref': A database cross reference of the form DB:ACCESSION where DB is the name of the database and ACCESSION is the unique identifier (e.g PMID:3483139).

Return value

An array containing the pub_id's of matching publications. Returns an empty array if no pubs match.

2 calls to tripal_publication_exists()
chado_does_pub_exist in legacy/tripal_pub/api/tripal_pub.DEPRECATED.inc
chado_pub_validate_check_duplicate in legacy/tripal_pub/includes/tripal_pub.chado_node.inc
Check for duplicate publications. To be called from hook_validate(). Sets the form error if a duplicate
1 string reference to 'tripal_publication_exists'

File

tripal_chado/api/modules/tripal_chado.module.DEPRECATED.api.inc, line 1313
These api functions are deprecated, if your site is currently using them please update your code with the newer tripal_chado functions.

Code

function tripal_publication_exists($pub_details) {
  chado_publication_exists($pub_details);
}