package org.umlg.sqlg.structure;

import org.apache.tinkerpop.gremlin.structure.io.AbstractIoRegistry;
import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo;
import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
import org.apache.tinkerpop.shaded.jackson.databind.module.SimpleModule;

/**
 * Date: 2015/05/07
 * Time: 8:05 PM
 */
public class SqlgIoRegistry extends AbstractIoRegistry {

    public SqlgIoRegistry() {
        final SimpleModule simpleModule = new SimpleModule();
        simpleModule.addSerializer(RecordId.class, new RecordId.RecordIdJacksonSerializer());
        simpleModule.addSerializer(SchemaTable.class, new SchemaTable.SchemaTableJacksonSerializer());
        register(GraphSONIo.class, null, simpleModule);
        register(GryoIo.class, RecordId.class, null);
    }
}

@@ -347,23 +347,16 @@
  PM%0A */%0A
-public 
 class Sq
@@ -407,13 +407,88 @@
    p
-ublic
+rivate static final SqlgIoRegistry INSTANCE = new SqlgIoRegistry();%0A%0A    private
  Sql
@@ -877,11 +877,92 @@
 );%0A    %7D
+%0A%0A    public static SqlgIoRegistry getInstance() %7B%0A        return INSTANCE;%0A    %7D
 %0A%7D%0A

add instance()