Add metadata extractor support for .dwg files (ALF-2262)

The code for extracting .dwg files has been contributed to Apache tika, and the Alfresco metadata extractor deep calls into Tika to have the work done. We retain our own tests of this however.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19927 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-04-21 10:17:11 +00:00
parent 2861feadb6
commit 45c757fee8
11 changed files with 245 additions and 2 deletions

View File

@@ -122,8 +122,6 @@ public abstract class AbstractMetadataExtracterTest extends TestCase
protected Map<QName, Serializable> extractFromMimetype(String mimetype) throws Exception
{
Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
// get the extension for the mimetype
String ext = mimetypeMap.getExtension(mimetype);
@@ -133,7 +131,12 @@ public abstract class AbstractMetadataExtracterTest extends TestCase
{
throw new FileNotFoundException("No quick." + ext + " file found for test");
}
return extractFromFile(sourceFile, mimetype);
}
protected Map<QName, Serializable> extractFromFile(File sourceFile, String mimetype) throws Exception
{
Map<QName, Serializable> properties = new HashMap<QName, Serializable>();
// construct a reader onto the source file
ContentReader sourceReader = new FileContentReader(sourceFile);
sourceReader.setMimetype(mimetype);