mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Update metadata extractors - Outlook, MP3, Mail and PDF improvements, and increase test coverage
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18454 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
package org.alfresco.repo.content.metadata;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
|
||||
/**
|
||||
* @see OpenDocumentMetadataExtracter
|
||||
@@ -46,4 +53,25 @@ public class OpenDocumentMetadataExtracterTest extends AbstractMetadataExtracter
|
||||
testExtractFromMimetype(mimetype);
|
||||
}
|
||||
}
|
||||
protected boolean skipAuthorCheck() { return true; }
|
||||
|
||||
/**
|
||||
* We also provide the creation date - check that
|
||||
*/
|
||||
protected void testFileSpecificMetadata(String mimetype,
|
||||
Map<QName, Serializable> properties) {
|
||||
// Check for two cases
|
||||
if(mimetype.equals("application/vnd.oasis.opendocument.text")) {
|
||||
assertEquals(
|
||||
"Property " + ContentModel.PROP_CREATED + " not found for mimetype " + mimetype,
|
||||
"2005-09-06T23:34:00.000+01:00",
|
||||
DefaultTypeConverter.INSTANCE.convert(String.class, properties.get(ContentModel.PROP_CREATED)));
|
||||
} else if(mimetype.equals("application/vnd.oasis.opendocument.graphics")) {
|
||||
assertEquals(
|
||||
"Property " + ContentModel.PROP_CREATED + " not found for mimetype " + mimetype,
|
||||
"2006-01-27T11:46:11.000Z",
|
||||
DefaultTypeConverter.INSTANCE.convert(String.class, properties.get(ContentModel.PROP_CREATED)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user