use of org.mycore.common.content.transformer.MCRParameterizedTransformer in project mycore by MyCoRe-Org.
the class MCRLayoutService method transform.
private MCRContent transform(MCRContentTransformer transformer, MCRContent source, MCRParameterCollector parameter, String filename) throws IOException, TransformerException, SAXException {
LOGGER.debug("MCRLayoutService starts to output {}", getMimeType(transformer));
long start = System.currentTimeMillis();
try {
if (transformer instanceof MCRParameterizedTransformer) {
MCRParameterizedTransformer paramTransformer = (MCRParameterizedTransformer) transformer;
return paramTransformer.transform(source, parameter);
} else {
return transformer.transform(source);
}
} finally {
LOGGER.debug("MCRContent transformation took {} ms.", System.currentTimeMillis() - start);
}
}
Aggregations