Class JCasDeserialiser


  • public class JCasDeserialiser
    extends java.lang.Object
    This class is responsible for deserialisation of the JCas from a JSON Map

    For full string deserialisation use JsonJCasConverter

    • Constructor Summary

      Constructors 
      Constructor Description
      JCasDeserialiser​(uk.gov.dstl.baleen.uima.UimaMonitor monitor, java.util.Collection<java.lang.Class<? extends uk.gov.dstl.baleen.types.BaleenAnnotation>> whiteList, java.util.Collection<java.lang.Class<? extends uk.gov.dstl.baleen.types.BaleenAnnotation>> blackList)
      Construct a JCasDeserialiser using the given UimaSupport, UimaMonitor and, optional, white and black lists to filter by.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deseralize​(org.apache.uima.jcas.JCas jCas, java.util.Map<java.lang.String,​java.lang.Object> input)
      Deserialise the given JSON map by populating the given JCas.
      • Methods inherited from class java.lang.Object

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

      • JCasDeserialiser

        public JCasDeserialiser​(uk.gov.dstl.baleen.uima.UimaMonitor monitor,
                                java.util.Collection<java.lang.Class<? extends uk.gov.dstl.baleen.types.BaleenAnnotation>> whiteList,
                                java.util.Collection<java.lang.Class<? extends uk.gov.dstl.baleen.types.BaleenAnnotation>> blackList)
        Construct a JCasDeserialiser using the given UimaSupport, UimaMonitor and, optional, white and black lists to filter by.

        NB: a null or empty filter list implies no filtering.

        Parameters:
        monitor - the UimaMonitor to use
        whiteList - given annotation classes (optional)
        blackList - given annotation classes (optional)
    • Method Detail

      • deseralize

        public void deseralize​(org.apache.uima.jcas.JCas jCas,
                               java.util.Map<java.lang.String,​java.lang.Object> input)
        Deserialise the given JSON map by populating the given JCas.
        Parameters:
        jCas - to populate
        input - to deserialise
        Throws:
        java.io.IOException - if there is an error while deserialising.