mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Upate Tika and add Ogg Vorbis support + tests
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30589 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -123,7 +123,8 @@ public class TikaAutoMetadataExtracterTest extends AbstractMetadataExtracterTest
|
||||
//".vsd", // Not auto-detected properly yet
|
||||
//"2010.dwg", // Not auto-detected properly yet
|
||||
".pdf",
|
||||
".odt"
|
||||
".odt",
|
||||
".ogg"
|
||||
};
|
||||
|
||||
for (String fileBase : testFiles)
|
||||
@@ -158,6 +159,15 @@ public class TikaAutoMetadataExtracterTest extends AbstractMetadataExtracterTest
|
||||
@Override
|
||||
protected boolean skipAuthorCheck(String mimetype) { return true; }
|
||||
|
||||
@Override
|
||||
protected boolean skipDescriptionCheck(String mimetype) {
|
||||
if(mimetype.endsWith("/ogg"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* We also provide the creation date - check that
|
||||
*/
|
||||
@@ -166,7 +176,8 @@ public class TikaAutoMetadataExtracterTest extends AbstractMetadataExtracterTest
|
||||
|
||||
// Check for extra fields
|
||||
// Author isn't there for the OpenDocument ones
|
||||
if(mimetype.indexOf(".oasis.") == -1) {
|
||||
if(mimetype.indexOf(".oasis.") == -1 && !mimetype.endsWith("/ogg"))
|
||||
{
|
||||
assertEquals(
|
||||
"Property " + ContentModel.PROP_AUTHOR + " not found for mimetype " + mimetype,
|
||||
"Nevin Nollop",
|
||||
@@ -184,6 +195,16 @@ public class TikaAutoMetadataExtracterTest extends AbstractMetadataExtracterTest
|
||||
// "Test Property " + TIKA_MIMETYPE_TEST_PROPERTY + " incorrect for mimetype " + mimetype,
|
||||
// mimetype,
|
||||
// DefaultTypeConverter.INSTANCE.convert(String.class, properties.get(TIKA_MIMETYPE_TEST_PROPERTY)));
|
||||
|
||||
// Extra media checks for music formats
|
||||
if(mimetype.endsWith("/ogg"))
|
||||
{
|
||||
// Pending ALF-6170 for proper music namespace
|
||||
assertEquals(
|
||||
"Property " + ContentModel.PROP_AUTHOR + " not found for mimetype " + mimetype,
|
||||
"Hauskaz",
|
||||
DefaultTypeConverter.INSTANCE.convert(String.class, properties.get(ContentModel.PROP_AUTHOR)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user