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

View File

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