if (line.hasOption(tailoringFile.getOpt())) {
String lineOpt = line.getOptionValue( tailoringFile.getOpt() );
if (lineOpt != null) {
try {
xccdfOptions.setTailoringInstance(new FileSourceContent(new File(lineOpt), xccdfOptions.isCleanupTempFiles()));
} catch (IOException e) {
throw new CommandLineException("invalid tailoring file: "+lineOpt, e);
}
}
}
if (xccdfOptions.isProcessCpeApplicability()) {
if (line.hasOption(cpeDictionary.getOpt())) {
String lineOpt = line.getOptionValue( cpeDictionary.getOpt() );
String text = ( lineOpt == null ) ? "" : lineOpt;
String[] cpeDicts = text.split(";");
List<SourceContext> cpeDictionaries = new ArrayList<SourceContext>(cpeDicts.length);
for (String cpeDict : cpeDicts) {
try {
cpeDictionaries.add(new FileSourceContent(new File(cpeDict), xccdfOptions.isCleanupTempFiles()));
} catch (IOException e) {
throw new CommandLineException("invalid CPE dictionary file: "+cpeDict, e);
}
}
xccdfOptions.setCpeDictionaries(cpeDictionaries);