refactoring
This commit is contained in:
parent
54a12978d3
commit
4a7de07ea2
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue