engine = new GremlinScriptEngine();
graph = new OrientGraph(iCurrentRecord.getDatabase().getURL());
engine.getBindings(ScriptContext.ENGINE_SCOPE).put("g", graph);
}
final OrientElement graphElement;
if (document.getSchemaClass().isSubClassOf(OGraphDatabase.VERTEX_CLASS_NAME))
graphElement = new OrientVertex(graph, document);
else if (document.getSchemaClass().isSubClassOf(OGraphDatabase.VERTEX_CLASS_NAME))
graphElement = new OrientVertex(graph, document);