org.umlg.sqlg.groovy.plugin.SqlgPostgresGremlinPlugin Maven / Gradle / Ivy
package org.umlg.sqlg.groovy.plugin;
import org.apache.tinkerpop.gremlin.groovy.plugin.GremlinPlugin;
import org.apache.tinkerpop.gremlin.groovy.plugin.IllegalEnvironmentException;
import org.apache.tinkerpop.gremlin.groovy.plugin.PluginAcceptor;
import org.apache.tinkerpop.gremlin.groovy.plugin.PluginInitializationException;
import org.umlg.sqlg.structure.SqlgGraph;
import java.util.HashSet;
import java.util.Set;
/**
* Date: 2014/10/11
* Time: 9:55 AM
*/
public class SqlgPostgresGremlinPlugin implements GremlinPlugin {
private static final String IMPORT = "import ";
private static final String DOT_STAR = ".*";
private static final Set IMPORTS = new HashSet() {{
add(IMPORT + SqlgGraph.class.getPackage().getName() + DOT_STAR);
}};
@Override
public String getName() {
return "sqlg.postgres";
}
@Override
public void pluginTo(final PluginAcceptor pluginAcceptor) throws PluginInitializationException, IllegalEnvironmentException {
pluginAcceptor.addImports(IMPORTS);
}
}