Merge branch 'ATS-675_aio_transformer' into ATS-702_ATS-675_Add-AIO-Tests

This commit is contained in:
David Edwards
2020-04-08 11:28:31 +01:00
15 changed files with 917 additions and 262 deletions

View File

@@ -51,10 +51,11 @@ import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import org.alfresco.transform.client.model.config.TransformConfig;
import org.alfresco.transform.exceptions.TransformException;
import org.alfresco.transformer.logging.LogEntry;
import org.alfresco.transformer.probes.ProbeTestTransform;
import org.alfresco.transformer.transformers.AllInOneTransformer;
import org.alfresco.transformer.transformers.Transformer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -71,7 +72,7 @@ public class AIOController extends AbstractTransformerController
private static final Logger logger = LoggerFactory.getLogger(AIOController.class);
@Autowired
private AllInOneTransformer transformer;
private AIOTransformRegistry transformRegistry;
@Override
public String getTransformerName()
@@ -89,25 +90,9 @@ public class AIOController extends AbstractTransformerController
public void processTransform(File sourceFile, File targetFile, String sourceMimetype, String targetMimetype,
Map<String, String> transformOptions, Long timeout)
{
logger.debug("Processing request with: sourceFile '{}', targetFile '{}', transformOptions" +
" '{}', timeout {} ms", sourceFile, targetFile, transformOptions, timeout);
final String transform = getTransformerName(sourceFile, sourceMimetype, targetMimetype, transformOptions);
transformOptions.put(AllInOneTransformer.TRANSFORM_NAME_PARAMETER, transform);
try
{
transformer.transform(sourceFile, targetFile, sourceMimetype, targetMimetype, transformOptions);
}
catch (IllegalArgumentException e)
{
throw new TransformException(BAD_REQUEST.value(), e.getMessage(), e);
}
catch (Exception e)
{
throw new TransformException(INTERNAL_SERVER_ERROR.value(), e.getMessage(), e);
}
transformInternal( transform, sourceFile, targetFile, MIMETYPE_HTML, MIMETYPE_TEXT_PLAIN, transformOptions);
}
@@ -125,11 +110,10 @@ public class AIOController extends AbstractTransformerController
protected void executeTransformCommand(File sourceFile, File targetFile)
{
Map<String, String> parameters = new HashMap<>();
parameters.put(AllInOneTransformer.TRANSFORM_NAME_PARAMETER, "misc");
parameters.put(SOURCE_ENCODING, "UTF-8");
try
{
transformer.transform(sourceFile, targetFile, MIMETYPE_HTML,
transformInternal( "misc", sourceFile, targetFile, MIMETYPE_HTML,
MIMETYPE_TEXT_PLAIN, parameters);
}
catch(Exception e)
@@ -167,16 +151,12 @@ public class AIOController extends AbstractTransformerController
final File sourceFile = createSourceFile(request, sourceMultipartFile);
final File targetFile = createTargetFile(request, targetFilename);
final String transform = getTransformerName(sourceFile, sourceMimetype, targetMimetype, transformOptions);
transformOptions.put(AllInOneTransformer.TRANSFORM_NAME_PARAMETER, transform);
debugLogTransform("Performing transform with parameters: ", sourceMimetype, targetMimetype,
targetExtension, requestParameters);
try
{
transformer.transform(sourceFile, targetFile, sourceMimetype, targetMimetype, transformOptions);
debugLogTransform("Performing transform with parameters: ", sourceMimetype, targetMimetype,
targetExtension, transformOptions);
transformInternal(transform, sourceFile, targetFile, sourceMimetype, targetMimetype, transformOptions);
}
catch (IllegalArgumentException e)
{
@@ -204,4 +184,56 @@ public class AIOController extends AbstractTransformerController
message, sourceMimetype, targetMimetype, targetExtension, transformOptions);
}
}
@Override
public ResponseEntity<TransformConfig> info()
{
TransformConfig transformConfig = new TransformConfig();
logger.info("GET Transform Config.");
try
{
transformConfig = transformRegistry.getTransformConfig();
}
catch (Exception e)
{
throw new TransformException(INTERNAL_SERVER_ERROR.value(), e.getMessage(), e);
}
return new ResponseEntity<>(transformConfig, OK);
}
protected void transformInternal(String transformName, File sourceFile, File targetFile, String sourceMimetype, String targetMimetype,
Map<String, String> transformOptions)
{
logger.debug("Processing request with: sourceFile '{}', targetFile '{}', transformOptions" +
" '{}', timeout {} ms", sourceFile, targetFile, transformOptions);
Transformer transformer = transformRegistry.getByTransformName(transformName);
if (transformer == null)
{
new TransformException(INTERNAL_SERVER_ERROR.value(), "No transformer mapping for - transform:"
+ transformName + " sourceMimetype:" + sourceMimetype + " targetMimetype:" + targetMimetype);
}
if (logger.isDebugEnabled())
{
logger.debug("Performing transform '{}' using {}", transformName, transformer.getClass().getSimpleName());
}
try
{
Map<String, String> optionsWithTransformName = new HashMap<>(transformOptions);
optionsWithTransformName.put(Transformer.TRANSFORM_NAME_PARAMETER, transformName);
transformer.transform(sourceFile, targetFile, sourceMimetype, targetMimetype, optionsWithTransformName);
}
catch (Exception e)
{
throw new TransformException(INTERNAL_SERVER_ERROR.value(), "Failed transform - transform:"
+ transformName + " sourceMimetype:" + sourceMimetype + " targetMimetype:" + targetMimetype);
}
}
}

