/** * {@inheritDoc} * * <p>Creating a new query result with an empty binding to handle an empty BIND statement */ @Override public QueryResult process(final Dataset dataset) { final QueryResult queryResult = QueryResult.createInstance(); if (this.rdfGraph != null && this.rdfGraph.isVariable()) { final Variable graphConstraint = (Variable) this.rdfGraph; if (this.root.namedGraphs != null && this.root.namedGraphs.size() > 0) { // Convert the named graphs' names into URILiterals // to be applicable later on for (final String name : this.root.namedGraphs) { final Bindings graphConstraintBindings = this.bindingsFactory.createInstance(); try { graphConstraintBindings.add( graphConstraint, LiteralFactory.createURILiteralWithoutLazyLiteral(name)); } catch (final URISyntaxException e) { System.err.println(e); e.printStackTrace(); } queryResult.add(graphConstraintBindings); } } else { final Collection<Indices> dataSetIndices = dataset.getNamedGraphIndices(); if (dataSetIndices != null) { for (final Indices indices : dataSetIndices) { final Bindings graphConstraintBindings = this.bindingsFactory.createInstance(); graphConstraintBindings.add(graphConstraint, indices.getRdfName()); queryResult.add(graphConstraintBindings); } } } } else { queryResult.add(this.bindingsFactory.createInstance()); } return queryResult; }
public void makeDfta() { idx.genDelta(ftaId); idx.genFinalStates(ftaId); if (any) { idx.genDeltaAny(); } idx.buildIndices(); // idx.showIndices(); dftaStates(); System.out.println("Made states"); dftaTransitions(); }