org.apache.chemistry.opencmis.client.mapper
Class PropertyMapperTika

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.mapper.AbstractPropertyMapper
      extended by org.apache.chemistry.opencmis.client.mapper.PropertyMapperTika
All Implemented Interfaces:
PropertyMapper

public class PropertyMapperTika
extends AbstractPropertyMapper


Field Summary
 
Fields inherited from class org.apache.chemistry.opencmis.client.mapper.AbstractPropertyMapper
cmisTypeId, contentTypes, dateFormat, propPrefix
 
Constructor Summary
PropertyMapperTika()
           
 
Method Summary
 Object convertValue(String key, PropertyDefinition<?> propDef, String strValue)
          Convert a value parsed from the file to the type the corresponding property expects
 String getMappedPropertyId(String key)
          return the CMIS property id for a found tag in a file
 boolean initialize(String cfgPrefix, String typeKey, Properties properties)
          initialize a property mapper
 void reset()
          Reset all internal data to get ready for a new parsing process
 
Methods inherited from class org.apache.chemistry.opencmis.client.mapper.AbstractPropertyMapper
getContentTypes, getMappedTypeId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyMapperTika

public PropertyMapperTika()
Method Detail

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 file
typeKey - type key in configuration used to identify this type
properties - 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 id
strValue - 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.