Package lupos.distributed.operator.format

Examples of lupos.distributed.operator.format.SubgraphContainerFormatter


     */
    Callable<QueryResult> c = new Callable<QueryResult>() {
      @Override
      public QueryResult call() throws Exception {
        //Get the processing result asynchron
        final SubgraphContainerFormatter serializer = new SubgraphContainerFormatter();
        try {
          final JSONObject serializedGraph = serializer
              .serialize(AsynchronSubgraphContainer.this
                  .getRootOfSubgraph(), 0);
          final QueryResult result = AsynchronSubgraphContainer.this.subgraphExecutor
              .evaluate(AsynchronSubgraphContainer.this.getKey(),
                  serializedGraph.toString(),bindingsFactory);
View Full Code Here


   *
   * @return the result of the query execution
   */
  @Override
  public QueryResult process(final Dataset dataset) {
    final SubgraphContainerFormatter serializer = new SubgraphContainerFormatter();
    try {
      final JSONObject serializedGraph = serializer.serialize(this.rootNodeOfSubGraph, 0);
      final QueryResult result = this.subgraphExecutor.evaluate(this.key,  serializedGraph.toString(),this.bindingsFactory);
      result.materialize(); // just for now read all from the stream sent by the endpoint, otherwise it may be blocked! (may be removed if each endpoint can work completely in parallel!)
      return result;
    } catch (final JSONException e) {
      System.err.println(e);
View Full Code Here

   * @return the query result and the set of variables of the query result of the evaluated operator graph
   * @throws JSONException in case of any parse exceptions
   */
  public static Tuple<QueryResult, Set<Variable>> evaluateSubgraph(final String subgraphSerializedAsJSONString, final Dataset dataset, final IOperatorCreator operatorCreator) throws JSONException {
    final CollectResult collectResult = new CollectResult(true);
    final SubgraphContainerFormatter formatter = new SubgraphContainerFormatter(dataset, operatorCreator, collectResult);
    final Root root = formatter.deserialize(new JSONObject(subgraphSerializedAsJSONString));

    // some initializations
    root.deleteParents();
    root.setParents();
    root.detectCycles();
View Full Code Here

   */
  private static Tuple<QueryResult, Set<Variable>> evaluateSubgraph(
      final String subgraphSerializedAsJSONString, final Dataset dataset,
      final IOperatorCreator operatorCreator, final ISubgraphExecutor<?> sgExecuter) throws JSONException {
    final CollectResult collectResult = new CollectResult(true);
    final SubgraphContainerFormatter formatter = new SubgraphContainerFormatter(dataset, operatorCreator, collectResult,sgExecuter);
    final Root root = formatter.deserialize(new JSONObject(subgraphSerializedAsJSONString));

    // some initializations
    root.deleteParents();
    root.setParents();
    root.detectCycles();
View Full Code Here

TOP

Related Classes of lupos.distributed.operator.format.SubgraphContainerFormatter

Copyright © 2018 www.massapicom. 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.