Esempio n. 1
0
  // @Exposed(accessLevel = AccessLevel.PUBLIC)
  public void listParameters(
      final OutputStream out,
      final String path,
      final String solution,
      final String file,
      final String outputType,
      final String dataAccessId)
      throws Exception {
    final CdaEngine engine = CdaEngine.getInstance();
    // final ICommonParameterProvider requestParams = requParam;
    final String relativePath = getRelativePath(path, solution, file);
    IRepositoryAccess repAccess = CdaEngine.getEnvironment().getRepositoryAccess();
    logger.debug("Do Query: getRelativePath:" + relativePath);
    final CdaSettings cdaSettings = SettingsManager.getInstance().parseSettingsFile(relativePath);

    // Handle the query itself and its output format...
    final DiscoveryOptions discoveryOptions = new DiscoveryOptions();
    discoveryOptions.setOutputType(outputType);
    discoveryOptions.setDataAccessId(dataAccessId);

    String mimeType =
        ExporterEngine.getInstance().getExporter(discoveryOptions.getOutputType()).getMimeType();
    setResponseHeaders(mimeType);

    engine.listParameters(out, cdaSettings, discoveryOptions);
  }
Esempio n. 2
0
  // @Exposed(accessLevel = AccessLevel.PUBLIC)
  public void getCdaList(final OutputStream out, final String outputType) throws Exception {
    final CdaEngine engine = CdaEngine.getInstance();

    final DiscoveryOptions discoveryOptions = new DiscoveryOptions();
    discoveryOptions.setOutputType(outputType);
    ISessionUtils sessionUtils = CdaEngine.getEnvironment().getSessionUtils();
    String mimeType =
        ExporterEngine.getInstance().getExporter(discoveryOptions.getOutputType()).getMimeType();
    setResponseHeaders(mimeType);
    engine.getCdaList(out, discoveryOptions, sessionUtils.getCurrentSession());
  }