org.apache.chemistry.opencmis.client.mapper
Class PropertyMapperExif
java.lang.Object
org.apache.chemistry.opencmis.client.mapper.AbstractPropertyMapper
org.apache.chemistry.opencmis.client.mapper.PropertyMapperExif
- All Implemented Interfaces:
- PropertyMapper
public class PropertyMapperExif
- extends AbstractPropertyMapper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
propMap
protected Map<String,Object> propMap
PropertyMapperExif
public PropertyMapperExif()
initialize
public boolean initialize(String cfgPrefix,
String typeKey,
Properties properties)
- Description copied from interface:
PropertyMapper
- initialize a property mapper
- Specified by:
initialize
in interface PropertyMapper
- Overrides:
initialize
in class AbstractPropertyMapper
- Parameters:
cfgPrefix
- prefix for all configuration entries in properties filetypeKey
- type key in configuration used to identify this typeproperties
- all properties read from resource mapping.properties
- Returns:
- true, if processing should continue, false if not
reset
public void reset()
- Description copied from interface:
PropertyMapper
- Reset all internal data to get ready for a new parsing process
getMappedProperties
public Map<String,Object> getMappedProperties()
getMappedTypeId
public String getMappedTypeId(String mimeType)
getMappedPropertyId
public String getMappedPropertyId(String key)
- Description copied from interface:
PropertyMapper
- return the CMIS property id for a found tag in a file
- Parameters:
key
- tag (usually parsed from Tika) found in file
- Returns:
- CMIS property this tag gets mapped to, null if not mapped
convertValue
public Object convertValue(String id,
PropertyDefinition<?> propDef,
String strValue)
- Description copied from interface:
PropertyMapper
- Convert a value parsed from the file to the type the corresponding property expects
- Parameters:
id
- CMIS property idstrValue
- value read from file (Tika always gives a string)
- Returns:
- converted value conforming to the mapped property
mapTagAndConvert
public 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
- Parameters:
dir
- directory of tagtag
- tag
convertValue
public Object convertValue(com.drew.metadata.Directory dir,
com.drew.metadata.Tag tag,
PropertyType propType)
Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.