From dc023568330949115a6825ca48d2c976aabe0334 Mon Sep 17 00:00:00 2001 From: Rich Fecher Date: Thu, 19 May 2016 08:24:42 -0400 Subject: [PATCH] example of SPI --- ...e.data.field.FieldSerializationProviderSpi | 1 + .../ScalaDoubleSerializationProvider.scala | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/main/resources/META-INF/services/mil.nga.giat.geowave.core.store.data.field.FieldSerializationProviderSpi create mode 100644 src/main/scala/ScalaDoubleSerializationProvider.scala diff --git a/src/main/resources/META-INF/services/mil.nga.giat.geowave.core.store.data.field.FieldSerializationProviderSpi b/src/main/resources/META-INF/services/mil.nga.giat.geowave.core.store.data.field.FieldSerializationProviderSpi new file mode 100644 index 0000000..116aca5 --- /dev/null +++ b/src/main/resources/META-INF/services/mil.nga.giat.geowave.core.store.data.field.FieldSerializationProviderSpi @@ -0,0 +1 @@ +com.example.ingest.vector.ScalaDoubleSerializationProvider \ No newline at end of file diff --git a/src/main/scala/ScalaDoubleSerializationProvider.scala b/src/main/scala/ScalaDoubleSerializationProvider.scala new file mode 100644 index 0000000..325f461 --- /dev/null +++ b/src/main/scala/ScalaDoubleSerializationProvider.scala @@ -0,0 +1,19 @@ +package com.example.ingest.vector + +import java.lang + +import mil.nga.giat.geowave.core.index.ByteArrayId +import mil.nga.giat.geowave.core.store.data.field.base.DoubleSerializationProvider +import mil.nga.giat.geowave.core.store.data.field.{FieldWriter, FieldReader, FieldSerializationProviderSpi} + +class ScalaDoubleSerializationProvider extends FieldSerializationProviderSpi[Double]{ + val delegate = new DoubleSerializationProvider + +// override def getFieldReader: FieldReader[lang.Double] = delegate.getFieldReader + +// override def getFieldWriter: FieldWriter[AnyRef, lang.Double] = delegate.getFieldWriter + override def getFieldWriter: FieldWriter[AnyRef, Double] = ??? + + + override def getFieldReader: FieldReader[Double] = ??? +}