mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +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
|
//".vsd", // Not auto-detected properly yet
|
||||||
//"2010.dwg", // Not auto-detected properly yet
|
//"2010.dwg", // Not auto-detected properly yet
|
||||||
".pdf",
|
".pdf",
|
||||||
".odt"
|
".odt",
|
||||||
|
".ogg"
|
||||||
};
|
};
|
||||||
|
|
||||||
for (String fileBase : testFiles)
|
for (String fileBase : testFiles)
|
||||||
@@ -158,6 +159,15 @@ public class TikaAutoMetadataExtracterTest extends AbstractMetadataExtracterTest
|
|||||||
@Override
|
@Override
|
||||||
protected boolean skipAuthorCheck(String mimetype) { return true; }
|
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
|
* We also provide the creation date - check that
|
||||||
*/
|
*/
|
||||||
@@ -166,7 +176,8 @@ public class TikaAutoMetadataExtracterTest extends AbstractMetadataExtracterTest
|
|||||||
|
|
||||||
// Check for extra fields
|
// Check for extra fields
|
||||||
// Author isn't there for the OpenDocument ones
|
// Author isn't there for the OpenDocument ones
|
||||||
if(mimetype.indexOf(".oasis.") == -1) {
|
if(mimetype.indexOf(".oasis.") == -1 && !mimetype.endsWith("/ogg"))
|
||||||
|
{
|
||||||
assertEquals(
|
assertEquals(
|
||||||
"Property " + ContentModel.PROP_AUTHOR + " not found for mimetype " + mimetype,
|
"Property " + ContentModel.PROP_AUTHOR + " not found for mimetype " + mimetype,
|
||||||
"Nevin Nollop",
|
"Nevin Nollop",
|
||||||
@@ -184,6 +195,16 @@ public class TikaAutoMetadataExtracterTest extends AbstractMetadataExtracterTest
|
|||||||
// "Test Property " + TIKA_MIMETYPE_TEST_PROPERTY + " incorrect for mimetype " + mimetype,
|
// "Test Property " + TIKA_MIMETYPE_TEST_PROPERTY + " incorrect for mimetype " + mimetype,
|
||||||
// mimetype,
|
// mimetype,
|
||||||
// DefaultTypeConverter.INSTANCE.convert(String.class, properties.get(TIKA_MIMETYPE_TEST_PROPERTY)));
|
// 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)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
BIN
source/test-resources/quick/quick.ogg
Normal file
BIN
source/test-resources/quick/quick.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user