refactoring

This commit is contained in:
Miriam Baglioni 2020-06-25 16:32:40 +02:00
parent 54a12978d3
commit 4a7de07ea2
2 changed files with 14 additions and 14 deletions

View File

@ -110,13 +110,13 @@ public class CommunityConfigurationFactory {
}
private static List<ZenodoCommunity> parseZenodoCommunities(final Node node) {
final Node oacommunitynode = node.selectSingleNode("./oacommunity");
String oacommunity = null;
if (oacommunitynode != null) {
String tmp = oacommunitynode.getText();
if (StringUtils.isNotBlank(tmp))
oacommunity = tmp;
}
// final Node oacommunitynode = node.selectSingleNode("./oacommunity");
// String oacommunity = null;
// if (oacommunitynode != null) {
// String tmp = oacommunitynode.getText();
// if (StringUtils.isNotBlank(tmp))
// oacommunity = tmp;
// }
final List<Node> list = node.selectNodes("./zenodocommunities/zenodocommunity");
final List<ZenodoCommunity> zenodoCommunityList = new ArrayList<>();
@ -127,11 +127,11 @@ public class CommunityConfigurationFactory {
zenodoCommunityList.add(zc);
}
if (oacommunity != null) {
ZenodoCommunity zc = new ZenodoCommunity();
zc.setZenodoCommunityId(oacommunity);
zenodoCommunityList.add(zc);
}
// if (oacommunity != null) {
// ZenodoCommunity zc = new ZenodoCommunity();
// zc.setZenodoCommunityId(oacommunity);
// zenodoCommunityList.add(zc);
// }
log.info("size of the zenodo community list " + zenodoCommunityList.size());
return zenodoCommunityList;
}

View File

@ -44,7 +44,7 @@ public class Provider implements Serializable {
}
private void setSelCriteria(String json, VerbResolver resolver) {
log.info("Selection constraints for datasource = " + json);
log.debug("Selection constraints for datasource = " + json);
selectionConstraints = new Gson().fromJson(json, SelectionConstraints.class);
selectionConstraints.setSelection(resolver);
@ -54,7 +54,7 @@ public class Provider implements Serializable {
try {
setSelCriteria(n.getText(), resolver);
} catch (Exception e) {
log.info("not set selection criteria... ");
log.debug("not set selection criteria... ");
selectionConstraints = null;
}
}