T - output typepublic class XqjTransmogrifier<T> extends AbstractCachingXmlProcessor<javax.xml.xquery.XQPreparedExpression> implements org.openehealth.ipf.commons.core.modules.api.Transmogrifier<Source,T>
AbstractCachingXmlProcessor.Loader<S>RESOURCE_LOCATION| Constructor and Description |
|---|
XqjTransmogrifier() |
XqjTransmogrifier(Class<T> outputFormat) |
XqjTransmogrifier(Class<T> outputFormat,
ClassLoader classLoader) |
XqjTransmogrifier(Class<T> outputFormat,
ClassLoader classLoader,
Map<String,Object> globalParams) |
XqjTransmogrifier(Class<T> outputFormat,
Map<String,Object> globalParams) |
| Modifier and Type | Method and Description |
|---|---|
javax.xml.xquery.XQPreparedExpression |
createResource(Object... params)
Creates a ready-to-use resource (e.g.
|
protected ConcurrentMap<String,AbstractCachingXmlProcessor.Loader<javax.xml.xquery.XQPreparedExpression>> |
getCache() |
Map<String,Object> |
getStaticParams() |
protected javax.xml.xquery.XQPreparedExpression |
resource(Object... params)
This method had to be overridden because
XQPreparedExpression objects
are not thread-safe, thus an additional replication step is necessary. |
void |
setStaticParams(Map<String,Object> staticParams) |
T |
zap(Source source,
Object... params)
Converts a Source into a typed result using a XQuery processor.
|
resourceCacheKey, resourceContent, resourceLocation, resourceParameterspublic XqjTransmogrifier()
public XqjTransmogrifier(Class<T> outputFormat)
outputFormat - currently supported: String, Writer, OutputStreampublic XqjTransmogrifier(Class<T> outputFormat, ClassLoader classLoader)
outputFormat - currently supported: String, Writer, OutputStreamclassLoader - class loader for resource retrieval, may be nullpublic XqjTransmogrifier(Class<T> outputFormat, Map<String,Object> globalParams)
outputFormat - currently supported: String, Writer, OutputStreamglobalParams - static XQuery parameterspublic XqjTransmogrifier(Class<T> outputFormat, ClassLoader classLoader, Map<String,Object> globalParams)
outputFormat - currently supported: String, Writer, OutputStreamclassLoader - class loader for resource retrieval, may be nullglobalParams - static XQuery parametersprotected ConcurrentMap<String,AbstractCachingXmlProcessor.Loader<javax.xml.xquery.XQPreparedExpression>> getCache()
getCache in class AbstractCachingXmlProcessor<javax.xml.xquery.XQPreparedExpression>public T zap(Source source, Object... params)
The XQ resource location is mandatory in the first extra parameter. Other parameters may be passed as a Map in the second parameter.
protected javax.xml.xquery.XQPreparedExpression resource(Object... params) throws Exception
XQPreparedExpression objects
are not thread-safe, thus an additional replication step is necessary.resource in class AbstractCachingXmlProcessor<javax.xml.xquery.XQPreparedExpression>params - validator/transmogrifier parameters.Exceptionpublic javax.xml.xquery.XQPreparedExpression createResource(Object... params)
AbstractCachingXmlProcessorcreateResource in class AbstractCachingXmlProcessor<javax.xml.xquery.XQPreparedExpression>params - validator/transmogrifier parameters.Copyright © 2020 Open eHealth Foundation. All rights reserved.