Changes between Version 12 and Version 13 of MimeTypeCalculationIndexing
- Timestamp:
- 04/16/10 03:32:02 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MimeTypeCalculationIndexing
v12 v13 33 33 This proposal implements: 34 34 35 * Mime type calculation for online resources using [http://mime-util.sourceforge.net mime-util] immediately after a metadata record is saved/imported in update-fixed-info.xsl. 36 * Indexing of the mime type in Lucene by index-fields.xsl 35 * Mime type calculation for online resources (gmd:protocol fields that start with WWW:DOWNLOAD or WWW:LINK - others can be added if required by individual sites) using [http://mime-util.sourceforge.net mime-util] immediately after a metadata record is saved/imported in update-fixed-info.xsl. 36 * Calculated mime type is stored in metadata record as gmx:MimeFileType child of gmd:name (replaces gco:CharacterString) and will look like the following example: 37 {{ 38 <gmd:onLine> 39 <gmd:CI_OnlineResource> 40 <gmd:linkage> 41 <gmd:URL>http://localhost:8080/geonetwork/srv/en/file.disclaimer?id=10&fname=basins.zip&access=private</gmd:URL> 42 </gmd:linkage> 43 <gmd:protocol> 44 <gco:CharacterString>WWW:DOWNLOAD-1.0-http--download</gco:CharacterString> 45 </gmd:protocol> 46 <gmd:name xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:srv="http://www.isotc211.org/2005/srv"> 47 <gmx:MimeFileType type="application/x-zip">basins.zip</gmx:MimeFileType> 48 </gmd:name> 49 <gmd:description> 50 <gco:CharacterString>Hydrological basins in Africa (Shapefile Format)</gco:CharacterString> 51 </gmd:description> 52 </gmd:CI_OnlineResource> 53 </gmd:onLine> 54 }} 55 * Indexing of the mime type (from the type attribute of gmx:MimeFileType) in Lucene by index-fields.xsl 37 56 * Inclusion of the mime type Lucene field as an !AdditionalQueryable in the CSW config. 38 57 … … 42 61 43 62 * include adding a search field in the advanced search interface 44 * 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-util63 * replace mime type calculations done elsewhere (specifically in Jeeves src/jeeves/util/BinaryFile.java) in !GeoNetwork with mime-util code 45 64 46 65 These can be done at a later date. 47 66 48 Note that the patch file attached to this proposal includes some enhancements to the Lucene Index Reader provider code in !SearchManager.java and the [wiki:TemporalExtentSearch temporal extent search proposal].67 Note that the patch file attached to this proposal includes some enhancements to the Lucene Index Reader provider code in !SearchManager.java, a nicer file download dialog (the trunk is using file.download service but those that don't want that can switch back to resources.get by editing update-fixed-info.xsl for their schema) and the [wiki:TemporalExtentSearch temporal extent search proposal]. 49 68 50 69 == Risks == 51 70 52 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.71 The update-fixed-info.xsl calls Java objects in src/org/fao/geonet/util/MimeTypeFinder.java to do the mime-util based calculation. This may slow down indexing of records with attached online resources - haven't noticed much of a slow down in the 3 months or so this has been in the BlueNetMEST branch. 53 72 54 73 == Participants ==