sample.setFullname(sample.getFullname().replace("http://localhost:8080", repositoryURL));
}
String name = id + "_" + key + ".xml";
log.info("Storing profile");
CollectionProfile collectionProfile = plan.getSampleRecordsDefinition().getCollectionProfile();
this.storeProfile(name, bsData);
log.info("processing sample objects information");
RepositoryConnectorApi repo;
if (Helper.isRODAidentifier(repositoryURL)) {
RODAConnector roda = new RODAConnector();
Map<String,String> config = new HashMap<String,String>() {{
put(RODAConnector.ENDPOINT_KEY , repositoryURL);
put(RODAConnector.USER_KEY , repositoryUser);
put(RODAConnector.PASS_KEY , repositoryPassword);
}};
roda.updateConfig(config);
repo = roda;
} else {
repo = new SCAPEDataConnectorClient(repositoryURL, repositoryUser, repositoryPassword);
}
this.plan.getSampleRecordsDefinition().setSamplesDescription(description);
this.processSamples(repo, samples);
log.info("processing sample objects finished");
try {
CollectionProfile profile = this.plan.getSampleRecordsDefinition().getCollectionProfile();
profile.setCollectionID(id + "?" + key);
profile.setNumberOfObjects(count);
profile.setTypeOfObjects(typeOfObjects);
// TODO: confirm: why setting it when it was retrieved 4 lines above?
// this.plan.getSampleRecordsDefinition().setCollectionProfile(profile);
this.plan.getSampleRecordsDefinition().touch();
this.plan.touch();
} catch (Exception e) {