tripal_pub.DEPRECATED.inc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. <?php
  2. /**
  3. * @file
  4. * Wrapper functions to provide backwards compatibility for the tripal analysis api
  5. */
  6. /**
  7. * @deprecated Restructured API to make naming more readable and consistent.
  8. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  9. * This function has been replaced by pub_search_remote().
  10. *
  11. * @see pub_search_remote().
  12. */
  13. function tripal_pub_get_remote_search_results($remote_db, $search_array, $num_to_retrieve, $page = 0) {
  14. tripal_report_error(
  15. 'tripal_api',
  16. TRIPAL_NOTICE,
  17. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  18. array(
  19. '%old_function'=>'tripal_pub_get_remote_search_results',
  20. '%new_function' => 'pub_search_remote'
  21. )
  22. );
  23. return pub_search_remote($remote_db, $search_array, $num_to_retrieve, $page);;
  24. }
  25. /**
  26. * @deprecated Restructured API to make naming more readable and consistent.
  27. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  28. * This function has been replaced by chado_get_remote_pub_record().
  29. *
  30. * @see chado_get_remote_pub_record().
  31. */
  32. function tripal_pub_get_raw_data($dbxref) {
  33. tripal_report_error(
  34. 'tripal_api',
  35. TRIPAL_NOTICE,
  36. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  37. array(
  38. '%old_function'=>'tripal_pub_get_raw_data',
  39. '%new_function' => 'chado_get_remote_pub_record'
  40. )
  41. );
  42. return tripal_get_remote_pub_record($dbxref);
  43. }
  44. /**
  45. * @deprecated Restructured API to make naming more readable and consistent.
  46. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  47. * This function has been replaced by chado_update_multiple_publications().
  48. *
  49. * @see chado_update_multiple_publications().
  50. */
  51. function tripal_pub_update_publications($do_contact = FALSE, $dbxref = NULL, $db = NULL) {
  52. tripal_report_error(
  53. 'tripal_api',
  54. TRIPAL_NOTICE,
  55. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  56. array(
  57. '%old_function'=>'tripal_pub_update_publications',
  58. '%new_function' => 'chado_update_multiple_publications'
  59. )
  60. );
  61. return FALSE;
  62. }
  63. /**
  64. * @deprecated Restructured API to make naming more readable and consistent.
  65. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  66. * This function has been replaced by chado_import_multiple_publications().
  67. *
  68. * @see chado_import_multiple_publications().
  69. */
  70. function tripal_pub_import_publications_by_import_id($import_id, $job_id = NULL) {
  71. tripal_report_error(
  72. 'tripal_api',
  73. TRIPAL_NOTICE,
  74. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  75. array(
  76. '%old_function'=>'tripal_pub_import_publications_by_import_id',
  77. '%new_function' => 'chado_import_multiple_publications'
  78. )
  79. );
  80. return FALSE;
  81. }
  82. /**
  83. * @deprecated Restructured API to make naming more readable and consistent.
  84. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  85. * This function has been replaced by chado_import_multiple_publications().
  86. *
  87. * @see chado_import_multiple_publications().
  88. */
  89. function tripal_pub_import_publications($report_email = FALSE, $do_update = FALSE) {
  90. tripal_report_error(
  91. 'tripal_api',
  92. TRIPAL_NOTICE,
  93. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  94. array(
  95. '%old_function'=>'tripal_pub_import_publications',
  96. '%new_function' => 'chado_import_multiple_publications'
  97. )
  98. );
  99. return FALSE;
  100. }
  101. /**
  102. * @deprecated Restructured API to make naming more readable and consistent.
  103. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  104. * This function has been replaced by chado_import_multiple_publications().
  105. *
  106. * @see chado_import_multiple_publications().
  107. */
  108. function tripal_pub_import_by_dbxref($pub_dbxref, $do_contact = FALSE, $do_update) {
  109. tripal_report_error(
  110. 'tripal_api',
  111. TRIPAL_NOTICE,
  112. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  113. array(
  114. '%old_function'=>'tripal_pub_import_by_dbxref',
  115. '%new_function' => 'chado_import_multiple_publications'
  116. )
  117. );
  118. return FALSE;
  119. }
  120. /**
  121. * @deprecated Restructured API to make naming more readable and consistent.
  122. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  123. * This function has been replaced by chado_insert_multiple_publications().
  124. *
  125. * @see chado_insert_multiple_publications().
  126. */
  127. function tripal_pub_add_publications($pubs, $do_contact, $update = FALSE) {
  128. tripal_report_error(
  129. 'tripal_api',
  130. TRIPAL_NOTICE,
  131. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  132. array(
  133. '%old_function'=>'tripal_pub_add_publications',
  134. '%new_function' => 'chado_insert_multiple_publications'
  135. )
  136. );
  137. return FALSE;
  138. }
  139. /**
  140. * @deprecated Restructured API to make naming more readable and consistent.
  141. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  142. * This function has been replaced by chado_associate_dbxref().
  143. *
  144. * @see chado_associate_dbxref().
  145. */
  146. function tripal_pub_add_pub_dbxref($pub_id, $pub_dbxref) {
  147. tripal_report_error(
  148. 'tripal_api',
  149. TRIPAL_NOTICE,
  150. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  151. array(
  152. '%old_function'=>'tripal_pub_add_pub_dbxref',
  153. '%new_function' => 'chado_associate_dbxref'
  154. )
  155. );
  156. $dbxref = array();
  157. if(preg_match('/^(.*?):(.*?)$/', trim($pub_dbxref), $matches)) {
  158. $dbxref['db_name'] = $matches[1];
  159. $dbxref['accession'] = $matches[2];
  160. }
  161. return chado_associate_dbxref('pub', $pub_id, $dbxref);
  162. }
  163. /**
  164. * @deprecated Restructured API to make naming more readable and consistent.
  165. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  166. * This function has been replaced by chado_get_publication().
  167. *
  168. * @see chado_get_publication().
  169. */
  170. function tripal_pub_get_pubs_by_dbxref($pub_dbxref) {
  171. tripal_report_error(
  172. 'tripal_api',
  173. TRIPAL_NOTICE,
  174. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  175. array(
  176. '%old_function'=>'tripal_pub_get_pubs_by_dbxref',
  177. '%new_function' => 'chado_get_publication'
  178. )
  179. );
  180. return FALSE;
  181. }
  182. /**
  183. * @deprecated Restructured API to make naming more readable and consistent.
  184. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  185. * This function has been replaced by chado_get_publication().
  186. *
  187. * @see chado_get_publication().
  188. */
  189. function tripal_pub_get_pubs_by_title_type_pyear_series($title, $type = NULL, $pyear = NULL, $series_name = NULL) {
  190. tripal_report_error(
  191. 'tripal_api',
  192. TRIPAL_NOTICE,
  193. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  194. array(
  195. '%old_function'=>'tripal_pub_get_pubs_by_title_type_pyear_series',
  196. '%new_function' => 'chado_get_publication'
  197. )
  198. );
  199. return FALSE;
  200. }
  201. /**
  202. * @deprecated Restructured API to make naming more readable and consistent.
  203. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  204. * This function has been replaced by chado_get_publication().
  205. *
  206. * @see chado_get_publication().
  207. */
  208. function tripal_pub_get_pub_by_uniquename($name) {
  209. tripal_report_error(
  210. 'tripal_api',
  211. TRIPAL_NOTICE,
  212. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  213. array(
  214. '%old_function'=>'tripal_pub_get_pub_by_uniquename',
  215. '%new_function' => 'chado_get_publication'
  216. )
  217. );
  218. return FALSE;
  219. }
  220. /**
  221. * @deprecated Restructured API to make naming more readable and consistent.
  222. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  223. * This function has been replaced by chado_insert_publication().
  224. *
  225. * @see chado_insert_publication().
  226. */
  227. function tripal_pub_add_publication($pub_details, &$action, $do_contact = FALSE, $update_if_exists = FALSE) {
  228. tripal_report_error(
  229. 'tripal_api',
  230. TRIPAL_NOTICE,
  231. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  232. array(
  233. '%old_function'=>'tripal_pub_add_publication',
  234. '%new_function' => 'chado_insert_publication'
  235. )
  236. );
  237. return FALSE;
  238. }
  239. /**
  240. * @deprecated Restructured API to make naming more readable and consistent.
  241. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  242. * This function has been replaced by chado_insert_multiple_pubauthors().
  243. *
  244. * @see chado_insert_multiple_pubauthors().
  245. */
  246. function tripal_pub_add_authors($pub_id, $authors, $do_contact) {
  247. tripal_report_error(
  248. 'tripal_api',
  249. TRIPAL_NOTICE,
  250. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  251. array(
  252. '%old_function'=>'tripal_pub_add_authors',
  253. '%new_function' => 'chado_insert_multiple_pubauthors'
  254. )
  255. );
  256. return FALSE;
  257. }
  258. /**
  259. * @deprecated Restructured API to make naming more readable and consistent.
  260. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  261. * This function has been replaced by chado_get_property().
  262. *
  263. * @see chado_get_property().
  264. */
  265. function tripal_pub_get_property($pub_id, $property) {
  266. tripal_report_error(
  267. 'tripal_api',
  268. TRIPAL_NOTICE,
  269. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  270. array(
  271. '%old_function'=>'tripal_pub_get_property',
  272. '%new_function' => 'chado_get_property'
  273. )
  274. );
  275. return chado_get_property('pub', $pub_id, $property, 'tripal_pub');
  276. }
  277. /**
  278. * @deprecated Restructured API to make naming more readable and consistent.
  279. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  280. * This function has been replaced by chado_insert_property().
  281. *
  282. * @see chado_insert_property().
  283. */
  284. function tripal_pub_insert_property($pub_id, $property, $value, $update_if_present = 0) {
  285. tripal_report_error(
  286. 'tripal_api',
  287. TRIPAL_NOTICE,
  288. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  289. array(
  290. '%old_function'=>'tripal_pub_insert_property',
  291. '%new_function' => 'chado_insert_property'
  292. )
  293. );
  294. return chado_insert_property('pub', $pub_id, $property, 'tripal_pub', $value, $update_if_present);
  295. }
  296. /**
  297. * @deprecated Restructured API to make naming more readable and consistent.
  298. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  299. * This function has been replaced by chado_update_property().
  300. *
  301. * @see chado_update_property().
  302. */
  303. function tripal_pub_update_property($pub_id, $property, $value, $insert_if_missing = 0) {
  304. tripal_report_error(
  305. 'tripal_api',
  306. TRIPAL_NOTICE,
  307. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  308. array(
  309. '%old_function'=>'tripal_pub_update_property',
  310. '%new_function' => 'chado_update_property'
  311. )
  312. );
  313. return chado_update_property('pub', $pub_id, $property, 'tripal_pub', $value, $insert_if_missing);
  314. }
  315. /**
  316. * @deprecated Restructured API to make naming more readable and consistent.
  317. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  318. * This function has been replaced by chado_delete_property().
  319. *
  320. * @see chado_delete_property().
  321. */
  322. function tripal_pub_delete_property($pub_id, $property) {
  323. tripal_report_error(
  324. 'tripal_api',
  325. TRIPAL_NOTICE,
  326. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  327. array(
  328. '%old_function'=>'tripal_pub_delete_property',
  329. '%new_function' => 'chado_delete_property'
  330. )
  331. );
  332. return chado_delete_property('pub', $pub_id, $property, 'tripal_pub');
  333. }
  334. /**
  335. * @deprecated Restructured API to make naming more readable and consistent.
  336. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  337. * This function has been replaced by chado_get_publication().
  338. *
  339. * @see chado_get_publication().
  340. */
  341. function tripal_pub_get_publication_array($pub_id, $skip_existing = TRUE) {
  342. tripal_report_error(
  343. 'tripal_api',
  344. TRIPAL_NOTICE,
  345. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  346. array(
  347. '%old_function'=>'tripal_pub_get_publication_array',
  348. '%new_function' => 'chado_get_publication'
  349. )
  350. );
  351. return FALSE;
  352. }
  353. /**
  354. * @deprecated Restructured API to make naming more readable and consistent.
  355. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  356. * This function has been replaced by pub_generate_citation().
  357. *
  358. * @see pub_generate_citation().
  359. */
  360. function tripal_pub_create_citation($pub) {
  361. tripal_report_error(
  362. 'tripal_api',
  363. TRIPAL_NOTICE,
  364. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  365. array(
  366. '%old_function'=>'tripal_pub_create_citation',
  367. '%new_function' => 'pub_generate_citation'
  368. )
  369. );
  370. return FALSE;
  371. }