Class CswTransformProvider
java.lang.Object
org.codice.ddf.spatial.ogc.csw.catalog.converter.CswTransformProvider
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter,com.thoughtworks.xstream.converters.ConverterMatcher
public class CswTransformProvider
extends Object
implements com.thoughtworks.xstream.converters.Converter
Class to determine what transformer to use based on the schema and transforms the data
appropriately.
-
Constructor Summary
ConstructorsConstructorDescriptionCswTransformProvider(TransformerManager metacardTransformers, TransformerManager inputTransformers) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvert(Class clazz) voidmarshal(Object o, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context) Marshals Metacards to an xml.unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) Creates a Metacard from the given XML.
-
Constructor Details
-
CswTransformProvider
public CswTransformProvider(TransformerManager metacardTransformers, TransformerManager inputTransformers)
-
-
Method Details
-
marshal
public void marshal(Object o, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context) Marshals Metacards to an xml. This method is not typically be called directly, instead it is called by another XStream Converter using MarshallingContext.convertAnother();- Specified by:
marshalin interfacecom.thoughtworks.xstream.converters.Converter- Parameters:
o- - metacard to transform.writer- - writes the XML.context- - the marshalling context. Should contain a map entry forCswConstants.TRANSFORMER_LOOKUP_KEYCswConstants.TRANSFORMER_LOOKUP_VALUEto identify which transformer to use. Also contains properties for any arguments to provide the transformer.
-
unmarshal
public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context) Creates a Metacard from the given XML. This method is not typically be called directly, instead it is called by another XStream Converter using UnmarshallingContext.convertAnother();- Specified by:
unmarshalin interfacecom.thoughtworks.xstream.converters.Converter- Parameters:
reader-context-- Returns:
-
canConvert
- Specified by:
canConvertin interfacecom.thoughtworks.xstream.converters.ConverterMatcher
-