Class GetRecordsResponseConverter

java.lang.Object
org.codice.ddf.spatial.ogc.csw.catalog.converter.GetRecordsResponseConverter
All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.ConverterMatcher

public class GetRecordsResponseConverter extends Object implements com.thoughtworks.xstream.converters.Converter
Converts a CswRecordCollection into a GetRecordsResponseType with CSW records
  • Constructor Summary

    Constructors
    Constructor
    Description
    GetRecordsResponseConverter(com.thoughtworks.xstream.converters.Converter transformProvider)
    Creates a new GetRecordsResponseConverter Object
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
     
    unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
    Parses GetRecordsResponse XML of this form:

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GetRecordsResponseConverter

      public GetRecordsResponseConverter(com.thoughtworks.xstream.converters.Converter transformProvider)
      Creates a new GetRecordsResponseConverter Object
      Parameters:
      transformProvider - The converter which will transform a Metacard to a the appropriate XML format and vice versa.
  • Method Details

    • canConvert

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

      public void marshal(Object source, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)
      Specified by:
      marshal in interface com.thoughtworks.xstream.converters.Converter
    • unmarshal

      public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
      Parses GetRecordsResponse XML of this form:

      
       <csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw">
           <csw:SearchStatus status="subset" timestamp="2013-05-01T02:13:36+0200"/>
           <csw:SearchResults elementSet="full" nextRecord="11"
               numberOfRecordsMatched="479" numberOfRecordsReturned="10"
               recordSchema="csw:Record">
               <csw:Record xmlns:csw="http://www.opengis.net/cat/csw">
               ...
               </csw:Record>
               <csw:Record xmlns:csw="http://www.opengis.net/cat/csw">
               ...
               </csw:Record>
      
       
      Specified by:
      unmarshal in interface com.thoughtworks.xstream.converters.Converter