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 Details

  • 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:
      marshal in interface com.thoughtworks.xstream.converters.Converter
      Parameters:
      o - - metacard to transform.
      writer - - writes the XML.
      context - - the marshalling context. Should contain a map entry for CswConstants.TRANSFORMER_LOOKUP_KEY CswConstants.TRANSFORMER_LOOKUP_VALUE to 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:
      unmarshal in interface com.thoughtworks.xstream.converters.Converter
      Parameters:
      reader -
      context -
      Returns:
    • canConvert

      public boolean canConvert(Class clazz)
      Specified by:
      canConvert in interface com.thoughtworks.xstream.converters.ConverterMatcher