Changeset 14084
- Timestamp:
- 2007-05-21T17:40:08+12:00 (17 years ago)
- Location:
- trunk/gsdl/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/GenericList.pm
r13791 r14084 65 65 'desc' => "{GenericList.partition_size_within_level}", 66 66 'type' => "string" }, 67 { 'name' => "partition_name_length", 68 'desc' => "{GenericList.partition_name_length}", 69 'type' => "string" }, 67 70 { 'name' => "sort_leaf_nodes_using", 68 71 'desc' => "{GenericList.sort_leaf_nodes_using}", … … 362 365 # Is this the start of a new partition? 363 366 if ($itemsinpartition == 1) { 364 $partitionstart = &generate_partition_start($metavalue, $lastpartitionend );367 $partitionstart = &generate_partition_start($metavalue, $lastpartitionend, $self->{"partition_name_length"}); 365 368 } 366 369 367 370 # Is this the end of the partition? 368 371 if ($itemsinpartition == $partition_size_within_level || $itemsdone == @sortedmetavalues) { 369 my $partitionend = &generate_partition_end($metavalue, $partitionstart );372 my $partitionend = &generate_partition_end($metavalue, $partitionstart, $self->{"partition_name_length"}); 370 373 my $partitionname = $partitionstart; 371 374 if ($partitionend ne $partitionstart) { … … 419 422 my $metavalue = shift(@_); 420 423 my $lastpartitionend = shift(@_); 424 my $partition_name_length = shift(@_); 425 426 if ($partition_name_length) { 427 return substr($metavalue, 0, $partition_name_length); 428 } 421 429 422 430 my $partitionstart = substr($metavalue, 0, 1); … … 437 445 my $metavalue = shift(@_); 438 446 my $partitionstart = shift(@_); 447 my $partition_name_length = shift(@_); 448 449 if ($partition_name_length) { 450 return substr($metavalue, 0, $partition_name_length); 451 } 439 452 440 453 my $partitionend = substr($metavalue, 0, length($partitionstart)); -
trunk/gsdl/perllib/strings.properties
r14012 r14084 546 546 GenericList.desc:A general and flexible list classifier with most of the abilities of AZCompactList, but with better Unicode, metadata and sorting capabilities. 547 547 GenericList.metadata:Metadata fields used for classification. Use '/' to separate the levels in the hierarchy and ';' to separate metadata fields within each level. 548 GenericList.partition_name_length:The length of the partition name; defaults to a variable length from 1 up to 3 characters, depending on how many are required to distinguish the partition start from its end. This option only applies when partition_type_within_level is set to 'constant_size'. 548 549 GenericList.partition_size_within_level:The number of items in each partition (only applies when partition_type_within_level is set to 'constant_size'). 549 550 GenericList.partition_type_within_level:The type of partitioning done: either 'per_letter', 'constant_size', or 'none'.
Note:
See TracChangeset
for help on using the changeset viewer.