« 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:

» ブルガリ 長財布 from ブルガリ 長財布
The popular belief is that if you buy from a Coach outlet then not often obtained have the money to buy among the list of pocketbooks from a regular shop. That belief is far from reality. [Read More]

Tracked on February 11, 2014 06:57 AM

» アナスイ 長財布 from アナスイ 長財布
Its like men and women arent fascinated unless it is one thing to accomplish with Lady gaga! Your own stuffs outstanding. Always maintain it up!} [Read More]

Tracked on February 28, 2014 09:33 PM

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

Tracked on March 10, 2014 09:58 AM

» payday loans from payday loans
How come this site is so slow? Takes like 20 seconds for this page to load! [Read More]

Tracked on March 11, 2014 03:50 AM

» lilemo.com from lilemo.com
Data Discussions: ToDo: EML feeds for metadata [Read More]

Tracked on March 11, 2014 08:34 AM

» Www.Sexykarma.Com from Www.Sexykarma.Com
Data Discussions: ToDo: EML feeds for metadata [Read More]

Tracked on March 21, 2014 01:45 PM

» http://www.torcidadonautico.com.br from http://www.torcidadonautico.com.br
Data Discussions: ToDo: EML feeds for metadata [Read More]

Tracked on March 22, 2014 11:42 AM

» siamgenius.com from siamgenius.com
Data Discussions: ToDo: EML feeds for metadata [Read More]

Tracked on April 6, 2014 06:44 AM

» ポールスミス 店舗 from ポールスミス 店舗
Pizza Hut menu is without a doubt impressive. We highly recommend you to secure a Pizza Hut menu as soon as possible!! Pizza Huts is providing the actual very best pizza of the world!! [Read More]

Tracked on April 21, 2014 05:38 AM

Comments

Login to leave a comment. Create a new account.