Changeset 2328


Ignore:
Timestamp:
2001-04-20T11:48:20+12:00 (23 years ago)
Author:
sjboddie
Message:

Added a -OIDtype option to import.pl to allow an alternative (and much
faster) OID creation technique to be used (i.e. a simple incremented
count). Hashing the contents of the document is still the default
behaviour. -- Note that this option is not yet implemented in buildcol.pl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/import.pl

    r2287 r2328  
    6565    print STDERR "   -maxdocs number        Maximum number of documents to import\n";
    6666    print STDERR "   -groupsize number      Number of GML documents to group into one file\n";
     67    print STDERR "   -OIDtype hash|incremental The method to use when generating unique\n";
     68    print STDERR "                          identifiers for each document. \"hash\" (the\n";
     69    print STDERR "                          default) hashes the contents of the file and so\n";
     70    print STDERR "                          will be the same every time the collection is\n";
     71    print STDERR "                          imported. \"incremental\" is a simple document\n";
     72    print STDERR "                          count and so will be significantly faster than\n";
     73    print STDERR "                          \"hash\". It is not guaranteed to always assign\n";
     74    print STDERR "                          the same identifier to a given document though\n";
     75    print STDERR "                          and does not allow further documents to be added\n";
     76    print STDERR "                          to existing gml archives\n";
    6777    print STDERR "   -sortmeta metadata     Sort documents alphabetically by metadata for\n";
    6878    print STDERR "                          building. This will be disabled if groupsize > 1\n";
     
    7888sub main {
    7989    my ($verbosity, $importdir, $archivedir, $keepold,
    80     $removeold, $gzip, $groupsize, $debug, $maxdocs, $collection,
    81     $configfilename, $collectcfg, $pluginfo, $sortmeta,
    82     $archive_info_filename, $archive_info, $processor,
    83     $out, $collectdir);
     90    $removeold, $gzip, $groupsize, $OIDtype, $debug,
     91    $maxdocs, $collection, $configfilename, $collectcfg,
     92    $pluginfo, $sortmeta, $archive_info_filename,
     93    $archive_info, $processor, $out, $collectdir);
    8494    if (!parsargv::parse(\@ARGV,
    8595             'verbosity/\d+/2', \$verbosity,
     
    90100             'gzip', \$gzip,
    91101             'groupsize/\d+/1', \$groupsize,
     102             'OIDtype/^(hash|incremental)$/hash', \$OIDtype,
    92103             'sortmeta/.*/', \$sortmeta,
    93104             'debug', \$debug,
     
    191202    $processor->setarchivedir ($archivedir);
    192203    $processor->set_sortmeta ($sortmeta) if defined $sortmeta;
     204    $processor->set_OIDtype ($OIDtype);
    193205    } else {
    194206    $processor = new docprint ();
Note: See TracChangeset for help on using the changeset viewer.