Ticket #807 (new defect)

Opened 6 years ago

Last modified 6 years ago

extrameta data structures in its own pm file

Reported by: ak19 Owned by: nobody
Priority: moderate Milestone: 2.87 Release
Component: Collection Building Severity: major
Keywords: Cc:


1. BUGFIX: http://trac.greenstone.org/changeset/24932

Diego noticed how the metadata in a toplevel metadata.xml, which specifies metadata for files in import's subfolders, does not get attached to the files on Windows, while this works on Linux. It had to do with the difference between the file slashes used on the OS versus the URL-type fileslashes used in the metadata.xml Diego had constructed. This has now been fixed and Dr Bainbridge came up with a tidier solution of a new method in util.pm that would handle the details.



2. All perlcode that accesses extrametakeys, extrametadata, extrametafile data structures has been moved into a new perl module called extrametautil.pm. The next step will be to ensure that the file_regexes used to index into these data structures are consistent (using consistent slashes, like URL style slashes).


and http://trac.greenstone.org/changeset/24952


plugins/DSpacePlugin.pm (3 diffs)

plugins/DirectoryPlugin.pm (5 diffs)

plugins/EmbeddedMetadataPlugin.pm (3 diffs)

plugins/LOMPlugin.pm (2 diffs)

plugins/MetadataCSVPlugin.pm (2 diffs)

plugins/MetadataXMLPlugin.pm (3 diffs)

plugins/OAIMetadataXMLPlugin.pm (4 diffs)

plugins/OAIPlugin.pm (2 diffs)


bin/script/explode_metadata_database.pl (2 diffs)

Change History

Changed 6 years ago by ak19

  • summary changed from extrameta data structures accessed to extrameta data structures in its own pm file

The idea is that the extrameta data structures (extrametakeys, extrametadata, extrametafile) which are indexed using a filename as regex, will make sure that file-system dependent clashes are taken care of. This still needs to be done and will be part of the next commits, and will probably use URL style slashes.

Changed 6 years ago by ak19

Commit revision: 24971. 3 (related) changes commit at once.

1. Introduced the util::filepath_to_url_format subroutine which will be used to convert filenames to URL style filenames to match the slashes used in the filename regex-es in extrameta keys used to index into extrameta data structures.

2. Fixed bug on windows where metadata.xml specifies filenames as regex with backslash in front of the file extension's period mark: DirectoryPlugin? needed to unregex the filepath before calling fileparse on it, else the escaping backslash would interfere with perl's fileparse routine (only on windows, since backslash also represents a dirsep here).

3. Updated all those perl plugins where the new util::filepath_to_url_format needs to be called so that they use URL style filenames (thereafter regexed) to index into the extrameta data structures.

Changes to 8 files:

- perllib\util.pm

- perllib\plugins: DSpacePlugin.pm, DirectoryPlugin?.pm, EmbeddedMetadataPlugin?.pm, LOMPlugin.pm, MetadataCSVPlugin.pm, MetadataXMLPlugin.pm, OAIPlugin.pm

Changed 6 years ago by ak19

The changeset for the above commit:


Note: See TracTickets for help on using tickets.