This design documents includes multiple classes that are needed for querying, retrieving and importing publications into Tripal using a database-backend agnostic approach.
Provides the form interface for managing a publication query.
Provides the form interface for adding a single query for a given publication library.
Deletes a single search query.
This is the annotation class for the plugin
id
: the plugin idlabel
: the label for the plugindescription
: the description for the plugin
Interface class for the TripalPubLibrary class. This interface provides the functions that all TripalPubLibrary classes must implement.
form()
: provides the form elements for library that is used by AddPubSearchQueryFormformSubmit()
:formValidate()
:parse()
:retrieve()
: runs a query and retrieves results. This function is used by theAddPubSearchQueryForm
to retrieve results using a query definition array.run()
: runs theretrieve()
andparse()
functions for a given query. Requires that the query is already saved and pulls the query definition from the database.
The base class for all TripalPubLibrary
implementation. It provides common functionality that all TripalPubLibrary
implementations will need.
An instance of a TripalPubLibrary
plugin that talks directly to PubMed. It should retrieve and parse the results of a query into a common publication object.
An instance of a TripalPubLibrary
plugin that talks directly to the USDA Agricola database. It should retrieve and parse the results of a query into a common publication object.
An instance of a TripalPubLibrary
plugin that can import from a file.
A base class that manages a ChadoBuddyRecord
instance to store the publication. It is used in place of the old associative array for storing publications.
- record: an instance of
ChadoBuddyRecord
setAttribute($attribute, $value)
checkAuthors()
getAttribute($attribute)
getCitation()
: retrieves the citation for a publication.
Implements a PubBuddyService and is responsible for saving the publication to Chado
Theoretical example for storing in another database.
Implementation of the TripalImporter plugin for loading publication data into Chado using a file.
form()
: Lets the user upload a file. Lets the user select the fileTripalPubLibrary
plugin that can upload filesrun()
: Instantiate the proper instance of the TripalPubLibrary plugin (e.g.TripalPubLibraryBibTex
) call the library->run() and pass the query id iterate through the array returned by the call above and store the records in Chado.
Implementation of the TripalImporter
plugin for loading publication data into Chado using a search query. It will allow the user to select from a set of already created search queries.
- Select list for the database (eg. PubMed)
- Autocomplete text field (the name of the search query name)
form()
: Let's the user select a search query – no file upload needed.run()
: Query thetripal_pub_library_query
table, for the query information to get the TripalPubLibrary plugin id. Instantiate the proper instance of the TripalPubLibrary plugin (e.g.TripalPubLibraryPubmed
). call the library->run() and pass the query id iterate through the array returned by the call above and store the records in Chado.- Tables (pub, pub_dbxref, dbxref, pubauthor, pubprop) - Look at GFF importer which does procedural functions to check for publications first and then insert publications not found in the CHADO schema.