Package no.unit.nva

Class PublicationMapper


  • public final class PublicationMapper
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <R extends WithContext>
      R
      convertValue​(Publication publication, com.fasterxml.jackson.databind.JsonNode context, java.lang.Class<R> responseType)
      Maps a publication and context to specified type.
      static <R extends WithContext>
      R
      convertValue​(Publication publication, java.lang.Class<R> responseType)
      Maps a publication to specified type with default context.
      • Methods inherited from class java.lang.Object

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

      • convertValue

        public static <R extends WithContext> R convertValue​(Publication publication,
                                                             com.fasterxml.jackson.databind.JsonNode context,
                                                             java.lang.Class<R> responseType)
        Maps a publication and context to specified type.
        Type Parameters:
        R - Type to be converted to.
        Parameters:
        publication - publication.
        context - jsonld context.
        responseType - Class to be converted to.
        Returns:
        publication response
      • convertValue

        public static <R extends WithContext> R convertValue​(Publication publication,
                                                             java.lang.Class<R> responseType)
        Maps a publication to specified type with default context.
        Type Parameters:
        R - Type to be converted to.
        Parameters:
        publication - publication.
        responseType - Class to be converted to.
        Returns:
        publication response