public ProgramVertexProgramStep(final Traversal.Admin traversal, final VertexProgram vertexProgram) { super(traversal); this.configuration = new HashMap<>(); final MapConfiguration base = new MapConfiguration(this.configuration); base.setDelimiterParsingDisabled(true); vertexProgram.storeState(base); this.toStringOfVertexProgram = vertexProgram.toString(); this.traverserRequirements = vertexProgram.getTraverserRequirements(); }
@Override public VertexProgram generateProgram(final Graph graph, final Memory memory) { final MapConfiguration base = new MapConfiguration(this.configuration); base.setDelimiterParsingDisabled(true); PureTraversal.storeState(base, ROOT_TRAVERSAL, TraversalHelper.getRootTraversal(this.getTraversal()).clone()); base.setProperty(STEP_ID, this.getId()); if (memory.exists(TraversalVertexProgram.HALTED_TRAVERSERS)) TraversalVertexProgram.storeHaltedTraversers(base, memory.get(TraversalVertexProgram.HALTED_TRAVERSERS)); return VertexProgram.createVertexProgram(graph, base); }
public ProgramVertexProgramStep(final Traversal.Admin traversal, final VertexProgram vertexProgram) { super(traversal); this.configuration = new HashMap<>(); final MapConfiguration base = new MapConfiguration(this.configuration); base.setDelimiterParsingDisabled(true); vertexProgram.storeState(base); this.toStringOfVertexProgram = vertexProgram.toString(); this.traverserRequirements = vertexProgram.getTraverserRequirements(); }
public SenseiServerBuilder(File confDir, Map<String, Object> properties) throws Exception { if (properties != null) { _senseiConfFile = null; _senseiConf = new MapConfiguration(properties); ((MapConfiguration) _senseiConf).setDelimiterParsingDisabled(true); } else { _senseiConfFile = new File(confDir, SENSEI_PROPERTIES); if (!_senseiConfFile.exists()) { throw new ConfigurationException("configuration file: " + _senseiConfFile.getAbsolutePath() + " does not exist."); } _senseiConf = new PropertiesConfiguration(); ((PropertiesConfiguration) _senseiConf).setDelimiterParsingDisabled(true); ((PropertiesConfiguration) _senseiConf).load(_senseiConfFile); } pluginRegistry = SenseiPluginRegistry.build(_senseiConf); pluginRegistry.start(); processRelevanceFunctionPlugins(pluginRegistry); processRelevanceExternalObjectPlugins(pluginRegistry); _gateway = pluginRegistry.getBeanByFullPrefix(SENSEI_GATEWAY, SenseiGateway.class); _schemaDoc = loadSchema(confDir); _senseiSchema = SenseiSchema.build(_schemaDoc); }
public SenseiServerBuilder(Resource confDir, Map<String, Object> properties) throws Exception { _senseiConfFile = null; _senseiConf = new MapConfiguration(properties); ((MapConfiguration) _senseiConf).setDelimiterParsingDisabled(true); pluginRegistry = SenseiPluginRegistry.build(_senseiConf); pluginRegistry.start(); processRelevanceFunctionPlugins(pluginRegistry); _gateway = pluginRegistry.getBeanByFullPrefix(SENSEI_GATEWAY, SenseiGateway.class); _schemaDoc = loadSchema(confDir); _senseiSchema = SenseiSchema.build(_schemaDoc); }
@Override public VertexProgram generateProgram(final Graph graph, final Memory memory) { final MapConfiguration base = new MapConfiguration(this.configuration); base.setDelimiterParsingDisabled(true); PureTraversal.storeState(base, ROOT_TRAVERSAL, TraversalHelper.getRootTraversal(this.getTraversal()).clone()); base.setProperty(STEP_ID, this.getId()); if (memory.exists(TraversalVertexProgram.HALTED_TRAVERSERS)) TraversalVertexProgram.storeHaltedTraversers(base, memory.get(TraversalVertexProgram.HALTED_TRAVERSERS)); return VertexProgram.createVertexProgram(graph, base); }