« Sensitive Regulated Data: Permitted and Restricted Uses | Main | UM Data Security and Sensitivity Resources »

January 13, 2012

ToDo: EML feeds for metadata

Alter LTER bit:



uid=UMBS, o=lter, dc=ecoinformatics, dc=org

This block automatically adds "_ref" to the end of node references. Problem is I don't always append "_ref" so those references don't end up in the metadata. From eml_variables.php (line 134):

foreach ($dataset_reference_names as $dataset_reference_name) {
$ref_nodes = Array();
$field_name = "field_" . $dataset_reference_name . "_ref";

Here's the new version of this:

      //  refs  
                
      $dataset_reference_names = array(

'dataset_owner',
'dataset_contact',
'dataset_datamanager_ref',
'dataset_fieldcrew',
'dataset_labcrew',
'dataset_ext_assoc',
'dataset_site_ref',
);

foreach ($dataset_reference_names as $dataset_reference_name) {
$ref_nodes = Array();
$field_name = "field_" . $dataset_reference_name;
if (isset($node->$field_name)) {
$ref_nid_array = $node->$field_name;
if ($dataset_reference_name == 'dataset_site_ref' &&
$node->field_dataset_site_ref[0]['nid']) {
$ref_nodes = eml_get_site_information($ref_nid_array);
}
else {
foreach ($ref_nid_array as $v) {
foreach ($v as $ref_nid) {
$ref_nodes[] = node_load($ref_nid);
}
}
}
}

In eml_config/eml_config_form.inc change the maxLength of acronym to 4

$form['acronym'] = array( '#type' => 'textfield', '#title' => t('Site name acronym'), // '#required' => TRUE, '#size' => 4, '#maxlength' => 4e, '#default_value' => variable_get('acronym', $last_settings['last_acronym']), // '#description' => t('Site name acronym'),

in views-bonus-eml-export-eml.tpl.php remove closing tags at end of file:

eml_indent(1); eml_close_tag('eml:eml'); ');

In views-bonus-eml-export-eml.tpl.php add a test to the check for a code-definition variable. I'm not sure why but without this test any variables that lack units or dates ends up going into this loop


}elseif ($var->code_definition[0][value] != NULL) {
eml_open_tag('nominal');
eml_open_tag('nonNumericDomain');


In views-bonus-eml-export-eml.tpl.php change knb to UMBS:


system='UMBS'>


//TODO: access tag group - from config file, or from site variable, or... here is my take !!!
eml_indent(1);
if ($acr) {
eml_open_tag('allow');
$access_string = "uid=$acr, o=umich, dc=ecoinformatics, dc=org";

Posted by kkwaiser at January 13, 2012 03:25 PM

Trackback Pings

TrackBack URL for this entry:
http://mblog.lib.umich.edu/mt-bin/mt-tb.cgi/2341

Listed below are links to weblogs that reference ToDo: EML feeds for metadata:

» Luka Santana from Luka Santana
Thanks-a-mundo for the blog. Keep writing. [Read More]

Tracked on September 25, 2012 12:30 PM

» Tiana Look from Tiana Look
Awesome post.Thanks Again. Really Great. [Read More]

Tracked on September 25, 2012 11:00 PM

» Armani Dull from Armani Dull
Thanks a lot for the article.Much thanks again. Want more. [Read More]

Tracked on September 26, 2012 05:47 AM

» Sage Cowden from Sage Cowden
Thank you ever so for you post.Really looking forward to read more. Keep writing. [Read More]

Tracked on September 27, 2012 08:25 AM

» Nigel Janik from Nigel Janik
Very neat article post.Really thank you! Really Great. [Read More]

Tracked on September 27, 2012 11:13 AM

» Kendal Angell from Kendal Angell
Major thankies for the blog article.Much thanks again. Want more. [Read More]

Tracked on September 28, 2012 08:08 AM

» Alonzo Moye from Alonzo Moye
A round of applause for your article post.Much thanks again. Cool. [Read More]

Tracked on September 30, 2012 04:24 PM

» kortingscode from kortingscode
Alle kortingscodes van nederland! [Read More]

Tracked on October 28, 2012 10:16 AM

» burberry outlet from burberry outlet
This game is really a highly physical the one that receiving harmed can often be simply inevitable. Think about this: Would you go to your mechanic and ask them for their advice regarding brain surgery? Why then would you choose to go to your friends a... [Read More]

Tracked on April 9, 2013 05:18 AM

» longchma sac from longchma sac
The Zune concentrates on being a Portable Media Player. Not a web browser. Not a game machine. Maybe in the future it'll do even better in those areas, but for now it's a fantastic way to organize and listen to your music and videos, and is without pee... [Read More]

Tracked on April 18, 2013 03:23 PM

» Popular toms outlet are trendy from Burberry Outlet Onlin
Popular toms outlet are trendy alternatives. [Read More]

Tracked on May 3, 2013 10:21 PM

» Burberry Outlet Store from Burberry Outlet Store
Luxurious toms outlet of different elelgant styles. [Read More]

Tracked on May 5, 2013 09:39 PM

» SkyScrape - Cherrin Cherrin from SkyScrape - Cherrin Cherrin
Data Discussions: ToDo: EML feeds for metadata [Read More]

Tracked on May 14, 2013 12:13 AM

» clncYxtI from clncYxtI
Data Discussions: ToDo: EML feeds for metadata [Read More]

Tracked on May 14, 2013 12:26 AM

» Cheap Blackhawks Jerseys from Cheap Blackhawks Jerseys
In 1955 Kaline became the youngest baseball player ever to win a batting title. In reality he was just 1 day younger than the prior record holder (Ty Cobb) when he broke the record. [Read More]

Tracked on May 16, 2013 01:54 PM

Comments

Login to leave a comment. Create a new account.