|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PropertyMapper
A property mapper is a class being responsible to map a Content-Type (e.g. image/jpeg) to a CMIS type id and to map and convert properties. Extracted tags are mapped to CMIS property ids and sometimes type conversion is required (e.g. a string to a date). Classes implementing this interface are not responsible for extracting the metadata (see MetadataParser). It only reads a configuration and maps properties. The Configurator will read the configuration properties and instantiate implementations of this interface (one instance per CMIS type)
| Method Summary | |
|---|---|
java.lang.Object |
convertValue(java.lang.String id,
PropertyDefinition<?> propDef,
java.lang.String strValue)
Convert a value parsed from the file to the type the corresponding property expects |
java.lang.String[] |
getContentTypes()
get all content types handled by this parser |
java.lang.String |
getMappedPropertyId(java.lang.String key)
return the CMIS property id for a found tag in a file |
java.lang.String |
getMappedTypeId()
return the CMIS type id used for this mapper |
boolean |
initialize(java.lang.String cfgPrefix,
java.lang.String typeKey,
java.util.Properties properties)
initialize a property mapper |
void |
reset()
Reset all internal data to get ready for a new parsing process |
| Method Detail |
|---|
boolean initialize(java.lang.String cfgPrefix,
java.lang.String typeKey,
java.util.Properties properties)
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
void reset()
java.lang.String getMappedTypeId()
java.lang.String getMappedPropertyId(java.lang.String key)
key - tag (usually parsed from Tika) found in file
java.lang.Object convertValue(java.lang.String id,
PropertyDefinition<?> propDef,
java.lang.String strValue)
id - CMIS property idpropertyType - property type from type definitionstrValue - value read from file (Tika always gives a string)
java.lang.String[] getContentTypes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||