View File

@@ -26,17 +26,12 @@
*/
package org.alfresco.transformer;
import org.alfresco.transform.client.model.config.TransformConfig;
import org.alfresco.transform.client.registry.TransformServiceRegistry;
import org.alfresco.transformer.transformers.AllInOneTransformer;
import org.alfresco.transformer.transformers.ImageMagickAdapter;
import org.alfresco.transformer.transformers.LibreOfficeAdapter;
import org.alfresco.transformer.transformers.MiscAdapter;
import org.alfresco.transformer.transformers.PdfRendererAdapter;
import org.alfresco.transformer.transformers.TikaAdapter;
import org.alfresco.transformer.transformers.Transformer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
@@ -44,38 +39,21 @@ import org.springframework.context.annotation.Primary;
@Configuration
public class AIOCustomConfig
{
@Bean("AllInOneTransformer")
public Transformer aioTransformer() throws Exception
{
AllInOneTransformer aioTransformer = new AllInOneTransformer();
aioTransformer.registerTransformer(new MiscAdapter());
aioTransformer.registerTransformer(new TikaAdapter());
aioTransformer.registerTransformer(new ImageMagickAdapter());
aioTransformer.registerTransformer(new LibreOfficeAdapter());
aioTransformer.registerTransformer(new PdfRendererAdapter());
return aioTransformer;
}
/**
*
* @return Override the TransformRegistryImpl used in {@link AbstractTransformerController}
*/
@Bean
@Primary
public TransformServiceRegistry transformRegistryOverride()
public TransformServiceRegistry aioTransformRegistry() throws Exception
{
return new TransformRegistryImpl()
{
@Autowired
@Qualifier("AllInOneTransformer")
Transformer transformer;
AIOTransformRegistry aioTransformRegistry = new AIOTransformRegistry();
aioTransformRegistry.registerTransformer(new MiscAdapter());
aioTransformRegistry.registerTransformer(new TikaAdapter());
aioTransformRegistry.registerTransformer(new ImageMagickAdapter());
aioTransformRegistry.registerTransformer(new LibreOfficeAdapter());
aioTransformRegistry.registerTransformer(new PdfRendererAdapter());
return aioTransformRegistry;
}
@Override
TransformConfig getTransformConfig()
{
return transformer.getTransformConfig();
}
};
}
}

View File

