Changeset 3771 for trunk/gsdl3
- Timestamp:
- 2003-02-26T13:05:08+13:00 (21 years ago)
- Location:
- trunk/gsdl3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/bin/script/convert_coll_from_gs2.pl
r3688 r3771 106 106 $writer->endTag('metadataList'); 107 107 } 108 109 110 #indexes 111 my $indexmap = {}; 112 if (defined $buildcfg->{'indexmap'}) { 113 $indexmap_t = $buildcfg->{'indexmap'}; 114 foreach $i (@$indexmap_t) { 115 my ($k, $v) = $i =~ /^(.*)\-\>(.*)$/; 116 $indexmap->{$k} = $v; 117 } 118 } else { 119 print STDERR "indexmap not defined"; 120 } 121 my $defaultindex; 122 if (defined $collectcfg->{'defaultindex'}) { 123 $defaultindex = $collectcfg->{'defaultindex'}; 124 } else { 125 print STDERR "defaultindex not defined"; 126 } 127 $defaultindex = $indexmap->{$defaultindex}; 128 129 108 130 $writer->startTag('serviceRackList'); 109 131 … … 136 158 137 159 } elsif ($buildtype eq 'mg') { 138 $writer->emptyTag('serviceRack', 'name'=>'GS2MGRetrieve'); 160 $writer->startTag('serviceRack', 'name'=>'GS2MGRetrieve'); 161 $writer->emptyTag('defaultIndex', 'name'=>$defaultindex); 162 $writer->endTag('serviceRack'); 139 163 $writer->startTag('serviceRack', 'name'=>'GS2MGSearch'); 140 164 } 141 142 #indexes 143 my $indexmap = {}; 144 if (defined $buildcfg->{'indexmap'}) { 145 $indexmap_t = $buildcfg->{'indexmap'}; 146 foreach $i (@$indexmap_t) { 147 my ($k, $v) = $i =~ /^(.*)\-\>(.*)$/; 148 $indexmap->{$k} = $v; 149 } 150 } else { 151 print STDERR "indexmap not defined"; 152 } 153 my $defaultindex; 154 if (defined $collectcfg->{'defaultindex'}) { 155 $defaultindex = $collectcfg->{'defaultindex'}; 156 } else { 157 print STDERR "defaultindex not defined"; 158 } 159 $defaultindex = $indexmap->{$defaultindex}; 165 166 160 167 $writer->emptyTag('defaultIndex', 'name'=>$defaultindex); 161 168 $writer->startTag('indexList'); -
trunk/gsdl3/bin/script/gs2_mkcol.pl
r3688 r3771 58 58 print STDOUT " different from the creator)\n"; 59 59 print STDOUT " -public true|false If this collection has anonymous access\n"; 60 print STDOUT " -buildtype mg|mgpp Whether to use mg or mgpp to build the collection\n"; 61 print STDOUT " Default is mgpp.\n"; 60 62 print STDOUT " -title text The title for the collection\n"; 61 63 print STDOUT " -about text The about text for the collection\n"; … … 119 121 $line =~ s/\*\*about\*\*/$about/g; 120 122 $line =~ s/\*\*plugins\*\*/$pluginstring/g; 123 $line =~ s/\*\*buildtype\*\*/$buildtype/g; 124 $line =~ s/\*\*indexes\*\*/$indexes/g; 125 $line =~ s/\*\*defaultindex\*\*/$defaultindex/g; 126 $line =~ s/\*\*indexmeta\*\*/$indexmeta/g; 121 127 122 128 print OUTFILE $line; … … 139 145 'maintainer/\w+\@[\w\.]+/', \$maintainer, 140 146 'public/true|false/true', \$public, 147 'buildtype/mg|mgpp/mgpp', \$buildtype, 141 148 'title/.+/', \$title, 142 149 'about/.+/', \$about, … … 219 226 220 227 $public = "true" unless defined $public; 221 228 $buildtype = "mgpp" unless defined $buildtype; 229 230 222 231 if (!defined($title) || $title eq "") { 223 232 $title = $collection; … … 247 256 $cdir = &util::filename_cat ($collectdir, $collection); 248 257 } else { 249 $cdir = &util::filename_cat ($ ENV{'GSDLHOME'}, "collect", $collection);258 $cdir = &util::filename_cat ($sitehome, "collect", $collection); 250 259 } 251 260 … … 259 268 } 260 269 270 # set up the default indexes - this could be a command line option at some stage 271 if ($buildtype eq "mg") { 272 $indexes = "document:text document:Title document:Source"; 273 $defaultindex = "document:text"; 274 $indexmeta = "collectionmeta .document:text \"text\"\ncollectionmeta .document:Title \"titles\"\ncollectionmeta .document:Source \"filenames\"\n"; 275 276 } elsif ($buildtype eq "mgpp") { 277 $indexes = "text,metadata"; 278 $defaultindex = "text,metadata"; 279 $indexmeta = "collectionmeta .text,metadata \"text\"\n"; 280 } else { 281 print STDOUT "Error: buildtype should be mg or mgpp, but its $buildtype\n"; 282 } 261 283 # start creating the collection 262 284 print STDOUT "\nCreating the collection $collection...\n" unless $quiet; -
trunk/gsdl3/sites/localsite/collect/gs2model/etc/collect.cfg
r3691 r3771 3 3 public **public** 4 4 5 buildtype mgpp6 indexes text,metadata7 defaultindex text,metadata5 buildtype **buildtype** 6 indexes **indexes** 7 defaultindex **defaultindex** 8 8 9 9 **plugins** … … 15 15 collectionmeta iconcollection "" 16 16 collectionmeta collectionextra "**about**" 17 collectionmeta .text,metadata "documents" 17 18 **indexmeta**
Note:
See TracChangeset
for help on using the changeset viewer.