Examples of XmlFormatter


Examples of java.util.logging.XMLFormatter

      formatter.format(null);
      fail();
    } catch (NullPointerException e) {
    }

    formatter = new XMLFormatter();
    lr = new LogRecord(Level.SEVERE, null);
    String output = formatter.format(lr);
    // System.out.println(formatter.getHead(handler)+output+formatter.getTail(handler));
    assertTrue(output.indexOf("<message") > 0);
    }
View Full Code Here

Examples of java.util.logging.XMLFormatter

    log = Logger.getLogger(props.getProperty(prefix
        + "log.class"));
    try{
      FileHandler fh = new FileHandler(props.getProperty(prefix
          + "log.filename"));
      fh.setFormatter(new XMLFormatter());
      log.addHandler(fh);
    }catch (IOException e) {
      e.printStackTrace();
    }
   
View Full Code Here

Examples of lupos.endpoint.server.format.XMLFormatter

             */
            if (getP2PNetwork().supportsStreaming()) {
              /*
               * for streaming we use XML als formatter
               */
              final Formatter _formatter = new XMLFormatter();
              /*
               * create header and evaluate the subgraph
               */
              byte[] head = P2PInputStreamMessage.createHeader(
                  _answerId, true);
View Full Code Here

Examples of lupos.endpoint.server.format.XMLFormatter

    if(args.length<3 || args.length%2 == 0){
      System.err.println("Wrong number of arguments!");
    }
    final RDF3XQueryEvaluator evaluator = new RDF3XQueryEvaluator();
    evaluator.loadLargeScaleIndices(args[0]);
    final Formatter formatter = new XMLFormatter();
    ServiceApproaches.Semijoin_Approach.setup();
    for(int i=1; i<args.length; i+=2){
      final String query = FileHelper.readFile(args[i]);
      System.out.println("\nProcess SPARQL query:");
      System.out.println(query);
      final QueryResult queryResult = evaluator.getResult(query, true);
      System.out.println("\nSave result into file: "+args[i+1]);
      final OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(args[i+1]));
      formatter.writeResult(outputStream, evaluator.getVariablesOfQuery(), queryResult);
      outputStream.close();
      evaluator.writeOutIndexFileAndModifiedPages(args[0]);
      queryResult.release();
    }
    System.out.println("\nDone!");
View Full Code Here

Examples of lupos.endpoint.server.format.XMLFormatter

    Endpoint.registerStandardFormatter();
    Endpoint.registerStandardContexts(directory);
  }

  public static void registerStandardFormatter(){
    Endpoint.registerFormatter(new XMLFormatter());
    Endpoint.registerFormatter(new XMLFormatter(true));
    Endpoint.registerFormatter(new PlainFormatter());
    Endpoint.registerFormatter(new JSONFormatter());
    Endpoint.registerFormatter(new JSONFormatter(true));
    Endpoint.registerFormatter(new CSVFormatter());
    Endpoint.registerFormatter(new TSVFormatter());
View Full Code Here

Examples of lupos.endpoint.server.format.XMLFormatter

   * @return a tuple with the mime type of the serialized query result as well as the serialized query result in XML format
   * @throws JSONException
   * @throws IOException
   */
  public static Tuple<String, String> evaluateSubgraphAndReturnSerializedXMLResult(final String subgraphSerializedAsJSONString, final Dataset dataset, final IOperatorCreator operatorCreator) throws JSONException, IOException {
    return LocalExecutor.evaluateSubgraphAndReturnSerializedResult(subgraphSerializedAsJSONString, dataset, operatorCreator, new XMLFormatter());
  }
View Full Code Here

Examples of net.sf.jmatchparser.template.engine.formatter.XMLFormatter

  protected MatchTemplateImpl(Formatter[] formatters) throws IOException {
    addFormatters(new Formatter[] {
        new TrimFormatter(false),
        new TrimFormatter(true),
        new XMLFormatter(),
        new JTidyFormatter(false),
        new JTidyFormatter(true),
        new CSVFormatter() });
    addFormatters(new Formatter[] { new ChainedFormatter("html", getFormatter("jtidy+cleanspace"), getFormatter("xml")) });
    addFormatters(formatters);
View Full Code Here

Examples of org.apache.cactus.internal.server.runner.XMLFormatter

    protected String run(String theSuiteClassName, String theXslFileName,
        String theEncoding) throws ServletException
    {
        TestResult result = new TestResult();

        XMLFormatter formatter = new XMLFormatter();
        formatter.setXslFileName(theXslFileName);
        formatter.setSuiteClassName(theSuiteClassName);

        if (theEncoding != null)
        {
            formatter.setEncoding(theEncoding);
        }
       
        result.addListener(formatter);

        long startTime = System.currentTimeMillis();

        WebappTestRunner testRunner = new WebappTestRunner();

        Test suite = testRunner.getTest(theSuiteClassName);

        if (suite == null)
        {
            throw new ServletException("Failed to load test suite ["
                + theSuiteClassName + "], Reason is ["
                + testRunner.getErrorMessage() + "]");
        }

        // Run the tests
        suite.run(result);

        long endTime = System.currentTimeMillis();

        formatter.setTotalDuration(endTime - startTime);

        return formatter.toXML(result);
    }
View Full Code Here

Examples of org.apache.cactus.internal.server.runner.XMLFormatter

    protected String run(String theSuiteClassName, String theXslFileName,
        String theEncoding) throws ServletException
    {
        TestResult result = new TestResult();

        XMLFormatter formatter = new XMLFormatter();
        formatter.setXslFileName(theXslFileName);
        formatter.setSuiteClassName(theSuiteClassName);

        if (theEncoding != null)
        {
            formatter.setEncoding(theEncoding);
        }
       
        result.addListener(formatter);

        long startTime = System.currentTimeMillis();

        WebappTestRunner testRunner = new WebappTestRunner();

        Test suite = testRunner.getTest(theSuiteClassName);

        if (suite == null)
        {
            throw new ServletException("Failed to load test suite ["
                + theSuiteClassName + "], Reason is ["
                + testRunner.getErrorMessage() + "]");
        }

        // Run the tests
        suite.run(result);

        long endTime = System.currentTimeMillis();

        formatter.setTotalDuration(endTime - startTime);

        return formatter.toXML(result);
    }
View Full Code Here

Examples of org.apache.cactus.internal.server.runner.XMLFormatter

    protected String run(String theSuiteClassName, String theXslFileName,
        String theEncoding) throws ServletException
    {
        TestResult result = new TestResult();

        XMLFormatter formatter = new XMLFormatter();
        formatter.setXslFileName(theXslFileName);
        formatter.setSuiteClassName(theSuiteClassName);

        if (theEncoding != null)
        {
            formatter.setEncoding(theEncoding);
        }
       
        result.addListener(formatter);

        long startTime = System.currentTimeMillis();

        WebappTestRunner testRunner = new WebappTestRunner();

        Test suite = testRunner.getTest(theSuiteClassName);

        if (suite == null)
        {
            throw new ServletException("Failed to load test suite ["
                + theSuiteClassName + "], Reason is ["
                + testRunner.getErrorMessage() + "]");
        }

        // Run the tests
        suite.run(result);

        long endTime = System.currentTimeMillis();

        formatter.setTotalDuration(endTime - startTime);

        return formatter.toXML(result);
    }
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.