org.alfresco.repo.content.metadata
Class MP3MetadataExtracter
java.lang.Object
org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
org.alfresco.repo.content.metadata.MP3MetadataExtracter
- All Implemented Interfaces:
- ContentWorker, MetadataExtracter
public class MP3MetadataExtracter
- extends AbstractMappingMetadataExtracter
Extracts the following values from MP3 files:
songTitle: -- {music}songTitle, cm:title
albumTitle: -- {music}albumTitle
artist: -- {music}artist, cm:author
description: -- cm:description
comment: -- {music}comment
yearReleased: -- {music}yearReleased
trackNumber: -- {music}trackNumber
genre: -- {music}genre
composer: -- {music}composer
lyrics: -- {music}lyrics
TIKA Note - title and author go in metadata, but much of the
rest is only in the text. Some of the ID3v2 parts
(composer, lyrics) are not yet implemented.
Method Summary |
java.util.Map |
extractRaw(ContentReader reader)
Override to provide the raw extracted metadata values. |
Methods inherited from class org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter |
checkIsSupported, extract, extract, extract, getDefaultMapping, getExtractionTime, getMapping, getMimetypeService, getReliability, init, isSupported, newRawMap, putRawValue, readMappingProperties, readMappingProperties, register, setDictionaryService, setFailOnTypeConversion, setInheritDefaultMapping, setMapping, setMappingProperties, setMimetypeService, setOverwritePolicy, setOverwritePolicy, setRegistry, setSupportedDateFormats, setSupportedMimetypes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SUPPORTED_MIMETYPES
public static java.lang.String[] SUPPORTED_MIMETYPES
MP3MetadataExtracter
public MP3MetadataExtracter()
extractRaw
public java.util.Map extractRaw(ContentReader reader)
throws java.lang.Throwable
- Description copied from class:
AbstractMappingMetadataExtracter
- Override to provide the raw extracted metadata values. An extracter should extract
as many of the available properties as is realistically possible. Even if the
default mapping
doesn't handle all properties, it is
possible for each instance of the extracter to be configured differently and more or
less of the properties may be used in different installations.
Raw values must not be trimmed or removed for any reason. Null values and empty
strings are
- Null: Removed
- Empty String: Passed to the
OverwritePolicy
- Non Serializable: Converted to String or fails if that is not possible
Properties extracted and their meanings and types should be thoroughly described in
the class-level javadocs of the extracter implementation, for example:
editor: - the document editor --> cm:author
title: - the document title --> cm:title
user1: - the document summary
user2: - the document description --> cm:description
user3: -
user4: -
- Specified by:
extractRaw
in class AbstractMappingMetadataExtracter
- Parameters:
reader
- the document to extract the values from. This stream provided by
the reader must be closed if accessed directly.
- Returns:
- Returns a map of document property values keyed by property name.
- Throws:
java.lang.Throwable
- See Also:
AbstractMappingMetadataExtracter.getDefaultMapping()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.