Exemplo n.º 1
0
  /**
   * Controls the metadata extraction process flow
   *
   * @param args repository extract process parameters
   */
  public static void main(String[] args) {

    try {
      RequestProcessor processor = new RequestProcessor(args);
      request = processor.getRequest();
    } catch (Exception e) {
      logger.fatal(
          "{} thrown while processing command line arguments ({})",
          e.getClass().getCanonicalName(),
          e.getMessage());
      logger.fatal("Exiting...");
      return;
    }

    // UDML file is parsed
    new UDMLParser(request.getArg("udml"), request.getArg("rpdxml"));

    // Custom transformation
    if (request.isTransformationInvoked()) {
      XMLUtils.applyStylesheet(
          request.getArg("rpdxml"), request.getArg("stylesheet"), request.getArg("target"));
    }

    // transforms the RPD XML file into a bus matrix HTML page
    if (request.isBusMatrixInvoked()) {
      buildBusMatrix();
    }
  }
Exemplo n.º 2
0
  public static void buildBusMatrix() {
    MetadataExtract me = new MetadataExtract();
    InputStream busMatrixLogic =
        me.getInternalResource("obiee/udmlparser/bundledApps/BusMatrix.xsl");
    InputStream htmlOutput = me.getInternalResource("obiee/udmlparser/bundledApps/Output.xsl");

    logger.info("Generating Bus Matrix document...");

    XMLUtils.applyStylesheet(request.getArg("rpdxml"), busMatrixLogic, "temp.xml");
    XMLUtils.applyStylesheet("temp.xml", htmlOutput, request.getArg("target"));

    File temp = new File("temp.xml");
    logger.info("Cleaning up temporary file {}", temp.getAbsolutePath());
    temp.deleteOnExit();
  }