Ignore:
Timestamp:
2002-11-18T17:43:56+13:00 (21 years ago)
Author:
kjdon
Message:

added John T's changes into CVS - added info to enable retrieval of usage info in xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/List.pm

    r2022 r3540  
    3838#                      if metadata is also not included title will be 'List'
    3939
     40# 12/05/02 Added usage datastructure - John Thompson
     41
    4042use BasClas;
    4143package List;
     
    4648    @ISA = ('BasClas');
    4749}
     50
     51my $arguments =
     52[ {     'name' => "metadata",
     53    'desc' => "Metadata field used for classification. List will be sorted by this element.",
     54    'type' => "metadata",
     55    'reqd' => "yes" } ,
     56{   'name' => "buttonname",
     57    'desc' => "Button name for this classification. Defaults to metadata name.",
     58    'type' => "string",
     59    'reqd' => "no" } ,
     60{   'name' => "sort",
     61    'desc' => "Sort documents in list by this metadata field. By default it will sort by Metaname, or (if this is not set) in build (random) order.",
     62    'type' => "string",
     63    'reqd' => "no" }
     64];
     65
     66my $options =
     67{   'name'     => "List",
     68    'desc'     => "Simple list classifier plugin.",
     69    'inherits' => "Yes",
     70    'args'     => $arguments };
     71
    4872
    4973sub print_usage {
     
    6791    my $class = shift (@_);
    6892    my $self = new BasClas($class, @_);
     93
     94     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
     95     my $option_list = $self->{'option_list'};
     96     push( @{$option_list}, $options );
    6997   
    7098    my ($metaname, $title, $sortname, $list);
Note: See TracChangeset for help on using the changeset viewer.