@@ -0,0 +1,178 @@
/*
* #%L
* Alfresco Transform Core
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.transformer;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.alfresco.transform.client.model.config.TransformConfig;
import org.alfresco.transform.client.model.config.TransformOption;
import org.alfresco.transform.client.registry.AbstractTransformRegistry;
import org.alfresco.transform.client.registry.TransformCache;
import org.alfresco.transform.exceptions.TransformException;
import org.alfresco.transformer.transformers.Transformer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
/***
*
* @author eknizat
*/
public class AIOTransformRegistry extends AbstractTransformRegistry
{
private static final Logger log = LoggerFactory.getLogger(AIOTransformRegistry.class);
private String locationFromProperty = "engine_config.json";
// The aggregated config
TransformConfig aggregatedConfig = new TransformConfig();
// Holds the structures used by AbstractTransformRegistry to look up what is supported.
// Unlike other sub classes this class does not extend Data or replace it at run time.
private TransformCache data = new TransformCache();
private ObjectMapper jsonObjectMapper = new ObjectMapper();
/**
* Represents the mapping between a transform and a transformer, multiple mappings can point to the same transformer.
*/
private Map<String, Transformer> transformerTransformMapping = new HashMap();
/**
* The registration will go through all supported sub transformers and map them to the transformer implementation.
*
* @param transformer The transformer implementation,
* this could be a transformer managing multiple sub transformers.
* @throws Exception Exception is thrown if a mapping for a transformer name already exists.
*/
public void registerTransformer(Transformer transformer) throws Exception
{
String location = transformer.getTransformerId() + "_" + locationFromProperty;
TransformConfig transformConfig = loadTransformConfig(location);
for (org.alfresco.transform.client.model.config.Transformer transformerConfig
: transformConfig.getTransformers())
{
String transformerName = transformerConfig.getTransformerName();
if (transformerTransformMapping.containsKey(transformerName))
{
throw new Exception("Transformer name " + transformerName + " is already registered.");
}
transformerTransformMapping.put(transformerName, transformer);
log.debug("Registered transformer with name: '{}'.", transformerName);
}
// add to data
aggregatedConfig.getTransformers().addAll(transformConfig.getTransformers());
aggregatedConfig.getTransformOptions().putAll(transformConfig.getTransformOptions());
registerAll(transformConfig, locationFromProperty, locationFromProperty);
}
/**
*
* @param transformName - the transform name used in mapping...
* @return
*/
public Transformer getByTransformName(String transformName)
{
return getTransformerTransformMapping().get(transformName);
}
public TransformConfig getTransformConfig() throws Exception
{
return aggregatedConfig;
}
protected TransformConfig loadTransformConfig(String name) throws Exception
{
if (getClass().getClassLoader().getResource(name) == null)
{
throw new Exception("Configuration '" + name + "' does not exist on the classpath.");
}
try (InputStream is = getClass().getClassLoader().getResourceAsStream(name);
Reader reader = new InputStreamReader(is, UTF_8))
{
return jsonObjectMapper.readValue(reader, TransformConfig.class);
}
catch (IOException e)
{
throw new Exception("Could not read '" + name + "' from the classpath.", e);
}
}
Map<String, Transformer> getTransformerTransformMapping()
{
return transformerTransformMapping;
}
void setTransformerTransformMapping(Map<String, Transformer> transformerTransformMapping)
{
this.transformerTransformMapping = transformerTransformMapping;
}
String getLocationFromProperty()
{
return locationFromProperty;
}
void setLocationFromProperty(String locationFromProperty)
{
this.locationFromProperty = locationFromProperty;
}
@Override
public TransformCache getData()
{
return data;
}
@Override
protected void logError(String msg)
{
log.error(msg);
}
}

View File

