private static void configureTransferCapability(ApplicationEntity ae,
CommandLine cl) throws IOException {
if (cl.hasOption("accept-unknown")) {
ae.addTransferCapability(
new TransferCapability(null,
"*",
TransferCapability.Role.SCP,
"*"));
} else {
Properties p = CLIUtils.loadProperties(
cl.getOptionValue("sop-classes",
"resource:sop-classes.properties"),
null);
for (String cuid : p.stringPropertyNames()) {
String ts = p.getProperty(cuid);
TransferCapability tc = new TransferCapability(null,
CLIUtils.toUID(cuid),
TransferCapability.Role.SCP,
CLIUtils.toUIDs(ts));
ae.addTransferCapability(tc);
}