tripal_featuremap.chado_node.inc 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. <?php
  2. /**
  3. * @file
  4. * Hooks implementing the feature map node content type
  5. */
  6. /**
  7. * Implements hook_node_info().
  8. *
  9. * Provide information to drupal about the node types that we're creating
  10. * in this module
  11. *
  12. * @ingroup tripal_featuremap
  13. */
  14. function tripal_featuremap_node_info() {
  15. $nodes = array();
  16. $nodes['chado_featuremap'] = array(
  17. 'name' => t('Feature Map'),
  18. 'base' => 'chado_featuremap',
  19. 'description' => t('A map of features from the chado database (e.g. genetic map)'),
  20. 'has_title' => TRUE,
  21. 'locked' => TRUE,
  22. 'chado_node_api' => array(
  23. 'base_table' => 'featuremap',
  24. 'hook_prefix' => 'chado_featuremap',
  25. 'record_type_title' => array(
  26. 'singular' => t('Feature Map'),
  27. 'plural' => t('Feature Maps')
  28. ),
  29. 'sync_filters' => array(
  30. 'type_id' => FALSE,
  31. 'organism_id' => FALSE
  32. ),
  33. )
  34. );
  35. return $nodes;
  36. }
  37. /**
  38. * When editing or creating a new node of type 'chado_featuremap' we need
  39. * a form. This function creates the form that will be used for this.
  40. *
  41. * @ingroup tripal_featuremap
  42. */
  43. function chado_featuremap_form($node, &$form_state) {
  44. $form = array();
  45. // Default values can come in the following ways:
  46. //
  47. // 1) as elements of the $node object. This occurs when editing an existing library
  48. // 2) in the $form_state['values'] array which occurs on a failed validation or
  49. // ajax callbacks from non submit form elements
  50. // 3) in the $form_state['input'[ array which occurs on ajax callbacks from submit
  51. // form elements and the form is being rebuilt
  52. //
  53. // set form field defaults
  54. $featuremap_id = NULL;
  55. $fmapname = '';
  56. $description = '';
  57. $unittype_id = '';
  58. // if we are editing an existing node then the featuremap is already part of the node
  59. if (property_exists($node, 'featuremap')) {
  60. $featuremap = $node->featuremap;
  61. $featuremap = chado_expand_var($featuremap, 'field', 'featuremap.description');
  62. $featuremap_id = $featuremap->featuremap_id;
  63. // get form defaults
  64. $fmapname = $featuremap->name;
  65. $description = $featuremap->description;
  66. $unittype_id = $featuremap->unittype_id->cvterm_id;
  67. // set the featuremap_id in the form
  68. $form['featuremap_id'] = array(
  69. '#type' => 'hidden',
  70. '#value' => $featuremap_id,
  71. );
  72. }
  73. // if we are re constructing the form from a failed validation or ajax callback
  74. // then use the $form_state['values'] values
  75. if (array_key_exists('values', $form_state)) {
  76. $fmapname = $form_state['values']['fmapname'];
  77. $description = $form_state['values']['description'];
  78. $unittype_id = $form_state['values']['unittype_id'];
  79. }
  80. // if we are re building the form from after submission (from ajax call) then
  81. // the values are in the $form_state['input'] array
  82. if (array_key_exists('input', $form_state) and !empty($form_state['input'])) {
  83. $fmapname = $form_state['input']['fmapname'];
  84. $description = $form_state['input']['description'];
  85. $unittype_id = $form_state['input']['unittype_id'];
  86. }
  87. $form['fmapname']= array(
  88. '#type' => 'textfield',
  89. '#title' => t('Map Name'),
  90. '#description' => t('Please enter a name for this map'),
  91. '#required' => TRUE,
  92. '#default_value' => $fmapname,
  93. '#maxlength' => 255
  94. );
  95. $form['description']= array(
  96. '#type' => 'textarea',
  97. '#title' => t('Map Description'),
  98. '#description' => t('A description of the map.'),
  99. '#required' => TRUE,
  100. '#default_value' => $description,
  101. );
  102. // get the list of unit types
  103. $units = tripal_get_cvterm_default_select_options('featuremap', 'unittype_id', 'map unit types');
  104. $form['unittype_id'] = array(
  105. '#title' => t('Map Units'),
  106. '#type' => t('select'),
  107. '#description' => t("Chose the units for this map"),
  108. '#required' => TRUE,
  109. '#default_value' => $unittype_id,
  110. '#options' => $units,
  111. );
  112. // Properties Form
  113. // ----------------------------------
  114. $prop_cv = tripal_get_default_cv('featuremap_property', 'type_id');
  115. $cv_id = $prop_cv ? $prop_cv->cv_id : NULL;
  116. $instructions = t('To add additional properties to the drop down. ' . l("Add terms to the featuremap_property vocabulary", "admin/tripal/chado/tripal_cv/cvterm/add") . ".");
  117. $details = array(
  118. 'property_table' => 'featuremapprop',
  119. 'chado_id' => $featuremap_id,
  120. 'cv_id' => $cv_id,
  121. 'fieldset_name' => 'Additional Details',
  122. 'additional_instructions' => $instructions
  123. );
  124. // TODO: remove the 'Map Dbxref' from the list as that should now be handled
  125. // by the dbxref interface below
  126. chado_add_node_form_properties($form, $form_state, $details);
  127. // ADDITIONAL DBXREFS FORM
  128. //---------------------------------------------
  129. $details = array(
  130. 'linking_table' => 'featuremap_dbxref', // the name of the _dbxref table
  131. 'base_foreign_key' => 'featuremap_id', // the name of the key in your base chado table
  132. 'base_key_value' => $featuremap_id // the value of featuremap_id for this record
  133. );
  134. // Adds the form elements to your current form
  135. chado_add_node_form_dbxrefs($form, $form_state, $details);
  136. return $form;
  137. }
  138. /**
  139. * Validates submission of form when adding or updating a map node
  140. *
  141. * @ingroup tripal_featuremap
  142. */
  143. function chado_featuremap_validate($node, $form, &$form_state) {
  144. // We only want to validate when the node is saved.
  145. // Since this validate can be called on AJAX and Deletion of the node
  146. // we need to make this check to ensure queries are not executed
  147. // without the proper values.
  148. if($node->op != 'Save') {
  149. return;
  150. }
  151. // we are syncing if we do not have a node ID but we do have a featuremap_id. We don't
  152. // need to validate during syncing so just skip it.
  153. if (is_null($node->nid) and property_exists($node, 'featuremap_id') and $node->featuremap_id != 0) {
  154. return;
  155. }
  156. // trim white space from text fields
  157. $node->fmapname = trim($node->fmapname);
  158. $node->description = trim($node->description);
  159. $featuremap = 0;
  160. // check to make sure the unique name on the map is unique
  161. // before we try to insert into chado. If this is an update then we will
  162. // have a featuremap_id, therefore we want to look for another map with this
  163. // name but with a different featuremap_id. If this is an insert, just look
  164. // for a case where the name already exists.
  165. if (property_exists($node, 'featuremap_id')) {
  166. $sql = "
  167. SELECT * FROM {featuremap}
  168. WHERE name = :name AND NOT featuremap_id = :featuremap_id
  169. ";
  170. $featuremap = chado_query($sql, array(':name' => $node->fmapname, ':featuremap_id' => $node->featuremap_id))->fetchObject();
  171. }
  172. else {
  173. $sql = "SELECT * FROM {featuremap} WHERE name = :name";
  174. $featuremap = chado_query($sql, array(':name' => $node->fmapname))->fetchObject();
  175. }
  176. if ($featuremap) {
  177. form_set_error('fmapname', t('The unique map name already exists. Please choose another'));
  178. }
  179. }
  180. /**
  181. * Implement hook_node_access().
  182. *
  183. * This hook allows node modules to limit access to the node types they define.
  184. *
  185. * @param $node
  186. * The node on which the operation is to be performed, or, if it does not yet exist, the
  187. * type of node to be created
  188. *
  189. * @param $op
  190. * The operation to be performed
  191. *
  192. * @param $account
  193. * A user object representing the user for whom the operation is to be performed
  194. *
  195. * @return
  196. * If the permission for the specified operation is not set then return FALSE. If the
  197. * permission is set then return NULL as this allows other modules to disable
  198. * access. The only exception is when the $op == 'create'. We will always
  199. * return TRUE if the permission is set.
  200. *
  201. * @ingroup tripal_featuremap
  202. */
  203. function chado_featuremap_node_access($node, $op, $account) {
  204. $node_type = $node;
  205. if (is_object($node)) {
  206. $node_type = $node->type;
  207. }
  208. if($node_type == 'chado_featuremap') {
  209. if ($op == 'create') {
  210. if (!user_access('create chado_featuremap content', $account)) {
  211. return NODE_ACCESS_DENY;
  212. }
  213. return NODE_ACCESS_ALLOW;
  214. }
  215. if ($op == 'update') {
  216. if (!user_access('edit chado_featuremap content', $account)) {
  217. return NODE_ACCESS_DENY;
  218. }
  219. }
  220. if ($op == 'delete') {
  221. if (!user_access('delete chado_featuremap content', $account)) {
  222. return NODE_ACCESS_DENY;
  223. }
  224. }
  225. if ($op == 'view') {
  226. if (!user_access('access chado_featuremap content', $account)) {
  227. return NODE_ACCESS_DENY;
  228. }
  229. }
  230. return NODE_ACCESS_IGNORE;
  231. }
  232. }
  233. /**
  234. * Implements hook_insert().
  235. *
  236. * When a new chado_featuremap node is created we also need to add information
  237. * to our chado_featuremap table. This function is called on insert of a new node
  238. * of type 'chado_featuremap' and inserts the necessary information.
  239. *
  240. * @ingroup tripal_featuremap
  241. */
  242. function chado_featuremap_insert($node) {
  243. $node->fmapname = trim($node->fmapname);
  244. $node->description = trim($node->description);
  245. // if there is an featuremap_id in the $node object then this must be a sync so
  246. // we can skip adding the featuremap as it is already there, although
  247. // we do need to proceed with the rest of the insert
  248. if (!property_exists($node, 'featuremap_id')) {
  249. $values = array(
  250. 'name' => $node->fmapname,
  251. 'description' => $node->description,
  252. 'unittype_id' => $node->unittype_id
  253. );
  254. $featuremap = chado_insert_record('featuremap', $values);
  255. if(!$featuremap) {
  256. drupal_set_message(t('Unable to add featuremap.', 'warning'));
  257. tripal_report_error('tripal_featuremap', TRIPAL_WARNING, 'Unable to create feature map where values: %values',
  258. array('%values' => print_r($values, TRUE)));
  259. return;
  260. }
  261. $featuremap_id = $featuremap['featuremap_id'];
  262. // now add in the properties
  263. $properties = chado_retrieve_node_form_properties($node);
  264. // We need to deal with the 'Map Dbxref' property specially
  265. $cvterm = chado_select_record(
  266. 'cvterm',
  267. array('cvterm_id'),
  268. array('name' => 'Map Dbxref', 'cv_id' => array('name' => 'featuremap_property'))
  269. );
  270. $map_dbxref_cvterm_id = $cvterm[0]->cvterm_id;
  271. if (isset($properties[$map_dbxref_cvterm_id])) {
  272. foreach ($properties[$map_dbxref_cvterm_id] as $rank => $value) {
  273. $featuremap_dbxref = tripal_featuremap_add_featuremap_dbxref($featuremap_id, $value);
  274. if (!$featuremap_dbxref) {
  275. drupal_set_message("Error cannot add featuremap cross reference: $value", "error");
  276. tripal_report_error('t_featuremap', TRIPAL_ERROR, "Error cannot add featuremap cross reference: %ref",
  277. array('%ref' => $value));
  278. }
  279. }
  280. unset($properties[$map_dbxref_cvterm_id]);
  281. }
  282. $details = array(
  283. 'property_table' => 'featuremapprop',
  284. 'base_table' => 'featuremap',
  285. 'foreignkey_name' => 'featuremap_id',
  286. 'foreignkey_value' => $featuremap_id
  287. );
  288. chado_update_node_form_properties($node, $details, $properties);
  289. // * Additional DBxrefs Form *
  290. $details = array(
  291. 'linking_table' => 'featuremap_dbxref', // the name of your _dbxref table
  292. 'foreignkey_name' => 'featuremap_id', // the name of the key in your base table
  293. 'foreignkey_value' => $featuremap_id // the value of the featuremap_id key
  294. );
  295. chado_update_node_form_dbxrefs($node, $details);
  296. }
  297. else {
  298. $featuremap_id = $node->featuremap_id;
  299. }
  300. // Make sure the entry for this featuremap doesn't already exist in the
  301. // chado_featuremap table if it doesn't exist then we want to add it.
  302. $check_org_id = chado_get_id_from_nid('featuremap', $node->nid);
  303. if (!$check_org_id) {
  304. $record = new stdClass();
  305. $record->nid = $node->nid;
  306. $record->vid = $node->vid;
  307. $record->featuremap_id = $featuremap_id;
  308. drupal_write_record('chado_featuremap', $record);
  309. }
  310. }
  311. /**
  312. * Implements hook_update(). Update nodes
  313. *
  314. * @ingroup tripal_featuremap
  315. */
  316. function chado_featuremap_update($node) {
  317. $node->fmapname = trim($node->fmapname);
  318. $node->description = trim($node->description);
  319. $featuremap_id = chado_get_id_from_nid('featuremap', $node->nid) ;
  320. // update the map record
  321. $match = array(
  322. 'featuremap_id' => $featuremap_id,
  323. );
  324. $values = array(
  325. 'name' => $node->fmapname,
  326. 'description' => $node->description,
  327. 'unittype_id' => $node->unittype_id
  328. );
  329. $status = chado_update_record('featuremap', $match, $values);
  330. if (!$status) {
  331. drupal_set_message("Error updating map", "error");
  332. tripal_report_error('t_featuremap', TRIPAL_ERROR, "Error updating map", array());
  333. return;
  334. }
  335. // Update the properties
  336. $properties = chado_retrieve_node_form_properties($node);
  337. // We need to deal with the 'Map Dbxref' property specially
  338. $cvterm = chado_select_record(
  339. 'cvterm',
  340. array('cvterm_id'),
  341. array('name' => 'Map Dbxref', 'cv_id' => array('name' => 'featuremap_property'))
  342. );
  343. $map_dbxref_cvterm_id = $cvterm[0]->cvterm_id;
  344. if (isset($properties[$map_dbxref_cvterm_id])) {
  345. foreach ($properties[$map_dbxref_cvterm_id] as $rank => $value) {
  346. $featuremap_dbxref = tripal_featuremap_add_featuremap_dbxref($featuremap_id, $value);
  347. if (!$featuremap_dbxref) {
  348. drupal_set_message("Error cannot add featuremap cross reference: $value", "error");
  349. tripal_report_error('t_featuremap', TRIPAL_ERROR, "Error cannot add featuremap cross reference: %ref",
  350. array('%ref' => $value));
  351. }
  352. }
  353. unset($properties[$map_dbxref_cvterm_id]);
  354. }
  355. $details = array(
  356. 'property_table' => 'featuremapprop',
  357. 'base_table' => 'featuremap',
  358. 'foreignkey_name' => 'featuremap_id',
  359. 'foreignkey_value' => $featuremap_id
  360. );
  361. chado_update_node_form_properties($node, $details, $properties);
  362. // * Additional DBxrefs Form *
  363. $details = array(
  364. 'linking_table' => 'featuremap_dbxref', // the name of your _dbxref table
  365. 'foreignkey_name' => 'featuremap_id', // the name of the key in your base table
  366. 'foreignkey_value' => $featuremap_id // the value of the featuremap_id key
  367. );
  368. chado_update_node_form_dbxrefs($node, $details);
  369. }
  370. /**
  371. * Implements hook_load().
  372. *
  373. * When a node is requested by the user this function is called to allow us
  374. * to add auxiliary data to the node object.
  375. *
  376. * @ingroup tripal_featuremap
  377. */
  378. function chado_featuremap_load($nodes) {
  379. foreach ($nodes as $nid => $node) {
  380. // get the feature details from chado
  381. $featuremap_id = chado_get_id_from_nid('featuremap', $node->nid);
  382. // if the nid does not have a matching record then skip this node.
  383. // this can happen with orphaned nodes.
  384. if (!$featuremap_id) {
  385. continue;
  386. }
  387. $values = array('featuremap_id' => $featuremap_id);
  388. $featuremap = chado_generate_var('featuremap', $values);
  389. // expand the description field as it is needed by the form
  390. $featuremap = chado_expand_var($featuremap, 'field', 'featuremap.description');
  391. $nodes[$nid]->featuremap = $featuremap;
  392. // Now get the title
  393. $node->title = chado_get_node_title($node);
  394. }
  395. }
  396. /**
  397. * Implements hook_delete().
  398. *
  399. * Delete data from drupal and chado databases when a node is deleted
  400. * @ingroup tripal_featuremap
  401. */
  402. function chado_featuremap_delete(&$node) {
  403. $featuremap_id = chado_get_id_from_nid('featuremap', $node->nid);
  404. // if we don't have a map id for this node then this isn't a node of
  405. // type chado_featuremap or the entry in the chado_featuremap table was lost.
  406. if (!$featuremap_id) {
  407. return;
  408. }
  409. // Remove data from {chado_featuremap}, {node} and {node_revisions} tables of
  410. // drupal database
  411. $sql_del = "DELETE FROM {chado_featuremap} WHERE nid = :nid AND vid = :vid";
  412. db_query($sql_del, array(':nid' => $node->nid, ':vid' => $node->vid));
  413. $sql_del = "DELETE FROM {node_revision} WHERE nid = :nid AND vid = :vid";
  414. db_query($sql_del, array(':nid' => $node->nid, ':vid' => $node->vid));
  415. $sql_del = "DELETE FROM {node} WHERE nid = :nid AND vid = :vid";
  416. db_query($sql_del, array(':nid' => $node->nid, ':vid' => $node->vid));
  417. // Remove data from map and mapprop tables of chado database as well
  418. chado_query("DELETE FROM {featuremapprop} WHERE featuremap_id = :featuremap_id", array(':featuremap_id' => $featuremap_id));
  419. chado_query("DELETE FROM {featuremap_dbxref} WHERE featuremap_id = :featuremap_id", array(':featuremap_id' => $featuremap_id));
  420. chado_query("DELETE FROM {featuremap} WHERE featuremap_id = :featuremap_id", array(':featuremap_id' => $featuremap_id));
  421. }
  422. /**
  423. * Implements hook_node_presave(). Acts on all content types.
  424. *
  425. * @ingroup tripal_featuremap
  426. */
  427. function tripal_featuremap_node_presave($node) {
  428. switch ($node->type) {
  429. // This step is for setting the title for the Drupal node. This title
  430. // is permanent and thus is created to be unique. Title changes provided
  431. // by tokens are generated on the fly dynamically, but the node title
  432. // seen in the content listing needs to be set here. Do not call
  433. // the chado_get_node_title() function here to set the title as the node
  434. // object isn't properly filled out and the function will fail.
  435. case 'chado_featuremap':
  436. // for a form submission the 'fmapname' field will be set,
  437. // for a sync, we must pull from the featuremap object
  438. if (property_exists($node, 'fmapname')) {
  439. // set the title
  440. $node->title = $node->fmapname;
  441. }
  442. else if (property_exists($node, 'featuremap')) {
  443. $node->title = $node->featuremap->name;
  444. }
  445. break;
  446. }
  447. }
  448. /**
  449. * Implements hook_node_view(). Acts on all content types.
  450. *
  451. * @ingroup tripal_feature
  452. */
  453. function tripal_featuremap_node_view($node, $view_mode, $langcode) {
  454. switch ($node->type) {
  455. case 'chado_featuremap':
  456. // Show feature browser and counts
  457. if ($view_mode == 'full') {
  458. $node->content['tripal_featuremap_base'] = array(
  459. '#theme' => 'tripal_featuremap_base',
  460. '#node' => $node,
  461. '#tripal_toc_id' => 'base',
  462. '#tripal_toc_title' => 'Overview',
  463. '#weight' => -100,
  464. );
  465. $node->content['tripal_featuremap_featurepos'] = array(
  466. '#theme' => 'tripal_featuremap_featurepos',
  467. '#node' => $node,
  468. '#tripal_toc_id' => 'featurepos',
  469. '#tripal_toc_title' => 'Map Features',
  470. );
  471. $node->content['tripal_featuremap_properties'] = array(
  472. '#theme' => 'tripal_featuremap_properties',
  473. '#node' => $node,
  474. '#tripal_toc_id' => 'properties',
  475. '#tripal_toc_title' => 'Properties',
  476. );
  477. $node->content['tripal_featuremap_publication'] = array(
  478. '#theme' => 'tripal_featuremap_publication',
  479. '#node' => $node,
  480. '#tripal_toc_id' => 'publications',
  481. '#tripal_toc_title' => 'Publications',
  482. );
  483. $node->content['tripal_featuremap_references'] = array(
  484. '#theme' => 'tripal_featuremap_references',
  485. '#node' => $node,
  486. '#tripal_toc_id' => 'references',
  487. '#tripal_toc_title' => 'Cross References',
  488. );
  489. }
  490. if ($view_mode == 'teaser') {
  491. $node->content['tripal_featuremap_teaser'] = array(
  492. '#theme' => 'tripal_featuremap_teaser',
  493. '#node' => $node,
  494. );
  495. }
  496. break;
  497. case 'chado_feature':
  498. if ($view_mode == 'full') {
  499. $node->content['tripal_feature_featurepos'] = array(
  500. '#theme' => 'tripal_feature_featurepos',
  501. '#node' => $node,
  502. '#tripal_toc_id' => 'featurepos',
  503. '#tripal_toc_title' => 'Maps',
  504. );
  505. }
  506. break;
  507. }
  508. }
  509. /**
  510. * Implements hook_node_insert().
  511. * Acts on all content types.
  512. *
  513. * @ingroup tripal_featuremap
  514. */
  515. function tripal_featuremap_node_insert($node) {
  516. switch ($node->type) {
  517. case 'chado_featuremap':
  518. // get the feature details from chado
  519. $featuremap_id = chado_get_id_from_nid('featuremap', $node->nid);
  520. $values = array('featuremap_id' => $featuremap_id);
  521. $featuremap = chado_generate_var('featuremap', $values);
  522. $node->featuremap = $featuremap;
  523. // Now get the title
  524. $node->title = chado_get_node_title($node);
  525. // Now use the API to set the path.
  526. chado_set_node_url($node);
  527. break;
  528. }
  529. }
  530. /**
  531. * Implements hook_node_update().
  532. * Acts on all content types.
  533. *
  534. * @ingroup tripal_featuremap
  535. */
  536. function tripal_featuremap_node_update($node) {
  537. switch ($node->type) {
  538. case 'chado_featuremap':
  539. // Now get the title
  540. $node->title = chado_get_node_title($node);
  541. // Now use the API to set the path.
  542. chado_set_node_url($node);
  543. break;
  544. }
  545. }
  546. /**
  547. * Implements [content_type]_chado_node_default_title_format().
  548. *
  549. * Defines a default title format for the Chado Node API to set the titles on
  550. * Chado featuremap nodes based on chado fields.
  551. */
  552. function chado_featuremap_chado_node_default_title_format() {
  553. return '[featuremap.name]';
  554. }
  555. /**
  556. * Implements hook_chado_node_default_url_format().
  557. *
  558. * Designates a default URL format for featuremap nodes.
  559. */
  560. function chado_featuremap_chado_node_default_url_format() {
  561. return '/featuremap/[featuremap.featuremap_id]';
  562. }