org.apache.chemistry.opencmis.client.mapper
Class PropertyMapperTika
java.lang.Object
org.apache.chemistry.opencmis.client.mapper.AbstractPropertyMapper
org.apache.chemistry.opencmis.client.mapper.PropertyMapperTika
- All Implemented Interfaces:
- PropertyMapper
public class PropertyMapperTika
- extends AbstractPropertyMapper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyMapperTika
public PropertyMapperTika()
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
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 key,
PropertyDefinition<?> propDef,
String strValue)
- Description copied from interface:
PropertyMapper
- Convert a value parsed from the file to the type the corresponding property expects
- Parameters:
key
- CMIS property idstrValue
- value read from file (Tika always gives a string)
- Returns:
- converted value conforming to the mapped property
Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.