@@ -1,94 +0,0 @@
/*
* #%L
* Alfresco Transform Core
* %%
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.transformer.transformers;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import org.alfresco.transform.client.model.config.TransformConfig;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import static java.nio.charset.StandardCharsets.UTF_8;
public abstract class AbstractTransformer implements Transformer
{
private static final String TRANSFORMER_CONFIG_SUFFIX = "_engine_config.json";
private ObjectMapper jsonObjectMapper;
TransformConfig transformConfig;
public AbstractTransformer() throws Exception
{
jsonObjectMapper = new JsonMapper();
transformConfig = loadTransformConfig();
}
public void setObjectMapper(ObjectMapper objectMapper)
{
this.jsonObjectMapper = objectMapper;
}
public void setTransformConfig(TransformConfig transformConfig)
{
this.transformConfig = transformConfig;
}
/**
* Used to search for an engine configuration file.
*
* @return A unique prefix which is used to load a &lt;prefix&gt; _engine_config.json file
*/
abstract String getTransformerConfigPrefix();
@Override
public TransformConfig getTransformConfig()
{
return transformConfig;
}
private TransformConfig loadTransformConfig() throws Exception
{
String configFileName = getTransformerConfigPrefix() + TRANSFORMER_CONFIG_SUFFIX;
if (getClass().getClassLoader().getResource(configFileName) == null)
{
throw new Exception("Configuration '" + configFileName + "' does not exist on the classpath.");
}
try (InputStream is = getClass().getClassLoader().getResourceAsStream(configFileName);
Reader reader = new InputStreamReader(is, UTF_8))
{
return jsonObjectMapper.readValue(reader, TransformConfig.class);
}
catch (IOException e)
{
throw new Exception("Could not read '" + configFileName + "' from the classpath.", e);
}
}
}

View File

