Examples of Result


Examples of spark.api.Result

      }
      throw e;
    }
    assert parser != null:"Could not find result parser";
   
    Result result = null;
    try {
      result = parser.parse(cmd, entity.getContent(), expectedType);
    } catch (IOException e) {
      throw new SparqlException("Error reading response from server", e);
    }
   
    if (result == null) {
      // Don't know how we got here, but parser should have returned a result or thrown an exception.
      throw new IllegalStateException("Could not parse result from server response.");
    }
   
    // Should never happen because the result format should have been validated against the expected
    // class when selecting the format to use for parsing, but check anyways.
    if (expectedType != null && !expectedType.getResultClass().isInstance(result)) {
      try {
        result.close();
      } catch (IOException e) {
        logger.warn("Error closing result of incorrect type", e);
      }
      throw new IllegalStateException("Result parsed from server response (" +
          result.getClass().getName() + ") does not match expected result type (" + expectedType + ")");
    }
   
    return result;
  }
View Full Code Here

Examples of test.core.Result

   * @param testSuiteProperties
   */
  public static void runTest(String testName, Properties testSuiteProperties) {
    String testDir = Util.TEST_ROOT + "/" + testName;
    Properties testProperties = Util.getProperties(new File(testDir, "Test.properties"));
    Result expected = getExpectedResult(testProperties);

    File tmpDir = setupTemporaryDirectory(testDir);

    // Write the dot graph specification
    String stdErr = dumpGraphSpec(testSuiteProperties, testProperties, tmpDir, testDir, expected);
View Full Code Here

Examples of voltcache.procedures.VoltCacheProcBase.Result

        else if (type == Type.DATA)
        {
            final VoltTable data = response.getResults()[0];
            if (data.getRowCount() > 0)
            {
                final Result result = Result.OK();
                result.data = new HashMap<String,VoltCacheItem>();
                while(data.advanceRow())
                    result.data.put(
                                     data.getString(0)
                                   , new VoltCacheItem(
                                                        data.getString(0)
                                                      , (int)data.getLong(1)
                                                      , data.getVarbinary(2)
                                                      , data.getLong(3)
                                                      , (int)data.getLong(4)
                                                      )
                                   );
                return result;
            }
            else
                return Result.NOT_FOUND();
        }
        else if (type == Type.IDOP)
        {
            final long value = response.getResults()[0].asScalarLong();
            if (value == VoltType.NULL_BIGINT)
                return Result.NOT_FOUND();
            else
            {
                final Result result = Result.OK();
                result.incrDecrValue = value;
                return result;
            }
        }
        else
View Full Code Here

Examples of wyautl.rw.IterativeRewriter.Result

        // an infinite loop of re-activations. More specifically, where
        // we activate on a state and rewrite it, but then it remains
        // and so we repeat.
        reachable = updateReachable(automaton, reachable);

        Result r = reduce(from,target,pivot);

        //System.out.println("\nAUTOMATON(AFTER): " + automaton);

        if(r == Result.TIMEOUT) {
          // Reduction timeout
View Full Code Here

Examples of xtc.parser.Result

   * @throws IOException Signals an I/O error.
   */
  private Result pBlockComment$$Choice1(final int yyStart)
    throws IOException {

    Result     yyResult;
    Node       yyValue;
    ParseError yyError = ParseError.DUMMY;

    // Alternative 1.

    yyResult = pDocComment(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 2.

    yyResult = pBlockComment(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 3.

    yyResult = pCommentTag(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 4.

    yyResult = pBlockCommentData(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Alternative 5.

    yyResult = pNl(yyStart);
    yyError  = yyResult.select(yyError);
    if (yyResult.hasValue()) {
      yyValue = yyResult.semanticValue();

      return yyResult.createValue(yyValue, yyError);
    }

    // Done.
    return yyError;
  }
View Full Code Here

Examples of yalp.mvc.results.Result

                // @Before
                handleBefores(request);

                // Action

                Result actionResult = null;
                String cacheKey = null;

                // Check the cache (only for GET or HEAD)
                if ((request.method.equals("GET") || request.method.equals("HEAD")) && actionMethod.isAnnotationPresent(CacheFor.class)) {
                    cacheKey = actionMethod.getAnnotation(CacheFor.class).id();
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.