Package pt.webdetails.cda

Examples of pt.webdetails.cda.CdaEngine


      Document cda = DocumentHelper.parseText(cdaString);

      final CdaSettings cdaSettings = new CdaSettings(cda, "cda1", null);

      log.debug("Doing query on Cda - Initializing CdaEngine");
      final CdaEngine engine = CdaEngine.getInstance();
      final QueryOptions queryOptions = new QueryOptions();
      queryOptions.setDataAccessId("1");
      queryOptions.setOutputType("json");
      log.info("Doing query");
      ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
      PrintStream printstream = new PrintStream(outputStream);
      engine.doQuery(printstream, cdaSettings, queryOptions);
      byte[] doc = outputStream.toByteArray();

      return Response.ok(doc, MediaType.APPLICATION_JSON).header(
          "content-length",doc.length).build();
View Full Code Here

TOP

Related Classes of pt.webdetails.cda.CdaEngine

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.