@@ -26,19 +26,12 @@
*/
package org.alfresco.transformer.transformers;
import org.alfresco.transform.client.model.config.TransformConfig;
import org.alfresco.transform.client.model.config.TransformOption;
import org.alfresco.transformer.AIOTransformRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/**
* Top level transformer managing multiple sub transformers.
@@ -53,29 +46,16 @@ public class AllInOneTransformer implements Transformer
/**
* Represents the mapping between a transform and a transformer, multiple mappings can point to the same transformer.
*/
private Map<String, Transformer> transformerTransformMapping = new HashMap();
AIOTransformRegistry transformRegistry = new AIOTransformRegistry();
/**
* The registration will go through all supported sub transformers and map them to the transformer implementation.
*
* @param transformer The transformer implementation,
* this could be a transformer managing multiple sub transformers.
* @throws Exception Exception is thrown if a mapping for a transformer name already exists.
*/
public void registerTransformer(Transformer transformer) throws Exception
public AllInOneTransformer()
{
for (org.alfresco.transform.client.model.config.Transformer transformerConfig
: transformer.getTransformConfig().getTransformers())
{
String transformerName = transformerConfig.getTransformerName();
if (transformerTransformMapping.containsKey(transformerName))
{
throw new Exception("Transformer name " + transformerName + " is already registered.");
}
transformerTransformMapping.put(transformerName, transformer);
logger.debug("Registered transformer with name: '{}'.", transformerName);
}
public void addTransformer(Transformer transformer) throws Exception
{
transformRegistry.registerTransformer(transformer);
}
@Override
@@ -83,7 +63,7 @@ public class AllInOneTransformer implements Transformer
Map<String, String> transformOptions) throws Exception
{
String transformName = transformOptions.get(TRANSFORM_NAME_PARAMETER);
Transformer transformer = transformerTransformMapping.get(transformName);
Transformer transformer = transformRegistry.getByTransformName(transformName);
if (transformer == null)
{
@@ -99,36 +79,19 @@ public class AllInOneTransformer implements Transformer
}
@Override
public TransformConfig getTransformConfig()
public String getTransformerId()
{
// Merge the config for all sub transformers
List<org.alfresco.transform.client.model.config.Transformer> transformerConfigs = new LinkedList<>();
Map<String, Set<TransformOption>> transformOptions = new HashMap<>();
Set<Transformer> distinctTransformers = new HashSet<>(transformerTransformMapping.values());
{
for (Transformer transformer: distinctTransformers)
{
TransformConfig transformConfig = transformer.getTransformConfig();
transformerConfigs.addAll(transformConfig.getTransformers());
transformOptions.putAll(transformConfig.getTransformOptions());
}
return "all-in-one";
}
TransformConfig allInOneConfig = new TransformConfig();
allInOneConfig.setTransformers(transformerConfigs);
allInOneConfig.setTransformOptions(transformOptions);
return allInOneConfig;
public AIOTransformRegistry getTransformRegistry()
{
return transformRegistry;
}
public Map<String, Transformer> getTransformerTransformMapping()
public void setTransformRegistry(AIOTransformRegistry transformRegistry)
{
return transformerTransformMapping;
}
public void setTransformerTransformMapping(Map<String, Transformer> transformerTransformMapping)
{
this.transformerTransformMapping = transformerTransformMapping;
this.transformRegistry = transformRegistry;
}
}

View File

@@ -53,10 +53,10 @@ import java.util.Map;
import org.alfresco.transformer.ImageMagickOptionsBuilder;
import org.alfresco.transformer.executors.ImageMagickCommandExecutor;
public class ImageMagickAdapter extends AbstractTransformer
public class ImageMagickAdapter implements Transformer
{
private static String CONFIG_PREFIX = "imagemagick";
private static String ID = "imagemagick";
private ImageMagickCommandExecutor commandExecutor;
public ImageMagickAdapter() throws Exception
@@ -65,12 +65,6 @@ public class ImageMagickAdapter extends AbstractTransformer
commandExecutor = new ImageMagickCommandExecutor();
}
@Override
String getTransformerConfigPrefix()
{
return CONFIG_PREFIX;
}
@Override
public void transform(File sourceFile, File targetFile, String sourceMimetype, String targetMimetype,
Map<String, String> transformOptions) throws Exception
@@ -107,6 +101,12 @@ public class ImageMagickAdapter extends AbstractTransformer
commandExecutor.run(options, sourceFile, pageRange, targetFile, timeout);
}
@Override
public String getTransformerId()
{
return ID;
}
// COPIED From ImageMagickController
private static String calculatePageRange(Integer startPage, Integer endPage)
{

View File

@@ -31,9 +31,9 @@ import java.util.Map;
import org.alfresco.transformer.executors.LibreOfficeJavaExecutor;
public class LibreOfficeAdapter extends AbstractTransformer
public class LibreOfficeAdapter implements Transformer
{
private static String CONFIG_PREFIX = "libreoffice";
private static String ID = "libreoffice";
private LibreOfficeJavaExecutor javaExecutor;
public LibreOfficeAdapter() throws Exception
@@ -42,16 +42,16 @@ public class LibreOfficeAdapter extends AbstractTransformer
javaExecutor = new LibreOfficeJavaExecutor();
}
@Override
String getTransformerConfigPrefix()
{
return CONFIG_PREFIX;
}
@Override
public void transform(File sourceFile, File targetFile, String sourceMimetype, String targetMimetype,
Map<String, String> transformOptions) throws Exception
{
javaExecutor.call(sourceFile, targetFile);
}
@Override
public String getTransformerId()
{
return ID;
}
}

View File

@@ -29,9 +29,9 @@ package org.alfresco.transformer.transformers;
import java.io.File;
import java.util.Map;
public class MiscAdapter extends AbstractTransformer
public class MiscAdapter implements Transformer
{
private static final String CONFIG_PREFIX = "misc";
private static final String ID = "misc";
private SelectingTransformer miscSelectingTransformer;
@@ -41,12 +41,6 @@ public class MiscAdapter extends AbstractTransformer
miscSelectingTransformer = new SelectingTransformer();
}
@Override
public String getTransformerConfigPrefix()
{
return CONFIG_PREFIX;
}
@Override
public void transform(File sourceFile, File targetFile, String sourceMimetype, String targetMimetype, Map<String,
String> transformOptions) throws Exception
@@ -56,5 +50,11 @@ public class MiscAdapter extends AbstractTransformer
sourceMimetype, targetMimetype, transformOptions);
}
@Override
public String getTransformerId()
{
return ID;
}
}

