org.alfresco.repo.content.metadata
Class TikaAutoMetadataExtracterTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.alfresco.repo.content.metadata.AbstractMetadataExtracterTest
              extended by org.alfresco.repo.content.metadata.TikaAutoMetadataExtracterTest
All Implemented Interfaces:
junit.framework.Test

public class TikaAutoMetadataExtracterTest
extends AbstractMetadataExtracterTest

See Also:
TikaAutoMetadataExtracter

Field Summary
 
Fields inherited from class org.alfresco.repo.content.metadata.AbstractMetadataExtracterTest
ctx, dictionaryService, mimetypeMap, QUICK_CREATOR, QUICK_CREATOR_EMAIL, QUICK_DESCRIPTION, QUICK_PREVIOUS_AUTHOR, QUICK_TITLE
 
Constructor Summary
TikaAutoMetadataExtracterTest()
           
 
Method Summary
protected  MetadataExtracter getExtracter()
           
 void setUp()
          Ensures that the temp locations are cleaned out before the tests start
protected  boolean skipAuthorCheck(java.lang.String mimetype)
          This method can be overridden to cause the author/creator property check to be skipped.
protected  boolean skipDescriptionCheck(java.lang.String mimetype)
          This method can be overridden to cause the description property check to be skipped.
protected  void testFileSpecificMetadata(java.lang.String mimetype, java.util.Map properties)
          We also provide the creation date - check that
 void testImageVideo()
          We don't have explicit extractors for most image and video formats.
 void testSupportedMimetypes()
          Test several different files Note - doesn't use extractFromMimetype
 void testSupports()
           
 
Methods inherited from class org.alfresco.repo.content.metadata.AbstractMetadataExtracterTest
assertContains, assertContains, extractFromFile, extractFromMimetype, testCommonMetadata, testExtractFromMimetype, testSetUp, testZeroLengthFile
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TikaAutoMetadataExtracterTest

public TikaAutoMetadataExtracterTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Description copied from class: AbstractMetadataExtracterTest
Ensures that the temp locations are cleaned out before the tests start

Overrides:
setUp in class AbstractMetadataExtracterTest
Throws:
java.lang.Exception

getExtracter

protected MetadataExtracter getExtracter()
Specified by:
getExtracter in class AbstractMetadataExtracterTest
Returns:
Returns the same transformer regardless - it is allowed

testSupports

public void testSupports()
                  throws java.lang.Exception
Throws:
java.lang.Exception

testSupportedMimetypes

public void testSupportedMimetypes()
                            throws java.lang.Exception
Test several different files Note - doesn't use extractFromMimetype

Throws:
java.lang.Exception

skipAuthorCheck

protected boolean skipAuthorCheck(java.lang.String mimetype)
Description copied from class: AbstractMetadataExtracterTest
This method can be overridden to cause the author/creator property check to be skipped. The default behaviour is for the check not to be skipped for all MIME types.

Overrides:
skipAuthorCheck in class AbstractMetadataExtracterTest
Returns:
true to skip the checks, else false

skipDescriptionCheck

protected boolean skipDescriptionCheck(java.lang.String mimetype)
Description copied from class: AbstractMetadataExtracterTest
This method can be overridden to cause the description property check to be skipped. The default behaviour is for the check not to be skipped for all MIME types.

Overrides:
skipDescriptionCheck in class AbstractMetadataExtracterTest
Returns:
true to skip the checks, else false

testFileSpecificMetadata

protected void testFileSpecificMetadata(java.lang.String mimetype,
                                        java.util.Map properties)
We also provide the creation date - check that

Specified by:
testFileSpecificMetadata in class AbstractMetadataExtracterTest

testImageVideo

public void testImageVideo()
                    throws java.lang.Throwable
We don't have explicit extractors for most image and video formats. Instead, these will be handled by the Auto Tika Parser, and this test ensures that they are

Throws:
java.lang.Throwable


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.