Changes between Version 1 and Version 2 of ApertureDataObjectFile
- Timestamp:
- 10/20/05 14:58:28 (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ApertureDataObjectFile
v1 v2 1 Mimetypes: Chirs suggest to leave it partially in. my idea is that the crawler only returns what the data source returns. if a specific data source returns mimetypes (e.g. some webservers), return that, but else make no effort to determine it. after all it depends on the use case whether you need it at all and what the best way is to fill in missing values. our experience btw is that you should never trust the mime type returned by a webserver ;) in our apps we will always use a magic number-based mechanism 2 3 Leo: to be used, we can do it as convenient as possible. Meaning, the DataObjectFile has a getMimetype() method which promises to use all tricks that exist. If you don't call getMimetype(), no processing power spilt. If you call it, it guarantees to have done all tricks already (which is very convenient and a useful feaute of the Aperture framework). 4 5 1 6 {{{ 2 7 #!java … … 41 46 /** 42 47 * what is the mime-type of the content, if there is content? 43 * This is set by the DataAccessor 44 * @return null or a mimetype identifier like "text/plain" 48 * This is set by the DataAccessor. This method may cause complicated mimetype detection, 49 * like looking at the http mime-type, file extensions, magic bytes inside the file-stream. 50 * @return a mimetype identifier like "text/plain" or null if the 51 * identifier cannot be determined, even using all tricks available. 45 52 */ 46 53 public String getContentMimeType();