Examples of DatasetImpl


Examples of com.hp.hpl.jena.sparql.core.DatasetImpl

  if (model.getGraph() instanceof VirtGraph) {
    VirtuosoQueryExecution ret = new VirtuosoQueryExecution (query.toString(), (VirtGraph)model.getGraph());
          return ret;
  } else {
          return make(query, new DatasetImpl(model)) ;
  }
    }
View Full Code Here

Examples of org.dashbuilder.dataset.impl.DataSetImpl

import org.dashbuilder.dataset.impl.DataSetImpl;

public class JsObjectHelper {

    public static DataSet createDataSet(JsDataSet jsDataSet) {
        DataSetImpl dataSet = new DataSetImpl();
        dataSet.setColumns(createDataColumns(jsDataSet.getJsColumns()));
        return dataSet;
    }
View Full Code Here

Examples of org.dashbuilder.dataset.impl.DataSetImpl

        }
        return rawValue;
    }

    public DataSet toDataSet() throws ParseException {
        DataSetImpl dataSet = new DataSetImpl();
        for (int i = 0; i < columnIds.length; i++) {
            dataSet.addColumn(columnIds[i], getColumnType(types[i]));
            for (int j = 0; j < data.length; j++) {
                String[] row = data[j];
                Object value = parseValue(row[i], types[i]);
                dataSet.setValueAt(j, i, value);
            }
        }
        return dataSet;
    }
View Full Code Here

Examples of org.dashbuilder.dataset.impl.DataSetImpl

* Factory class for building DataSet instances.
*/
public final class DataSetFactory {

    public static DataSet newDataSet() {
        return new DataSetImpl();
    }
View Full Code Here

Examples of org.dashbuilder.dataset.impl.DataSetImpl

            }
            if (lastOp instanceof DataSetFilter) {
                return dataSet.trim(index.getRows());
            }
            if (lastOp instanceof DataSetSort) {
                DataSetImpl sortedDataSet = new DataSetImpl();
                for (DataColumn column : dataSet.getColumns()) {
                    SortedList sortedValues = new SortedList(column.getValues(), index.getRows());
                    sortedDataSet.addColumn(column.getId(), column.getColumnType(), sortedValues);
                }
                return sortedDataSet;
            }
            return dataSet;
        }
View Full Code Here

Examples of org.openrdf.query.impl.DatasetImpl

    if (dataset != null) {
      return dataset;
    }

    // No external dataset specified, use query's own dataset (if any)
    return new DatasetImpl(parsedQuery.getDefaultGraphs(), parsedQuery.getNamedGraphs());
  }
View Full Code Here

Examples of org.openrdf.query.impl.DatasetImpl

  }

  public EvaluationStrategyImpl(TripleSource tripleSource, QueryModel query) {
    this(tripleSource);
    if (!query.getDefaultGraphs().isEmpty() || !query.getNamedGraphs().isEmpty()) {
      this.dataset = new DatasetImpl(query.getDefaultGraphs(), query.getNamedGraphs());
    }
  }
View Full Code Here

Examples of org.openrdf.query.impl.DatasetImpl

   *         If DatasetClause does not contain a valid URI.
   */
  public static Dataset process(ASTQueryContainer qc)
    throws MalformedQueryException
  {
    DatasetImpl dataset = null;

    List<ASTDatasetClause> datasetClauses = qc.getQuery().getDatasetClauseList();

    if (!datasetClauses.isEmpty()) {
      dataset = new DatasetImpl();

      for (ASTDatasetClause dc : datasetClauses) {
        ASTIRI astIri = dc.jjtGetChild(ASTIRI.class);

        try {
          URI uri = new URIImpl(astIri.getValue());
          if (dc.isNamed()) {
            dataset.addNamedGraph(uri);
          }
          else {
            dataset.addDefaultGraph(uri);
          }
        }
        catch (IllegalArgumentException e) {
          throw new MalformedQueryException(e.getMessage(), e);
        }
View Full Code Here

Examples of org.openrdf.query.impl.DatasetImpl

    }
  }

  private <Q extends Query> Q initQuery(Q query) {
    if (readContexts.length > 0) {
      DatasetImpl ds = new DatasetImpl();
      for (URI graph : readContexts) {
        ds.addDefaultGraph(graph);
        ds.addNamedGraph(graph);
      }
      query.setDataset(ds);
    }

    query.setIncludeInferred(includeInferred);
View Full Code Here

Examples of org.openrdf.query.impl.DatasetImpl

      // Query named graphs
      namedGraphsQuery.setBinding("action", action);
      TupleResult namedGraphs = namedGraphsQuery.evaluate();

      DatasetImpl dataset = null;

      if (defaultGraphURI != null || namedGraphs.hasNext()) {
        dataset = new DatasetImpl();

        if (defaultGraphURI != null) {
          dataset.addDefaultGraph(defaultGraphURI);
        }

        while (namedGraphs.hasNext()) {
          BindingSet graphBindings = namedGraphs.next();
          URI namedGraphURI = (URI)graphBindings.getValue("graph");
          dataset.addNamedGraph(namedGraphURI);
        }
      }

      // Check for lax-cardinality conditions
      boolean laxCardinality = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.