Changeset 6968 for trunk/gsdl/perllib/classify/Hierarchy.pm
- Timestamp:
- 2004-03-08T15:39:43+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/Hierarchy.pm
r6761 r6968 25 25 26 26 # classifier plugin for generating hierarchical classifications 27 28 # options for this classifier are:29 # -hfile file.txt - classification file30 # -metadata Metaname - metadata field to test against file.txt31 # -sort Meta - this option is optional (genious;-). by default this32 # classifier will sort documents within each section33 # alphabetically by Title. sort=nosort prevents sorting34 # (i.e. documents will end up in build order), sort=Meta35 # will sort each field alphabetically by Meta (Meta may36 # also be 'Filename' to sort by the original filename).37 # -buttonname Title - another optional field. this is what will end up in the38 # Title field for this classification. if not present it39 # defaults to Metaname40 # -hlist_at_top - use a horizontal list for the top level (i.e. display it41 # like an AZList classification)42 27 43 28 # 12/05/02 Added usage datastructure - John Thompson … … 66 51 'reqd' => "yes" }, 67 52 { 'name' => "buttonname", 68 'desc' => "{ Hierarchy.buttonname}",53 'desc' => "{BasClas.buttonname}", 69 54 'type' => "string", 70 55 'deft' => "{BasClas.metadata.deft}", … … 87 72 'args' => $arguments }; 88 73 89 # sub print_usage {90 # print STDERR "91 # usage: classify Hierarchy [options]92 # options:93 94 # -buttonname X Title field for this classification.95 # Defaults to metadata name.96 97 # -metadata X Metadata field used for classification,98 # list will be sorted by this element,99 # unless -sort is used.100 101 # -hfile X The classification structure file102 103 # -sort X Metadata field to sort by (defaults to -metadata)104 # use '-sort nosort' for no sorting.105 106 # -hlist_at_top Display the first level of the classification107 # horizontally.108 # ";109 # }110 111 74 112 75 sub new { … … 114 77 my $self = new BasClas($class, @_); 115 78 116 # 14-05-02 To allow for proper inheritance of arguments - John Thompson117 79 my $option_list = $self->{'option_list'}; 118 80 push( @{$option_list}, $options ); 119 81 82 if ($self->{'info_only'}) { 83 # created from classinfo.pl - don't need to parse the arguments 84 return bless $self, $class; 85 } 86 120 87 my ($hfile, $metadata, $sortname, $title, $hlist_at_top); 121 88
Note:
See TracChangeset
for help on using the changeset viewer.