Skip to content

Commit

Permalink
example of SPI
Browse files Browse the repository at this point in the history
  • Loading branch information
rfecher committed May 19, 2016
1 parent 2d3dba8 commit 5ca7288
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/test/ScalaDoubleSerializationProvider.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package test;

import mil.nga.giat.geowave.core.store.data.field.FieldReader;
import mil.nga.giat.geowave.core.store.data.field.FieldSerializationProviderSpi;
import mil.nga.giat.geowave.core.store.data.field.FieldWriter;
import scala.Double;

public class ScalaDoubleSerializationProvider implements FieldSerializationProviderSpi<scala.Double>
{

@Override public FieldReader<Double> getFieldReader() {
return null;
}

@Override public FieldWriter<Object, Double> getFieldWriter() {
return null;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test.ScalaDoubleSerializationProvider
19 changes: 19 additions & 0 deletions src/main/scala/ScalaDoubleSerializationProvider.scala
Original file line number Diff line number Diff line change
@@ -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] = ???
}

0 comments on commit 5ca7288

Please sign in to comment.