|Version 4 (modified by simonp, 3 years ago)|
Mime Type Calculation and Indexing
|Last edited|| |
|Assigned to release||2.5.0|
GeoNetwork uses all kinds of code in a few different places to calculate mime types for files that are uploaded with metadata records as online resources (usually based on filenames). However the mime type is never indexed with the metadata record that points to the resource and the mime type calculation is usually done based on the filename so may not reflect the true content of the file or return the correct registered mime type for alternatives filenames. This means that searches cannot be done on the content of online resources.
- Sandbox: BlueNetMEST
- App: GeoNetwork
- Module: Lucene Index, Metadata Schemas
- Documents: mime-util
- Vote proposed.
The motivation for this proposal is to get the mime type into the Lucene index for use by other programs that may want to do searches via CSW to determine whether GeoNetwork has metadata records with attached online resources that could be of interest. The particular use case this was developed for is a data visualization program which wanted to search the GeoNetwork catalog for files of interest.
This proposal implements:
- Mime type calculation for online resources using mime-util immediately after a metadata record is saved/imported in update-fixed-info.xsl.
- Indexing of the mime type in Lucene by index-fields.xsl
- Inclusion of the mime type Lucene field as an AdditionalQueryable? in the CSW config.
At this stage the proposal does not:
- include adding a search field in the advanced search interface
- replace mime type calculations done elsewhere (specifically in Jeeves src/jeeves/util/BinaryFile.java and in metadata-iso19139.xsl) in GeoNetwork with mime-util code or the results of mime-util
These can be done at a later date.
At present the only reasonable place for storing the mime type in the onlineresource field is as a uuid attribute of the gmd:linkage element. If an element/attribute is not used then the mime type will have to be calculated at the time of indexing - this may slow down indexing of many records with attached online resources.
- CSIRO: Gary Carroll and Uwe Rosebrock