REPO-4639 Content conversion failed using Tika (#108)

* REPO-4639: Split tika engine_config.json into separate transformers.

* WIP: REPO-4639 Content conversion failed using Tika

The Tika T-Engine "transform" option does not exist when called via the Transform Service or Local transforms, which resulted in no transforms taking place. However this value is really not be needed as the T-Engine should be able to read its own engine_config.xml to work out which sub transform to use. Transforms only worked via Legacy transforms, which used a T-Engine.

This code is based on tried and tested ACS repository code. It has been further simplified.

TODO:
- replace the ConfigFileFinder class just added with something that uses Spring to read the JSON. i.e. simplify it.
- replace the CombinedConfig class just added with something that does not need the InLineTransformer. i.e. simplify it.
- create tests based on the repo tests
- remove the source and target mimetype checks in Tika as a check against engine_config.xml is cleaner.
- repeat the process for the Misc T-Engine as it has similar code checking source and target mimetypes.
- remove the transform option passed by the legacy transforms.

* Removed CombindConfig and ConfigFileFnder classes.

* Extracted AbstractTransformRegistry so that it may be used in the ACS repository too.

TODO AbstractTransformRegistry and AbstractTransformRegistry need to be moved to the alfresco-transform-model pakage

* tidy up only

* REPO-4639: Add priority to duplicate transforms.

* REPO-4639: Refactor TikaTransformationIT to use the new Tika /transform specifications
Changes AbstractTransformerControllerTest as the engine_config is now loaded in TransformRegistryImpl instead of AbstractTransformerController

* Rename to TransformServiceRegistry, so we don't have to change the repo code.

* Added the baseUrl parameter to the register method and fixed the missed rename in the last commit.

* Javadoc change only

* Moved common classes (with repo) AbbstractTransformRegistry and TransformServiceRegistry to alfresco-transform-model

* Replace (simplify) all the isTransformable calls with a check against the JSON.
- Tests now only pass targetEncoding to the 'string' transformer.

* Fix failing tests.

* Revert port change

* REPO-4639 : Add priorities to misc engine_config

* REPO-4639 : Add priorities to pdf-renderer and  imagemagick engine_config

* Remove test that is @Ignored

* Pick up alfresco-transformer-model 1.0.2.7-REPO-4639-1

* REPO-4639 : Add priorities to libreoffice engine_config

* REPO-4639 : Add priorities to tika engine_config

* REPO-4639 : Remove all priorities with value equal to 50 (default) from engine_config

* Switch over to using TransformServiceRegistry in org.alfresco.transform.client.registry
Reintroduce the noExtensionSourceFilenameTest having removed @Ignore.

* New whitesource issue on commons-compress 1.18. Upgrading to 1.19.

* Removed the text/javascript -> text/plain test as this is not supported

* Modifications as a result of changes to method names in alfresco-transform-model

* Pick up alfresco-transform-model 1.0.2.7-ATS545-2

* Remove unused imports
This commit is contained in:
alandavis
2019-09-12 13:34:42 +01:00
committed by CezarLeahu
parent 614bdbe52f
commit d6777b58eb
28 changed files with 2087 additions and 1875 deletions

View File

@@ -26,28 +26,6 @@
*/
package org.alfresco.transformer;
import static org.alfresco.transformer.executors.Tika.INCLUDE_CONTENTS;
import static org.alfresco.transformer.executors.Tika.NOT_EXTRACT_BOOKMARKS_TEXT;
import static org.alfresco.transformer.executors.Tika.PDF_BOX;
import static org.alfresco.transformer.executors.Tika.TARGET_ENCODING;
import static org.alfresco.transformer.executors.Tika.TARGET_MIMETYPE;
import static org.alfresco.transformer.executors.Tika.TRANSFORM_NAMES;
import static org.alfresco.transformer.fs.FileManager.createAttachment;
import static org.alfresco.transformer.fs.FileManager.createSourceFile;
import static org.alfresco.transformer.fs.FileManager.createTargetFile;
import static org.alfresco.transformer.fs.FileManager.createTargetFileName;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_TEXT_PLAIN;
import static org.alfresco.transformer.util.Util.stringToBoolean;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.OK;
import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE;
import java.io.File;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.alfresco.transform.exceptions.TransformException;
import org.alfresco.transformer.executors.TikaJavaExecutor;
import org.alfresco.transformer.logging.LogEntry;
import org.alfresco.transformer.probes.ProbeTestTransform;
@@ -61,6 +39,24 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.util.Map;
import static org.alfresco.transformer.executors.Tika.INCLUDE_CONTENTS;
import static org.alfresco.transformer.executors.Tika.NOT_EXTRACT_BOOKMARKS_TEXT;
import static org.alfresco.transformer.executors.Tika.PDF_BOX;
import static org.alfresco.transformer.executors.Tika.TARGET_ENCODING;
import static org.alfresco.transformer.executors.Tika.TARGET_MIMETYPE;
import static org.alfresco.transformer.fs.FileManager.createAttachment;
import static org.alfresco.transformer.fs.FileManager.createSourceFile;
import static org.alfresco.transformer.fs.FileManager.createTargetFile;
import static org.alfresco.transformer.fs.FileManager.createTargetFileName;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_TEXT_PLAIN;
import static org.alfresco.transformer.util.Util.stringToBoolean;
import static org.springframework.http.HttpStatus.OK;
import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE;
/**
* Controller for the Docker based Tika transformers.
*
@@ -122,6 +118,7 @@ public class TikaController extends AbstractTransformerController
@PostMapping(value = "/transform", consumes = MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<Resource> transform(HttpServletRequest request,
@RequestParam("file") MultipartFile sourceMultipartFile,
@RequestParam("sourceMimetype") String sourceMimetype,
@RequestParam("targetExtension") String targetExtension,
@RequestParam("targetMimetype") String targetMimetype,
@RequestParam("targetEncoding") String targetEncoding,
@@ -129,15 +126,9 @@ public class TikaController extends AbstractTransformerController
@RequestParam(value = "timeout", required = false) Long timeout,
@RequestParam(value = "testDelay", required = false) Long testDelay,
@RequestParam(value = "transform") String transform,
@RequestParam(value = "includeContents", required = false) Boolean includeContents,
@RequestParam(value = "notExtractBookmarksText", required = false) Boolean notExtractBookmarksText)
{
if (!TRANSFORM_NAMES.contains(transform))
{
throw new TransformException(BAD_REQUEST.value(), "Invalid transform value");
}
String targetFilename = createTargetFileName(sourceMultipartFile.getOriginalFilename(),
targetExtension);
getProbeTestTransform().incrementTransformerCount();
@@ -148,6 +139,11 @@ public class TikaController extends AbstractTransformerController
// TODO Consider streaming the request and response rather than using temporary files
// https://www.logicbig.com/tutorials/spring-framework/spring-web-mvc/streaming-response-body.html
Map<String, String> transformOptions = createTransformOptions(
"includeContents", includeContents,
"notExtractBookmarksText", notExtractBookmarksText,
"targetEncoding", targetEncoding);
String transform = getTransformerName(sourceFile, sourceMimetype, targetMimetype, transformOptions);
javaExecutor.call(sourceFile, targetFile, transform,
includeContents != null && includeContents ? INCLUDE_CONTENTS : null,
notExtractBookmarksText != null && notExtractBookmarksText ? NOT_EXTRACT_BOOKMARKS_TEXT : null,
@@ -169,11 +165,11 @@ public class TikaController extends AbstractTransformerController
logger.debug("Processing request with: sourceFile '{}', targetFile '{}', transformOptions" +
" '{}', timeout {} ms", sourceFile, targetFile, transformOptions, timeout);
final String transform = transformOptions.get("transform");
final Boolean includeContents = stringToBoolean("includeContents");
final Boolean notExtractBookmarksText = stringToBoolean("notExtractBookmarksText");
final String targetEncoding = transformOptions.get("targetEncoding");
String transform = getTransformerName(sourceFile, sourceMimetype, targetMimetype, transformOptions);
javaExecutor.call(sourceFile, targetFile, transform,
includeContents != null && includeContents ? INCLUDE_CONTENTS : null,
notExtractBookmarksText != null && notExtractBookmarksText ? NOT_EXTRACT_BOOKMARKS_TEXT : null,

View File

@@ -26,34 +26,7 @@
*/
package org.alfresco.transformer.executors;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_HTML;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_IMAGE_JPEG;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_IMAGE_PNG;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_IMAGE_TIFF;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_TEXT_CSV;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_TEXT_PLAIN;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_XHTML;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_XML;
import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.net.URL;
import java.util.List;
import java.util.regex.Pattern;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
import com.google.common.collect.ImmutableList;
import org.apache.tika.config.TikaConfig;
import org.apache.tika.exception.TikaException;
import org.apache.tika.extractor.DocumentSelector;
@@ -73,7 +46,32 @@ import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
import com.google.common.collect.ImmutableList;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.net.URL;
import java.util.List;
import java.util.regex.Pattern;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_HTML;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_IMAGE_JPEG;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_IMAGE_PNG;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_IMAGE_TIFF;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_TEXT_CSV;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_TEXT_PLAIN;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_XHTML;
import static org.alfresco.transformer.util.MimetypeMap.MIMETYPE_XML;
/**
* Stripped down command line Tika transformers. Not actually run as a separate process, but the code fits the patten

View File

@@ -1,293 +1,504 @@
{
"transformOptions": {
"tikaOptions": [
{"value": {"name": "transform"}},
{"value": {"name": "targetEncoding"}}
],
"archiveOptions": [
{"value": {"name": "includeContents"}},
{"value": {"name": "targetEncoding"}}
],
"pdfboxOptions": [
{"value": {"name": "notExtractBookmarksText"}},
{"value": {"name": "targetMimetype"}},
{"value": {"name": "targetEncoding"}}
]
},
"transformers": [
{
"transformerName": "tika",
"transformerName": "Archive",
"supportedSourceAndTargetList": [
{"sourceMediaType": "application/x-cpio", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-cpio", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-cpio", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-cpio", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-cpio", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-cpio", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-cpio", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-cpio", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/java-archive", "targetMediaType": "text/html"},
{"sourceMediaType": "application/java-archive", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/java-archive", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/java-archive", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/java-archive", "targetMediaType": "text/html"},
{"sourceMediaType": "application/java-archive", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/java-archive", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/java-archive", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-tar", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-tar", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-tar", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-tar", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-tar", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-tar", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-tar", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-tar", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/zip", "targetMediaType": "text/html"},
{"sourceMediaType": "application/zip", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/zip", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/zip", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/zip", "targetMediaType": "text/html"},
{"sourceMediaType": "application/zip", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/zip", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/zip", "targetMediaType": "text/xml"}
],
"transformOptions": [
"archiveOptions"
]
},
{
"transformerName": "OutlookMsg",
"supportedSourceAndTargetList": [
{"sourceMediaType": "application/vnd.ms-outlook", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-outlook", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-outlook", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-outlook", "targetMediaType": "text/xml"}
],
"transformOptions": [
"tikaOptions"
]
},
{
"transformerName": "PdfBox",
"supportedSourceAndTargetList": [
{"sourceMediaType": "application/pdf", "targetMediaType": "text/csv"},
{"sourceMediaType": "application/pdf", "targetMediaType": "text/html"},
{"sourceMediaType": "application/pdf", "maxSourceSizeBytes": 26214400, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/pdf", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/pdf", "targetMediaType": "text/xml"}
],
"transformOptions": [
"pdfboxOptions"
]
},
{
"transformerName": "Office",
"supportedSourceAndTargetList": [
{"sourceMediaType": "application/msword", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/msword", "priority": 60, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/msword", "priority": 60, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/msword", "priority": 60, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-netcdf", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-netcdf", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-netcdf", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-netcdf", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-project", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-project", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-project", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-project", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/msword", "targetMediaType": "text/html"},
{"sourceMediaType": "application/msword", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/msword", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/msword", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-outlook", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-outlook", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-outlook", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-outlook", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.visio", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.visio", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.visio", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.visio", "priority": 55, "targetMediaType": "text/xml"}
],
"transformOptions": [
"tikaOptions"
]
},
{
"transformerName": "Poi",
"supportedSourceAndTargetList": [
{"sourceMediaType": "application/vnd.ms-excel", "priority": 55, "targetMediaType": "text/csv"},
{"sourceMediaType": "application/vnd.ms-excel", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 55, "targetMediaType": "text/csv"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 65, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 60, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 60, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 60, "targetMediaType": "text/xml"}
],
"transformOptions": [
"tikaOptions"
]
},
{
"transformerName": "OOXML",
"supportedSourceAndTargetList": [
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-gzip", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-gzip", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-gzip", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-gzip", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-hdf", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-hdf", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-hdf", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-hdf", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "text/html", "targetMediaType": "text/html"},
{"sourceMediaType": "text/html", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/html", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "text/html", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "text/x-java-source", "targetMediaType": "text/html"},
{"sourceMediaType": "text/x-java-source", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/x-java-source", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "text/x-java-source", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.apple.keynote", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.apple.keynote", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.apple.keynote", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-project", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-project", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-project", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-project", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.apple.numbers", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.apple.numbers", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.apple.numbers", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.chart", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.chart", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.chart", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.chart", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.image", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.image", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.image", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.image", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-master", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-master", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-master", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-master", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/ogg", "targetMediaType": "text/html"},
{"sourceMediaType": "application/ogg", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/ogg", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/ogg", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-web", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-web", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-web", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-web", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation-template", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation-template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation-template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation-template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet-template", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet-template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet-template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet-template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "priority": 60, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "priority": 55, "targetMediaType": "text/xml"}
],
"transformOptions": [
"tikaOptions"
]
},
{
"transformerName": "TikaAuto",
"supportedSourceAndTargetList": [
{"sourceMediaType": "application/x-cpio", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-cpio", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-cpio", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-cpio", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-template", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/java-archive", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/java-archive", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/java-archive", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/java-archive", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.apple.pages", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.apple.pages", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.apple.pages", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-netcdf", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-netcdf", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-netcdf", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-netcdf", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/pdf", "targetMediaType": "text/html"},
{"sourceMediaType": "application/pdf", "maxSourceSizeBytes": 26214400, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/pdf", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/pdf", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/msword", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/msword", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/msword", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/msword", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-word.document.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document" , "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-word.template.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-gzip", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-gzip", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-gzip", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-gzip", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-hdf", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-hdf", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-hdf", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-hdf", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "text/html", "targetMediaType": "text/html"},
{"sourceMediaType": "text/html", "priority": 60, "targetMediaType": "text/plain"},
{"sourceMediaType": "text/html", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "text/html", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "targetMediaType": "text/xml"},
{"sourceMediaType": "text/x-java-source", "targetMediaType": "text/html"},
{"sourceMediaType": "text/x-java-source", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "text/x-java-source", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "text/x-java-source", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-rar-compressed", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-rar-compressed", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-rar-compressed", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-rar-compressed", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.apple.keynote", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.apple.keynote", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.apple.keynote", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/rss+xml", "targetMediaType": "text/html"},
{"sourceMediaType": "application/rss+xml", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/rss+xml", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/rss+xml", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-project", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-project", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-project", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-project", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/rtf", "targetMediaType": "text/html"},
{"sourceMediaType": "application/rtf", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/rtf", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/rtf", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.apple.numbers", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.apple.numbers", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.apple.numbers", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.chart", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.chart", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.chart", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.chart", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.image", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.image", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.image", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.image", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.sun.xml.writer", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.sun.xml.writer", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.sun.xml.writer", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.sun.xml.writer", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-master", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-master", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-master", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-master", "targetMediaType": "text/xml"},
{"sourceMediaType": "text/xml", "targetMediaType": "text/html"},
{"sourceMediaType": "text/xml", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/xml", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "text/xml", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.visio", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.visio", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.visio", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.visio", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/xhtml+xml", "targetMediaType": "text/html"},
{"sourceMediaType": "application/xhtml+xml", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/xhtml+xml", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/xhtml+xml", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/ogg", "targetMediaType": "text/html"},
{"sourceMediaType": "application/ogg", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/ogg", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/ogg", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-web", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-web", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-web", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-web", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation-template", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation-template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation-template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.presentation-template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet-template", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet-template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet-template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.spreadsheet-template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-template", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.oasis.opendocument.text-template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.apple.pages", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.apple.pages", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.apple.pages", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/pdf", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/pdf", "maxSourceSizeBytes": 26214400, "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/pdf", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/pdf", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-compress", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-compress", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-compress", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-compress", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.template.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-outlook", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-outlook", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-outlook", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-outlook", "targetMediaType": "text/xml"}
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.addin.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.presentation.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-rar-compressed", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-rar-compressed", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-rar-compressed", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-rar-compressed", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/rss+xml", "targetMediaType": "text/html"},
{"sourceMediaType": "application/rss+xml", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/rss+xml", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/rss+xml", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/rtf", "targetMediaType": "text/html"},
{"sourceMediaType": "application/rtf", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/rtf", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/rtf", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-powerpoint.slide.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.presentationml.slide", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.sun.xml.writer", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.sun.xml.writer", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.sun.xml.writer", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.sun.xml.writer", "targetMediaType": "text/xml"},
{"sourceMediaType": "text/plain", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "text/plain", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "text/plain", "priority": 55, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "text/plain", "priority": 55, "targetMediaType": "text/xml"},
{"sourceMediaType": "text/xml", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "text/xml", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "text/xml", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "text/xml", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.visio", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.visio", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.visio", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.visio", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/xhtml+xml", "targetMediaType": "text/html"},
{"sourceMediaType": "application/xhtml+xml", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/xhtml+xml", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/xhtml+xml", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.addin.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.binary.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.sheet.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.ms-excel.template.macroenabled.12", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "priority": 55, "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "targetMediaType": "text/xml"},
{"sourceMediaType": "application/x-compress", "targetMediaType": "text/html"},
{"sourceMediaType": "application/x-compress", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-compress", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/x-compress", "targetMediaType": "text/xml"}
],
"transformOptions": [
"tikaOptions"
]
},
{
"transformerName": "TextMining",
"supportedSourceAndTargetList": [
{"sourceMediaType": "application/msword", "priority": 65, "targetMediaType": "text/html"},
{"sourceMediaType": "application/msword", "priority": 65, "targetMediaType": "text/plain"},
{"sourceMediaType": "application/msword", "priority": 65, "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/msword", "targetMediaType": "text/xml"}
],
"transformOptions": [
"tikaOptions"

View File

@@ -5,20 +5,8 @@
<h2>Tika Test Transformations</h2>
<form method="POST" enctype="multipart/form-data" action="/transform">
<table>
<tr><td><div style="text-align:right">transform *</div></td><td><select name="transform">
<option value="Archive">Archive</option>
<option value="OutlookMsg">OutlookMsg</option>
<option selected="selected" value="PdfBox">PdfBox</option>
<option value="Office">Office</option>
<option value="Poi">Poi</option>
<option value="OOXML">OOXML</option>
<option value="TikaAuto">TikaAuto</option>
<option value="TextMining">TextMining</option>
<option value="UNSET"></option>
<option value="BADVALUE">BADVALUE</option>
<option value="MIXED CASE TikaAuto">TikaAuto</option>
</select></td></tr>
<tr><td><div style="text-align:right">file *</div></td><td><input type="file" name="file" /></td></tr>
<tr><td><div style="text-align:right">sourceMimetype *</div></td><td><input type="text" name="sourceMimetype" value="application/msword" /></td></tr>
<tr><td><div style="text-align:right">targetExtension *</div></td><td><input type="text" name="targetExtension" value="txt" /></td></tr>
<tr><td><div style="text-align:right">targetMimetype *</div></td><td><input type="text" name="targetMimetype" value="text/plain" /></td></tr>
<tr><td><div style="text-align:right">targetEncoding *</div></td><td><input type="text" name="targetEncoding" value="UTF-8" /></td></tr>

View File

@@ -236,7 +236,6 @@ public class TikaControllerTest extends AbstractTransformerControllerTest
{
// We don't use targetFileBytes as some of the transforms contain different date text based on the os being used.
mockTransformCommand(sourceExtension, targetExtension, sourceMimetype, false);
this.transform = transform;
this.targetMimetype = targetMimetype;
System.out.println("Test " + transform + " " + sourceExtension + " to " + targetExtension);
@@ -261,9 +260,9 @@ public class TikaControllerTest extends AbstractTransformerControllerTest
String... params)
{
return super.mockMvcRequest(url, sourceFile, params)
.param("transform", transform)
.param("targetEncoding", targetEncoding)
.param("targetMimetype", targetMimetype);
.param("targetMimetype", targetMimetype)
.param("sourceMimetype", sourceMimetype);
}
@Test
@@ -540,8 +539,6 @@ public class TikaControllerTest extends AbstractTransformerControllerTest
transformRequest.setTargetExtension(targetExtension);
transformRequest.setSourceMediaType(APPLICATION_PDF_VALUE);
transformRequest.setTargetMediaType(TEXT_PLAIN_VALUE);
transformRequest.getTransformRequestOptions().put("transform", "PdfBox");
transformRequest.getTransformRequestOptions().put("targetMimetype", TEXT_PLAIN_VALUE);
transformRequest.getTransformRequestOptions().put("targetEncoding", "UTF-8");
}
@@ -563,6 +560,7 @@ public class TikaControllerTest extends AbstractTransformerControllerTest
transformRequest.setSourceExtension(sourceExtension);
transformRequest.setSourceSize(sourceFile.length());
transformRequest.setTargetExtension(targetExtension);
transformRequest.setSourceMediaType(sourceMimetype);
// HTTP Request
HttpHeaders headers = new HttpHeaders();

View File

@@ -29,7 +29,12 @@ package org.alfresco.transformer;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.util.LinkedMultiValueMap;
import static org.springframework.http.MediaType.MULTIPART_FORM_DATA;
/**
* Tests TikaController with a server test harness.
@@ -49,4 +54,25 @@ public class TikaHttpRequestTest extends AbstractHttpRequestTest
{
return "pdf";
}
// Override method as Tika requires sourceMimetype
// If not provided then sourceMimetype request parameter error will be thrown.
@Override
protected void assertTransformError(boolean addFile, String errorMessage)
{
LinkedMultiValueMap<String, Object> parameters = new LinkedMultiValueMap<>();
if (addFile)
{
parameters.add("file",
new org.springframework.core.io.ClassPathResource("quick." + getSourceExtension()));
}
parameters.add("sourceMimetype", "application/pdf");
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MULTIPART_FORM_DATA);
HttpEntity<LinkedMultiValueMap<String, Object>> entity = new HttpEntity<>(parameters,
headers);
super.sendTranformationRequest(entity, errorMessage);
}
}

View File

@@ -66,14 +66,14 @@ public class TikaTransformationIT
private final String sourceFile;
private final String targetExtension;
private final String targetMimetype;
private final String transform;
private final String sourceMimetype;
public TikaTransformationIT(final Triple<String, String, String> entry)
{
sourceFile = entry.getLeft();
targetExtension = entry.getMiddle();
targetMimetype = extensionMimetype.get(entry.getMiddle());
transform = entry.getRight();
sourceMimetype = entry.getRight();
}
// TODO unit tests for the following file types (for which is difficult to find file samples):
@@ -87,57 +87,55 @@ public class TikaTransformationIT
{
return Stream
.of(
allTargets("quick.doc", "Office"),
allTargets("quick.docx", "TikaAuto"),
allTargets("quick.html", "TikaAuto"),
allTargets("quick.jar", "TikaAuto"),
allTargets("quick.java", "TikaAuto"),
allTargets("quick.doc", "application/msword"),
allTargets("quick.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"),
allTargets("quick.html", "text/html"),
allTargets("quick.jar", "application/java-archive"),
allTargets("quick.java", "text/x-java-source"),
Stream.of(
Triple.of("quick.key", "html", "TikaAuto"),
// Does not work, alfresco-docker-transform-misc can handle this target mimetype, removed from engine_config.json
Triple.of("quick.key", "html", "application/vnd.apple.keynote"),
// Does not work, alfresco-docker-sourceMimetype-misc can handle this target mimetype, removed from engine_config.json
// Triple.of("quick.key", "txt", "TikaAuto"),
Triple.of("quick.key", "xhtml", "TikaAuto"),
Triple.of("quick.key", "xml", "TikaAuto")
Triple.of("quick.key", "xhtml", "application/vnd.apple.keynote"),
Triple.of("quick.key", "xml", "application/vnd.apple.keynote")
),
allTargets("quick.msg", "OutlookMsg"),
allTargets("quick.msg", "application/vnd.ms-outlook"),
Stream.of(
Triple.of("quick.numbers", "html", "TikaAuto"),
// Does not work, alfresco-docker-transform-misc can handle this target mimetype, removed from engine_config.json
Triple.of("quick.numbers", "html", "application/vnd.apple.numbers"),
// Does not work, alfresco-docker-sourceMimetype-misc can handle this target mimetype, removed from engine_config.json
// Triple.of("quick.numbers", "txt", "TikaAuto"),
Triple.of("quick.numbers", "xhtml", "TikaAuto"),
Triple.of("quick.numbers", "xml", "TikaAuto")
Triple.of("quick.numbers", "xhtml", "application/vnd.apple.numbers"),
Triple.of("quick.numbers", "xml", "application/vnd.apple.numbers")
),
allTargets("quick.odp", "TikaAuto"),
allTargets("quick.ods", "TikaAuto"),
allTargets("quick.odt", "TikaAuto"),
allTargets("quick.otp", "TikaAuto"),
allTargets("quick.ots", "TikaAuto"),
allTargets("quick.ott", "TikaAuto"),
allTargets("quick.odp", "application/vnd.oasis.opendocument.presentation"),
allTargets("quick.ods", "application/vnd.oasis.opendocument.spreadsheet"),
allTargets("quick.odt", "application/vnd.oasis.opendocument.text"),
allTargets("quick.otp", "application/vnd.oasis.opendocument.presentation-template"),
allTargets("quick.ots", "application/vnd.oasis.opendocument.spreadsheet-template"),
allTargets("quick.ott", "application/vnd.oasis.opendocument.text-template"),
Stream.of(
Triple.of("quick.pages", "html", "TikaAuto"),
// Does not work, alfresco-docker-transform-misc can handle this target mimetype, removed from engine_config.json
Triple.of("quick.pages", "html", "application/vnd.apple.pages"),
// Does not work, alfresco-docker-sourceMimetype-misc can handle this target mimetype, removed from engine_config.json
// Triple.of("quick.pages", "txt", "TikaAuto"),
Triple.of("quick.pages", "xhtml", "TikaAuto"),
Triple.of("quick.pages", "xml", "TikaAuto")
Triple.of("quick.pages", "xhtml", "application/vnd.apple.pages"),
Triple.of("quick.pages", "xml", "application/vnd.apple.pages")
),
allTargets("quick.pdf", "TikaAuto"),
allTargets("quick.ppt", "TikaAuto"),
allTargets("quick.pptx", "TikaAuto"),
allTargets("quick.sxw", "TikaAuto"),
allTargets("quick.txt", "TikaAuto"),
allTargets("quick.vsd", "TikaAuto"),
allTargets("quick.xls", "TikaAuto"),
allTargets("quick.xslx", "TikaAuto"),
allTargets("quick.zip", "TikaAuto"),
allTargets("quick.zip", "Archive"),
allTargets("quick.jar", "Archive"),
allTargets("quick.tar", "Archive"),
allTargets("sample.rtf", "TikaAuto"),
allTargets("quick.xml", "TikaAuto"),
allTargets("sample.xhtml.txt", "TikaAuto"),
allTargets("sample.rss", "TikaAuto"),
//allTargets("quick.rar", "TikaAuto"),
allTargets("quick.tar.gz", "TikaAuto"))
allTargets("quick.pdf", "application/pdf"),
allTargets("quick.ppt", "application/vnd.ms-powerpoint"),
allTargets("quick.pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"),
allTargets("quick.sxw", "application/vnd.sun.xml.writer"),
allTargets("quick.txt", "text/plain"),
allTargets("quick.vsd", "application/vnd.visio"),
allTargets("quick.xls", "application/vnd.ms-excel"),
allTargets("quick.xslx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),
allTargets("quick.zip", "application/zip"),
allTargets("quick.tar", "application/x-tar"),
allTargets("sample.rtf", "application/rtf"),
allTargets("quick.xml", "text/xml"),
allTargets("sample.xhtml.txt", "application/xhtml+xml"),
allTargets("sample.rss", "application/rss+xml"),
//allTargets("quick.rar", "application/x-rar-compressed"),
allTargets("quick.tar.gz", "application/x-gzip"))
.flatMap(identity())
.collect(toSet());
}
@@ -145,15 +143,15 @@ public class TikaTransformationIT
@Test
public void testTransformation()
{
final String descriptor = format("Transform ({0} -> {1}, {2}, transform={3})",
sourceFile, targetMimetype, targetExtension, transform);
final String descriptor = format("Transform ({0} -> {1}, {2}, sourceMimetype={3})",
sourceFile, targetMimetype, targetExtension, sourceMimetype);
try
{
final ResponseEntity<Resource> response = sendTRequest(ENGINE_URL, sourceFile, null,
targetMimetype, targetExtension, ImmutableMap.of(
"targetEncoding", "UTF-8",
"transform", transform));
"sourceMimetype", sourceMimetype));
assertEquals(descriptor, OK, response.getStatusCode());
}
catch (Exception e)
@@ -163,11 +161,11 @@ public class TikaTransformationIT
}
private static Stream<Triple<String, String, String>> allTargets(final String sourceFile,
final String transform)
final String sourceMimetype)
{
return extensionMimetype
.keySet()
.stream()
.map(k -> Triple.of(sourceFile, k, transform));
.map(k -> Triple.of(sourceFile, k, sourceMimetype));
}
}