View File

@@ -41,9 +41,9 @@ import org.alfresco.transformer.executors.PdfRendererCommandExecutor;
import org.alfresco.transformer.PdfRendererOptionsBuilder;
public class PdfRendererAdapter extends AbstractTransformer
public class PdfRendererAdapter implements Transformer
{
private static String CONFIG_PREFIX = "pdfrenderer";
private static String ID = "pdfrenderer";
private PdfRendererCommandExecutor pdfExecutor;
public PdfRendererAdapter() throws Exception
@@ -52,12 +52,6 @@ public class PdfRendererAdapter extends AbstractTransformer
pdfExecutor = new PdfRendererCommandExecutor();
}
@Override
String getTransformerConfigPrefix()
{
return CONFIG_PREFIX;
}
@Override
public void transform(File sourceFile, File targetFile, String sourceMimetype, String targetMimetype,
Map<String, String> transformOptions) throws Exception
@@ -77,4 +71,10 @@ public class PdfRendererAdapter extends AbstractTransformer
pdfExecutor.run(options, sourceFile, targetFile, timeout);
}
@Override
public String getTransformerId()
{
return ID;
}
}

View File

@@ -37,9 +37,9 @@ import static org.alfresco.transformer.executors.Tika.NOT_EXTRACT_BOOKMARKS_TEXT
import static org.alfresco.transformer.executors.Tika.TARGET_ENCODING;
import static org.alfresco.transformer.executors.Tika.TARGET_MIMETYPE;
public class TikaAdapter extends AbstractTransformer
public class TikaAdapter implements Transformer
{
private static final String CONFIG_PREFIX = "tika";
private static final String ID = "tika";
private TikaJavaExecutor tikaJavaExecutor;
public TikaAdapter() throws Exception
@@ -48,12 +48,6 @@ public class TikaAdapter extends AbstractTransformer
tikaJavaExecutor = new TikaJavaExecutor();
}
@Override
String getTransformerConfigPrefix()
{
return CONFIG_PREFIX;
}
@Override
public void transform(File sourceFile, File targetFile, String sourceMimetype, String targetMimetype, Map<String, String> transformOptions) throws Exception
{
@@ -70,4 +64,10 @@ public class TikaAdapter extends AbstractTransformer
notExtractBookmarksText ? NOT_EXTRACT_BOOKMARKS_TEXT : null,
TARGET_MIMETYPE + targetMimetype, TARGET_ENCODING + targetEncoding);
}
@Override
public String getTransformerId()
{
return ID;
}
}

View File

@@ -59,7 +59,7 @@ public interface Transformer
* @return Supported config for the transformer implementation.
*
*/
TransformConfig getTransformConfig();
String getTransformerId();
}

View File

