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();
  }
  /**
   * 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();
    }
  }
 /**
  * Indicates whether the Bus Matrix generation app has been invoked
  *
  * @return true if the BusMatrix app has been invoked, false otherwise.
  */
 public static boolean isBusMatrixInvoked() {
   return request.isBusMatrixInvoked();
 }