public class PropertyMapperExif extends AbstractPropertyMapper
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
propMap |
cmisTypeId, contentTypes, dateFormat, propPrefix
Constructor and Description |
---|
PropertyMapperExif() |
Modifier and Type | Method and Description |
---|---|
Object |
convertValue(com.drew.metadata.Directory dir,
com.drew.metadata.Tag tag,
PropertyType propType) |
Object |
convertValue(String id,
PropertyDefinition<?> propDef,
String strValue)
Convert a value parsed from the file to the type the corresponding property expects
|
Map<String,Object> |
getMappedProperties() |
String |
getMappedPropertyId(String key)
return the CMIS property id for a found tag in a file
|
String |
getMappedTypeId(String mimeType) |
boolean |
initialize(String cfgPrefix,
String typeKey,
Properties properties)
initialize a property mapper
|
void |
mapTagAndConvert(com.drew.metadata.Directory dir,
com.drew.metadata.Tag tag,
TypeDefinition td)
store the property id mapped to this tag in a JPEG file in a local map
|
void |
reset()
Reset all internal data to get ready for a new parsing process
|
getContentTypes, getMappedTypeId
public boolean initialize(String cfgPrefix, String typeKey, Properties properties)
PropertyMapper
initialize
in interface PropertyMapper
initialize
in class AbstractPropertyMapper
cfgPrefix
- prefix for all configuration entries in properties filetypeKey
- type key in configuration used to identify this typeproperties
- all properties read from resource mapping.propertiespublic void reset()
PropertyMapper
public String getMappedPropertyId(String key)
PropertyMapper
key
- tag (usually parsed from Tika) found in filepublic Object convertValue(String id, PropertyDefinition<?> propDef, String strValue)
PropertyMapper
id
- CMIS property idstrValue
- value read from file (Tika always gives a string)public void mapTagAndConvert(com.drew.metadata.Directory dir, com.drew.metadata.Tag tag, TypeDefinition td)
dir
- directory of tagtag
- tagpublic Object convertValue(com.drew.metadata.Directory dir, com.drew.metadata.Tag tag, PropertyType propType)
Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.