EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #05380
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] subject / division return full path in report
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] subject / division return full path in report
- From: Michael Eadie <Michael.Eadie@glasgow.ac.uk>
- Date: Tue, 2 Feb 2016 11:12:09 +0000
Hi List Using 3.3.12 and the Generic Reporting Framework plugin. I'm trying to return the full path for a subject tree (e.g. College of Arts - School of Humanities - History) into a report I have this code: my( $plugin, $objects ) = @_; my $eprint = $objects->{eprint}; my $val = $eprint->value('divisions'); my $subject_ds = $plugin->repository->dataset('subject'); my $paths = []; foreach my $div_id (@{$val}) { my $subj_obj = $subject_ds->dataobj($div_id); ##get the subject object given the subject id $subj_obj->get_paths($plugin->repository, 'ROOT'); push @{$paths}, $subj_obj; } my $str = join(' ; ', @{$paths}); return $str; I'm getting array refs returned (you might say unsurprisingly!) e.g. EPrints::DataObj::Subject=HASH(0xead4360) I sort of know $subj_obj should be an array -but I've tried various things unsuccessfully and am getting a bit lost! If anyone had any pointers it would be much appreciated. thanks Mick -- Mick Eadie Research Data Management Officer University of Glasgow Tel: +44 (0) 141 330 6294 http://researchdata.gla.ac.uk | www.glasgow.ac.uk/services/datamanagement/
- Prev by Date: [EP-tech] Re: Wiki down?
- Next by Date: [EP-tech] Error install spanish language pack
- Previous by thread: [EP-tech] Wiki down?
- Next by thread: [EP-tech] Error install spanish language pack
- Index(es):