Exemplo n.º 1
0
  private static String[] getCmdArrayForNextLevelNameFinder(String ifileName, String programName) {
    String[] cmdArray = new String[6];
    cmdArray[0] = OCSSW.getOcsswScriptPath();
    cmdArray[1] = "--ocsswroot";
    cmdArray[2] = OCSSW.getOcsswEnv();
    cmdArray[3] = NEXT_LEVEL_NAME_FINDER_PROGRAM_NAME;
    cmdArray[4] =
        RuntimeContext.getConfig()
                .getContextProperty(OCSSW.OCSSW_LOCATION_PROPERTY)
                .equals(OCSSW.SEADAS_OCSSW_LOCATION_LOCAL)
            ? ifileName
            : getIfileNameforRemoteServer(ifileName);

    cmdArray[5] = programName;
    return cmdArray;
  }
Exemplo n.º 2
0
  public static String findNextLevelFileName(String ifileName, String programName, String suite) {
    if (ifileName == null || programName == null) {
      return null;
    }
    if (programName.equals("l3bindump")) {
      return ifileName + ".xml";
    }
    debug("Program name is " + programName);
    Debug.assertNotNull(ifileName);
    // todo Add suite, also check calling program the make sure ProcessorModel call is right

    String[] cmdArray = new String[6];
    cmdArray[0] = OCSSW.getOcsswScriptPath();
    cmdArray[1] = "--ocsswroot";
    cmdArray[2] = OCSSW.getOcsswEnv();
    cmdArray[3] = NEXT_LEVEL_NAME_FINDER_PROGRAM_NAME;
    cmdArray[4] =
        RuntimeContext.getConfig()
                .getContextProperty(OCSSW.OCSSW_LOCATION_PROPERTY)
                .equals(OCSSW.SEADAS_OCSSW_LOCATION_LOCAL)
            ? ifileName
            : getIfileNameforRemoteServer(ifileName);
    cmdArray[5] = programName;
    // cmdArray[6] = "--suite="+suite;

    String ifileDir =
        ifileName.substring(0, ifileName.lastIndexOf(System.getProperty("file.separator")));

    if (RuntimeContext.getConfig()
        .getContextProperty(OCSSW.OCSSW_LOCATION_PROPERTY)
        .equals(OCSSW.SEADAS_OCSSW_LOCATION_LOCAL)) {
      return retrieveOFileNameLocal(cmdArray, ifileDir);
    } else {
      return retrieveOFileNameRemote(cmdArray);
    }
  }