Package ddf.catalog.transformer.xml
Class XmlResponseQueueTransformer
java.lang.Object
ddf.catalog.transformer.xml.AbstractXmlTransformer
ddf.catalog.transformer.xml.XmlResponseQueueTransformer
- All Implemented Interfaces:
ddf.catalog.transform.QueryResponseTransformer
public class XmlResponseQueueTransformer
extends AbstractXmlTransformer
implements ddf.catalog.transform.QueryResponseTransformer
Transforms a
SourceResponse object into Metacard Element XML text, which is GML 3.1.1.
compliant XML.-
Field Summary
FieldsFields inherited from class ddf.catalog.transformer.xml.AbstractXmlTransformer
MIME_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionXmlResponseQueueTransformer(org.codice.ddf.parser.Parser parser, PrintWriterProvider pwp, MetacardMarshaller mcm, javax.activation.MimeType mimeType) Constructs a transformer that will convert query responses to XML. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetThreshold(int threshold) ddf.catalog.data.BinaryContenttransform(ddf.catalog.operation.SourceResponse response, Map<String, Serializable> args) Methods inherited from class ddf.catalog.transformer.xml.AbstractXmlTransformer
getParser, getParserConfigurator
-
Field Details
-
BUFFER_SIZE
public static final int BUFFER_SIZE- See Also:
-
-
Constructor Details
-
XmlResponseQueueTransformer
public XmlResponseQueueTransformer(org.codice.ddf.parser.Parser parser, PrintWriterProvider pwp, MetacardMarshaller mcm, javax.activation.MimeType mimeType) Constructs a transformer that will convert query responses to XML. TheForkJoinPoolis used for splitting large collections ofMetacards into smaller collections for concurrent processing. Currently injected through Blueprint, if we choose to use fork-join for other tasks in the application, we should move the construction of the pool from its current location. Conversely, if we move to Java 8 we can simply use the newcommonPoolstatic method provided onForkJoinPool.
-
-
Method Details
-
setThreshold
public void setThreshold(int threshold) - Parameters:
threshold- the fork threshold: result lists smaller than this size will be processed serially; larger than this size will be processed in threshold-sized chunks in parallel
-
transform
public ddf.catalog.data.BinaryContent transform(ddf.catalog.operation.SourceResponse response, Map<String, Serializable> args) throws ddf.catalog.transform.CatalogTransformerException- Specified by:
transformin interfaceddf.catalog.transform.QueryResponseTransformer- Throws:
ddf.catalog.transform.CatalogTransformerException
-