From | Vladimir Risojevic |
Date | Tue Jan 18 23:21:05 2011 |
Subject | [greenstone-users] OAI data provider with section level metadata |
In-Reply-To | (4D338807-70900-cs-waikato-ac-nz) |
Skipped content of type multipart/alternative-------------- next part --------------
########################################################################### # # AllList.pm -- Creates a single list of all documents. Use by the oaiserver. # A component of the Greenstone digital library software # from the New Zealand Digital Library Project at the # University of Waikato, New Zealand. # # Copyright (C) 2005 New Zealand Digital Library Project # # December 2010 # Modified to work with sections by Vladimir Risojevic, # Faculty of Electrical Engineering, University of Banja Luka # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ########################################################################### package AllList; use BaseClassifier; use strict;
sub BEGIN {
my $arguments =
my $options = { 'name' => "AllList",
sub new {
push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});
my $self = new BaseClassifier($classifierslist, $inputargs, $hashArgOptLists); if ($self->{'info_only'}) {
# Manually set $self parameters.
# these should actually be classifier options
return bless $self, $class;
sub init {
# classify which works on sections...
# shall we classify sections ...
sub classify_section {
# the section will be classified only if it has a value for one of the predefined metadata elements
my $metadata_element_value = $doc_obj->get_metadata_element($section, $metadata_element);
return unless($classify_section); if ($edit_mode eq "delete") {
return;
sub get_classify_info {
my %classifyinfo = ('childtype' =>'VList',
my $seqNo = 0;
my %tempinfo=('childtype'=>'VList',
push (@{$tempinfo{'contains'}}, $hashref); push (@{$classifyinfo{'contains'}}, %tempinfo);
return %classifyinfo;
|