lumis.portal.file.metadata
Class MetadataExtractorFactory

Package class diagram package MetadataExtractorFactory
java.lang.Object
  extended by lumis.portal.file.metadata.MetadataExtractorFactory

public class MetadataExtractorFactory
extends Object

Factory for meta data extractors.

Since:
6.1.0

Constructor Summary
MetadataExtractorFactory()
           
 
Method Summary
protected static IMetadataExtractor getDefaultExtractor(String contentType)
          Returns the default IMetadataExtractor instance, based on the content type.
static IMetadataExtractor getExtractor(String contentType, String serviceInstanceId)
          Returns an extractor based on service instance and content type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataExtractorFactory

public MetadataExtractorFactory()
Method Detail

getExtractor

public static IMetadataExtractor getExtractor(String contentType,
                                              String serviceInstanceId)
                                       throws PortalException,
                                              IllegalArgumentException
Returns an extractor based on service instance and content type. To discover the correct IMetadataExtractor implementation class for the given parameter, a search in custom properties is done.
If no custom property was defined, the default Extractor is called by #getDefaultMetadataExtractor(String).

Parameters:
contentType - the content type of the file.
serviceInstanceId - the service instance of the file.
Returns:
the IMetadataExtractor instance
Throws:
PortalException - if the specified class is not found;
or if this Class represents an abstract class, an interface, an array class, a primitive type, or void;
or if the class has no nullary constructor;
or if the instantiation fails for some other reason.
IllegalArgumentException - if any parameter is null.
Since:
6.1.0

getDefaultExtractor

protected static IMetadataExtractor getDefaultExtractor(String contentType)
                                                 throws PortalException
Returns the default IMetadataExtractor instance, based on the content type.

Parameters:
contentType - the content type.
Returns:
the default IMetadataExtractor instance, based on the content type.
Throws:
PortalException
Since:
6.1.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.