Ignore:
Timestamp:
2024-02-13T17:15:40+13:00 (4 months ago)
Author:
davidb
Message:

New mapping_metadata_file rule-table functionalilty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/strings.properties

    r38736 r38742  
    809809BaseImporter.no_cover_image:Do not look for a prefix.jpg file (where prefix is the same prefix as the file being processed) to associate as a cover image.
    810810
     811BaseImporter.metadata_mapping_file:Use the specified metadata mapping file to generate additional metadata for a document.  The specified comma-separated value file (csv) needs to be encoded as UTF8, and consists of a series of rules, with 5 entries per line.  The first entry in the line specifyies a source metadata value to select from the doucment being process, and the second entry is a regular expression the metadata must match for the rule to be applied (Note: the syntax used is Perl's regular expression substitution, where use of parentheses form capture groups).  If it does match, then the third element is what the matching metadata value is transformed into (groups formed with brackets from the source metadata matching term can be referenced as $1, $2 and so on). The fourth entry specifies any modifiers for the substitution, such as 'g' for global and 'i' for case-insensitive.  The fifth entry specifies the metadata name that is set with the newly created value.  The rules are applied in the order they are provided in the comma-separated value file, so it is permissible for metadata set by one of the earlier rules to then be used in a later matching rule. Destination metadata names that start '_transient' are not stored in the final document.  For an example of a metadata_mapping_file, refer to the one provided in GSDLHOME/etc/metadta_mapping_rules.csv
     812
    811813BaseImporter.OIDtype.auto:Use OIDtype set in import.pl
    812814
Note: See TracChangeset for help on using the changeset viewer.