"(input type = "+inputType+", file="+conceptsFile+")";
try {
loadConceptRows(modMap, conceptMap, input.getInputStream(conceptsFile));
} catch (NullPointerException e) {
log.error(message, e);
throw new ImportException(message, e);
} catch (IOException e) {
log.error(message, e);
throw new ImportException(message, e);
}
}
// Load relationships
Set<String> relationshipsFiles = input.getStatedRelationshipsFiles();
if(relationshipsFiles == null || relationshipsFiles.isEmpty()) {
relationshipsFiles = input.getRelationshipsFiles();
log.info("Reading inferred relationships info: " + relationshipsFiles.size());
} else {
log.info("Reading stated relationships info: " + relationshipsFiles.size());
}
if(relationshipsFiles == null || relationshipsFiles.isEmpty()) {
throw new ImportException("No relationships files was specified.");
}
for(String relationshipsFile : relationshipsFiles) {
final String message = "Unable to load relationships file. Please check your input configuration " +
"file. (input type = " + inputType+", file=" + relationshipsFile+")";
try {
loadRelationshipRows(modMap, relationshipMap, input.getInputStream(relationshipsFile));
} catch (NullPointerException e) {
log.error(message, e);
throw new ImportException(message, e);
} catch (IOException e) {
log.error(message, e);
throw new ImportException(message, e);
}
// Load concrete domains refsets
final Set<String> concreteDomainRefsetFiles = input.getConcreteDomainRefsetFiles();
log.info("Reading concrete domains reference set info: " + concreteDomainRefsetFiles.size());
for (String filename : concreteDomainRefsetFiles) {
try {
loadReferenceSet(input, filename, modMap, cdMap, IRefsetFactory.CD);
} catch (ArrayIndexOutOfBoundsException e) {
final String msg = "Error loading concrete domains reference set: " + filename +
". Possibly has wrong number of columns.";
log.error(msg, e);
throw new ImportException(msg, e);
}
}
}
VersionRows vr = new VersionRows(conceptMap.values(), relationshipMap.values(), cdMap.values());