|
| | formSubmit (array $form, \Drupal\Core\Form\FormStateInterface &$form_state) |
| |
| | form_submit (array $form, \Drupal\Core\Form\FormStateInterface $form_state, array &$criteria) |
| |
| | form (array $form, \Drupal\Core\Form\FormStateInterface &$form_state) |
| |
| | formValidate (array $form, \Drupal\Core\Form\FormStateInterface &$form_state) |
| |
| | run (array $query) |
| |
| | retrieve (array $query, int $limit=10, int $page=0) |
| |
| | remoteSearchPMID ($search_array, $num_to_retrieve, $page, $row_mode=1) |
| |
| | parse_xml (string $pub_xml) |
| |
| | __construct (array $configuration, $plugin_id, $plugin_definition, Connection $public, \Drupal\tripal\Services\TripalLogger $logger, \Drupal\tripal\Services\TripalCitationManager $citation_manager, TripalFileRetriever $fileretriever) |
| |
|
| static | create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) |
| |
| | xmlIsValid (string $xml) |
| |
◆ form()
| Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::form |
( |
array |
$form, |
|
|
\Drupal\Core\Form\FormStateInterface & |
$form_state |
|
) |
| |
◆ form_submit()
| Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::form_submit |
( |
array |
$form, |
|
|
\Drupal\Core\Form\FormStateInterface |
$form_state, |
|
|
array & |
$criteria |
|
) |
| |
Plugin specific form submit to add form values to the criteria array. The criteria array eventually gets serialized and stored in the tripal_pub_import database table. (This code gets called from ChadoNewPublicationForm)
◆ formSubmit()
| Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::formSubmit |
( |
array |
$form, |
|
|
\Drupal\Core\Form\FormStateInterface & |
$form_state |
|
) |
| |
Handles submission of the form elements.
The form elements provided in the implementation of the form() function can be used for special submit if needed.
- Parameters
-
| array | $form | The form array definition. |
| \Drupal\Core\Form\FormStateInterface | $form_state | The form state object. |
- Returns
- void
Implements Drupal\tripal\TripalPubLibrary\Interfaces\TripalPubLibraryInterface.
◆ formValidate()
| Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::formValidate |
( |
array |
$form, |
|
|
\Drupal\Core\Form\FormStateInterface & |
$form_state |
|
) |
| |
◆ parse_xml()
| Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::parse_xml |
( |
string |
$pub_xml | ) |
|
◆ remoteSearchPMID()
| Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::remoteSearchPMID |
( |
|
$search_array, |
|
|
|
$num_to_retrieve, |
|
|
|
$page, |
|
|
|
$row_mode = 1 |
|
) |
| |
A function for performing the search on the PubMed database.
- Parameters
-
| $search_array | An array containing the search criteria for the search |
| $num_to_retrieve | Indicates the maximum number of publications to retrieve from the remote database |
| $page | Indicates the page to retrieve. This corresponds to a paged table, where each page has $num_to_retrieve publications. |
- Returns
- array|NULL
- 'total_records' = The number of records available for retrieval
- 'skipped_records' = The number of records where download failed
- 'search_str' = The query string used for the search
- 'pubs' = The uniform publication information array. or NULL if query failed and an exception was caught
◆ retrieve()
| Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::retrieve |
( |
array |
$query, |
|
|
int |
$limit = 10, |
|
|
int |
$page = 0 |
|
) |
| |
◆ run()
| Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::run |
( |
array |
$query | ) |
|
Retrieves one or more publications from PubMed based on a search query specification
- Parameters
-
| array | $query | An associative array defining a publication query, specifying the database and query parameters for a particular publication repository. |
- Returns
- array|NULL
- 'total_records' = The number of records available for retrieval
- 'skipped_records' = The number of records where download failed
- 'search_str' = The query string used for the search
- 'pubs' = The uniform publication information array. or NULL if query failed and an exception was caught
Implements Drupal\tripal\TripalPubLibrary\Interfaces\TripalPubLibraryInterface.
◆ $retrieval_options
| array Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::$retrieval_options |
|
protected |
Initial value:= [
'rate_limit' => 0.334,
'retry_delay' => 1.0,
]
◆ $webquery
| array Drupal\tripal\Plugin\TripalPubLibrary\TripalPubLibraryPubMed::$webquery = [] |
|
protected |
Stores information of an initialized search. Array keys are 'Count', 'WebEnv', and 'QueryKey' with values as returned by PubMed's esearch utility
The documentation for this class was generated from the following file:
- tripal/src/Plugin/TripalPubLibrary/TripalPubLibraryPubMed.php