package eu.dnetlib.dhp.contextpropagation

import com.fasterxml.jackson.databind.{ObjectMapper, SerializationFeature}
import eu.dnetlib.dhp.contextpropagation.model.{EnrichedEntries, RelationPropagation}
import eu.dnetlib.dhp.provision.scholix.Scholix
import eu.dnetlib.dhp.provision.scholix.summary.ScholixSummary
import org.apache.spark.sql.{Encoder, Encoders}

class PropagationTest extends java.io.Serializable {

  val m: ObjectMapper = new ObjectMapper()
  m.enable(SerializationFeature.INDENT_OUTPUT)

  implicit val scholixEncoder: Encoder[Scholix] = Encoders.kryo[Scholix]
  implicit val summaryEncoder: Encoder[ScholixSummary] = Encoders.kryo[ScholixSummary]
  implicit val propagationEncoder: Encoder[RelationPropagation] = Encoders.kryo[RelationPropagation]
  implicit val enrichedEncoder: Encoder[EnrichedEntries] = Encoders.kryo[EnrichedEntries]
  implicit val tupleForJoinEncoder: Encoder[(String, EnrichedEntries)] = Encoders.tuple(Encoders.STRING, enrichedEncoder)



}
