tripal_pub.DEPRECATED.inc 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  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 FALSE;
  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 FALSE;
  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. return FALSE;
  157. }
  158. /**
  159. * @deprecated Restructured API to make naming more readable and consistent.
  160. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  161. * This function has been replaced by chado_get_publication().
  162. *
  163. * @see chado_get_publication().
  164. */
  165. function tripal_pub_get_pubs_by_dbxref($pub_dbxref) {
  166. tripal_report_error(
  167. 'tripal_api',
  168. TRIPAL_NOTICE,
  169. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  170. array(
  171. '%old_function'=>'tripal_pub_get_pubs_by_dbxref',
  172. '%new_function' => 'chado_get_publication'
  173. )
  174. );
  175. return FALSE;
  176. }
  177. /**
  178. * @deprecated Restructured API to make naming more readable and consistent.
  179. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  180. * This function has been replaced by chado_get_publication().
  181. *
  182. * @see chado_get_publication().
  183. */
  184. function tripal_pub_get_pubs_by_title_type_pyear_series($title, $type = NULL, $pyear = NULL, $series_name = NULL) {
  185. tripal_report_error(
  186. 'tripal_api',
  187. TRIPAL_NOTICE,
  188. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  189. array(
  190. '%old_function'=>'tripal_pub_get_pubs_by_title_type_pyear_series',
  191. '%new_function' => 'chado_get_publication'
  192. )
  193. );
  194. return FALSE;
  195. }
  196. /**
  197. * @deprecated Restructured API to make naming more readable and consistent.
  198. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  199. * This function has been replaced by chado_get_publication().
  200. *
  201. * @see chado_get_publication().
  202. */
  203. function tripal_pub_get_pub_by_uniquename($name) {
  204. tripal_report_error(
  205. 'tripal_api',
  206. TRIPAL_NOTICE,
  207. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  208. array(
  209. '%old_function'=>'tripal_pub_get_pub_by_uniquename',
  210. '%new_function' => 'chado_get_publication'
  211. )
  212. );
  213. return FALSE;
  214. }
  215. /**
  216. * @deprecated Restructured API to make naming more readable and consistent.
  217. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  218. * This function has been replaced by chado_insert_publication().
  219. *
  220. * @see chado_insert_publication().
  221. */
  222. function tripal_pub_add_publication($pub_details, &$action, $do_contact = FALSE, $update_if_exists = FALSE) {
  223. tripal_report_error(
  224. 'tripal_api',
  225. TRIPAL_NOTICE,
  226. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  227. array(
  228. '%old_function'=>'tripal_pub_add_publication',
  229. '%new_function' => 'chado_insert_publication'
  230. )
  231. );
  232. return FALSE;
  233. }
  234. /**
  235. * @deprecated Restructured API to make naming more readable and consistent.
  236. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  237. * This function has been replaced by chado_insert_multiple_pubauthors().
  238. *
  239. * @see chado_insert_multiple_pubauthors().
  240. */
  241. function tripal_pub_add_authors($pub_id, $authors, $do_contact) {
  242. tripal_report_error(
  243. 'tripal_api',
  244. TRIPAL_NOTICE,
  245. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  246. array(
  247. '%old_function'=>'tripal_pub_add_authors',
  248. '%new_function' => 'chado_insert_multiple_pubauthors'
  249. )
  250. );
  251. return FALSE;
  252. }
  253. /**
  254. * @deprecated Restructured API to make naming more readable and consistent.
  255. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  256. * This function has been replaced by chado_get_property().
  257. *
  258. * @see chado_get_property().
  259. */
  260. function tripal_pub_get_property($pub_id, $property) {
  261. tripal_report_error(
  262. 'tripal_api',
  263. TRIPAL_NOTICE,
  264. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  265. array(
  266. '%old_function'=>'tripal_pub_get_property',
  267. '%new_function' => 'chado_get_property'
  268. )
  269. );
  270. return chado_get_property('pub', $pub_id, $property, 'tripal_pub');
  271. }
  272. /**
  273. * @deprecated Restructured API to make naming more readable and consistent.
  274. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  275. * This function has been replaced by chado_insert_property().
  276. *
  277. * @see chado_insert_property().
  278. */
  279. function tripal_pub_insert_property($pub_id, $property, $value, $update_if_present = 0) {
  280. tripal_report_error(
  281. 'tripal_api',
  282. TRIPAL_NOTICE,
  283. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  284. array(
  285. '%old_function'=>'tripal_pub_insert_property',
  286. '%new_function' => 'chado_insert_property'
  287. )
  288. );
  289. return chado_insert_property('pub', $pub_id, $property, 'tripal_pub', $value, $update_if_present);
  290. }
  291. /**
  292. * @deprecated Restructured API to make naming more readable and consistent.
  293. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  294. * This function has been replaced by chado_update_property().
  295. *
  296. * @see chado_update_property().
  297. */
  298. function tripal_pub_update_property($pub_id, $property, $value, $insert_if_missing = 0) {
  299. tripal_report_error(
  300. 'tripal_api',
  301. TRIPAL_NOTICE,
  302. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  303. array(
  304. '%old_function'=>'tripal_pub_update_property',
  305. '%new_function' => 'chado_update_property'
  306. )
  307. );
  308. return chado_update_property('pub', $pub_id, $property, 'tripal_pub', $value, $insert_if_missing);
  309. }
  310. /**
  311. * @deprecated Restructured API to make naming more readable and consistent.
  312. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  313. * This function has been replaced by chado_delete_property().
  314. *
  315. * @see chado_delete_property().
  316. */
  317. function tripal_pub_delete_property($pub_id, $property) {
  318. tripal_report_error(
  319. 'tripal_api',
  320. TRIPAL_NOTICE,
  321. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  322. array(
  323. '%old_function'=>'tripal_pub_delete_property',
  324. '%new_function' => 'chado_delete_property'
  325. )
  326. );
  327. return chado_delete_property('pub', $pub_id, $property, 'tripal_pub');
  328. }
  329. /**
  330. * @deprecated Restructured API to make naming more readable and consistent.
  331. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  332. * This function has been replaced by chado_get_publication().
  333. *
  334. * @see chado_get_publication().
  335. */
  336. function tripal_pub_get_publication_array($pub_id, $skip_existing = TRUE) {
  337. tripal_report_error(
  338. 'tripal_api',
  339. TRIPAL_NOTICE,
  340. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  341. array(
  342. '%old_function'=>'tripal_pub_get_publication_array',
  343. '%new_function' => 'chado_get_publication'
  344. )
  345. );
  346. return FALSE;
  347. }
  348. /**
  349. * @deprecated Restructured API to make naming more readable and consistent.
  350. * Function was deprecated in Tripal 2.0 and will be removed 2 releases from now.
  351. * This function has been replaced by pub_generate_citation().
  352. *
  353. * @see pub_generate_citation().
  354. */
  355. function tripal_pub_create_citation($pub) {
  356. tripal_report_error(
  357. 'tripal_api',
  358. TRIPAL_NOTICE,
  359. "DEPRECATED: %old_function has been replaced with %new_function. Please update your code.",
  360. array(
  361. '%old_function'=>'tripal_pub_create_citation',
  362. '%new_function' => 'pub_generate_citation'
  363. )
  364. );
  365. return FALSE;
  366. }