@@ -26,11 +26,14 @@
*/
package org.alfresco.transformer.transformers;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.alfresco.transform.client.model.config.TransformConfig;
import org.alfresco.transformer.AIOTransformRegistry;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.text.PDFTextStripper;
import org.junit.Before;
import org.junit.Test;
import org.springframework.core.io.ClassPathResource;
import java.io.File;
import java.io.FileOutputStream;
@@ -38,7 +41,6 @@ import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.nio.file.Files;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -49,14 +51,15 @@ import static org.alfresco.transformer.transformers.TextToPdfContentTransformer.
import static org.alfresco.transformer.transformers.Transformer.TRANSFORM_NAME_PARAMETER;
import static org.junit.Assert.*;
public class AllInOneTransformerTest
public class AllTransformRegistryTest
{
private static final String SOURCE_MIMETYPE = "text/html";
private static final String TARGET_MIMETYPE = "text/plain";
String SOURCE_ENCODING = "sourceEncoding";
String TARGET_ENCODING = "targetEncoding";
AllInOneTransformer aioTransformer = new AllInOneTransformer();
AIOTransformRegistry aioTransformer = new AIOTransformRegistry();
ObjectMapper objectMapper = new ObjectMapper();
@Before
@@ -80,6 +83,11 @@ public class AllInOneTransformerTest
return new String(Files.readAllBytes(file.toPath()), encoding);
}
private TransformConfig loadConfig(String s) throws Exception
{
return objectMapper.readValue(new ClassPathResource(s).getFile(), TransformConfig.class);
}
@Test
public void testConfigAggregation() throws Exception
{
@@ -89,8 +97,8 @@ public class AllInOneTransformerTest
List<String> expectedTransformOptionNames = Arrays.asList("tikaOptions", "archiveOptions", "pdfboxOptions",
"textToPdfOptions", "stringOptions", "htmlOptions");
TransformConfig miscConfig = (new MiscAdapter()).getTransformConfig();
TransformConfig tikaConfig = (new TikaAdapter()).getTransformConfig();
TransformConfig miscConfig = loadConfig("misc_engine_config.json");
TransformConfig tikaConfig = loadConfig("tika_engine_config.json");
// check correct number of transformers
assertEquals("Number of expected transformers",
@@ -149,7 +157,8 @@ public class AllInOneTransformerTest
Map<String, String> parameters = new HashMap<>();
parameters.put(SOURCE_ENCODING, "ISO-8859-1");
parameters.put(TRANSFORM_NAME_PARAMETER, "html");
aioTransformer.transform(tmpS, tmpD, SOURCE_MIMETYPE, TARGET_MIMETYPE, parameters);
Transformer transformer = aioTransformer.getByTransformName("html");
transformer.transform(tmpS, tmpD, SOURCE_MIMETYPE, TARGET_MIMETYPE, parameters);
assertEquals(expected, readFromFile(tmpD, "UTF-8"));
tmpS.delete();
@@ -163,7 +172,7 @@ public class AllInOneTransformerTest
parameters = new HashMap<>();
parameters.put(TRANSFORM_NAME_PARAMETER, "html");
parameters.put(SOURCE_ENCODING, "UTF-8");
aioTransformer.transform(tmpS, tmpD, SOURCE_MIMETYPE, TARGET_MIMETYPE, parameters);
transformer.transform(tmpS, tmpD, SOURCE_MIMETYPE, TARGET_MIMETYPE, parameters);
assertEquals(expected, readFromFile(tmpD, "UTF-8"));
tmpS.delete();
tmpD.delete();
@@ -176,7 +185,7 @@ public class AllInOneTransformerTest
parameters = new HashMap<>();
parameters.put(TRANSFORM_NAME_PARAMETER, "html");
parameters.put(SOURCE_ENCODING, "UTF-16");
aioTransformer.transform(tmpS, tmpD, SOURCE_MIMETYPE, TARGET_MIMETYPE, parameters);
transformer.transform(tmpS, tmpD, SOURCE_MIMETYPE, TARGET_MIMETYPE, parameters);
assertEquals(expected, readFromFile(tmpD, "UTF-8"));
tmpS.delete();
tmpD.delete();
@@ -202,7 +211,7 @@ public class AllInOneTransformerTest
parameters = new HashMap<>();
parameters.put(TRANSFORM_NAME_PARAMETER, "html");
parameters.put(SOURCE_ENCODING, "ISO-8859-1");
aioTransformer.transform(tmpS, tmpD, SOURCE_MIMETYPE, TARGET_MIMETYPE, parameters);
transformer.transform(tmpS, tmpD, SOURCE_MIMETYPE, TARGET_MIMETYPE, parameters);
assertEquals(expected, readFromFile(tmpD, "UTF-8"));
tmpS.delete();
tmpD.delete();
@@ -257,9 +266,10 @@ public class AllInOneTransformerTest
// Transform to PDF
Map<String, String> parameters = new HashMap<>();
parameters.put(TRANSFORM_NAME_PARAMETER, "textToPdf");
parameters.put(PAGE_LIMIT, pageLimit);
aioTransformer.transform(sourceFile, targetFile, "text/plain", "application/pdf", parameters);
parameters.put(TRANSFORM_NAME_PARAMETER, "textToPdf");
Transformer transformer = aioTransformer.getByTransformName("textToPdf");
transformer.transform(sourceFile, targetFile, "text/plain", "application/pdf", parameters);
// Read back in the PDF and check it
PDDocument doc = PDDocument.load(targetFile);

View File

@@ -0,0 +1,80 @@
{
"transformOptions": {
"textToPdfOptions": [
{"value": {"name": "pageLimit"}},
{"value": {"name": "sourceEncoding"}}
],
"stringOptions": [
{"value": {"name": "sourceEncoding"}},
{"value": {"name": "targetEncoding"}}
],
"htmlOptions": [
{"value": {"name": "sourceEncoding"}}
]
},
"transformers": [
{
"transformerName": "html",
"supportedSourceAndTargetList": [
{"sourceMediaType": "text/html", "targetMediaType": "text/plain"}
],
"transformOptions": [
"htmlOptions"
]
},
{
"transformerName": "string",
"supportedSourceAndTargetList": [
{"sourceMediaType": "text/plain", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/mediawiki", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/css", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/csv", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/xml", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/html", "priority": 55, "targetMediaType": "text/plain"},
{"sourceMediaType": "text/richtext", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/sgml", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/tab-separated-values", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/x-setext", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/x-java-source", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/x-jsp", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/x-markdown", "targetMediaType": "text/plain"},
{"sourceMediaType": "text/calendar", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/x-javascript", "targetMediaType": "text/plain"},
{"sourceMediaType": "application/dita+xml", "targetMediaType": "text/plain"}
],
"transformOptions": [
"stringOptions"
]
},
{
"transformerName": "appleIWorks",
"supportedSourceAndTargetList": [
{"sourceMediaType": "application/vnd.apple.keynote", "targetMediaType": "image/jpeg"},
{"sourceMediaType": "application/vnd.apple.numbers", "targetMediaType": "image/jpeg"},
{"sourceMediaType": "application/vnd.apple.pages", "targetMediaType": "image/jpeg"}
],
"transformOptions": [
]
},
{
"transformerName": "textToPdf",
"supportedSourceAndTargetList": [
{"sourceMediaType": "text/plain", "priority": 55, "targetMediaType": "application/pdf"},
{"sourceMediaType": "text/csv", "targetMediaType": "application/pdf"},
{"sourceMediaType": "application/dita+xml", "targetMediaType": "application/pdf"},
{"sourceMediaType": "text/xml", "targetMediaType": "application/pdf"}
],
"transformOptions": [
"textToPdfOptions"
]
},
{
"transformerName": "rfc822",
"supportedSourceAndTargetList": [
{"sourceMediaType": "message/rfc822", "targetMediaType": "text/plain"}
],
"transformOptions": [
]
}
]
}

View File

@@ -0,0 +1,508 @@
{
"transformOptions": {
"tikaOptions": [
{"value": {"name": "targetEncoding"}}
],
"archiveOptions": [
{"value": {"name": "includeContents"}},
{"value": {"name": "targetEncoding"}}
],
"pdfboxOptions": [
{"value": {"name": "notExtractBookmarksText"}},
{"value": {"name": "targetEncoding"}}
]
},
"transformers": [
{
"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/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/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/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/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-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.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.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.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/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/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": "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": "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.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-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.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.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.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.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.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.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.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/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.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.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.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/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/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/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-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.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-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.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/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/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": "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": "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/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-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.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.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.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.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.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.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/vnd.oasis.opendocument.text", "priority": 55, "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/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.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.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.oasis.opendocument.spreadsheet-template", "priority": 55, "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.oasis.opendocument.text-template", "priority": 55, "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.apple.pages", "targetMediaType": "text/html"},
{"sourceMediaType": "application/vnd.apple.pages", "targetMediaType": "application/xhtml+xml"},
{"sourceMediaType": "application/vnd.apple.pages", "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/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.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", "priority": 55, "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", "priority": 55, "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

@@ -2,7 +2,7 @@
* #%L
* Alfresco Transform Core
* %%
* Copyright (C) 2005 - 200 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -