org.apache.chemistry.opencmis.client.parser
Class AbstractMetadataParser

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.parser.AbstractMetadataParser
All Implemented Interfaces:
MetadataParser
Direct Known Subclasses:
MetadataParserExif, MetadataParserTika

public abstract class AbstractMetadataParser
extends Object
implements MetadataParser


Field Summary
protected  Map<String,Object> cmisProperties
           
protected  PropertyMapper mapper
           
 
Constructor Summary
protected AbstractMetadataParser()
           
 
Method Summary
 Map<String,Object> getCmisProperties()
          Return all found metadata, called after parsing is completed.
 String[] getContentTypes()
          get all content types handled by this parser
 String getMappedTypeId()
          get the CMIS type id used by this type
 PropertyMapper getMapper()
          get the associated property mapper for this CMIS type
 void initialize(PropertyMapper mapper, String contentType)
          Initialize a parser with a given property mapper and a content type
 void reset()
          get ready for parsing a new file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.chemistry.opencmis.client.parser.MetadataParser
extractMetadata
 

Field Detail

cmisProperties

protected Map<String,Object> cmisProperties

mapper

protected PropertyMapper mapper
Constructor Detail

AbstractMetadataParser

protected AbstractMetadataParser()
Method Detail

initialize

public void initialize(PropertyMapper mapper,
                       String contentType)
Description copied from interface: MetadataParser
Initialize a parser with a given property mapper and a content type

Specified by:
initialize in interface MetadataParser
Parameters:
mapper - PropertyMapper used to map tags to properties and convert values
contentType - content type of file to extract

getCmisProperties

public Map<String,Object> getCmisProperties()
Description copied from interface: MetadataParser
Return all found metadata, called after parsing is completed.

Specified by:
getCmisProperties in interface MetadataParser
Returns:
extracted CMIS properties

reset

public void reset()
Description copied from interface: MetadataParser
get ready for parsing a new file

Specified by:
reset in interface MetadataParser

getContentTypes

public String[] getContentTypes()
Description copied from interface: MetadataParser
get all content types handled by this parser

Specified by:
getContentTypes in interface MetadataParser
Returns:
array with content types

getMappedTypeId

public String getMappedTypeId()
Description copied from interface: MetadataParser
get the CMIS type id used by this type

Specified by:
getMappedTypeId in interface MetadataParser
Returns:
CMIS type id

getMapper

public PropertyMapper getMapper()
Description copied from interface: MetadataParser
get the associated property mapper for this CMIS type

Specified by:
getMapper in interface MetadataParser
Returns:
property mapper


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.