[EoscDump] changed set of parameters

This commit is contained in:
Miriam Baglioni 2023-07-03 14:37:10 +02:00
parent 000c88dd79
commit b3a4abb12b
4 changed files with 7 additions and 24 deletions

View File

@ -47,6 +47,10 @@ public class QueryInformationSystem {
}
public CommunityMap getCommunityMap() throws ISLookUpException, DocumentException, SAXException {
return getCommunityMap(false, null);
}
public ISLookUpService getIsLookUp() {
return isLookUp;
}

View File

@ -71,23 +71,16 @@ public class SaveCommunityMap implements Serializable {
final String isLookUpUrl = parser.get("isLookUpUrl");
log.info("isLookUpUrl: {}", isLookUpUrl);
final Boolean singleCommunity = Optional
.ofNullable(parser.get("singleDeposition"))
.map(Boolean::valueOf)
.orElse(false);
final String community_id = Optional.ofNullable(parser.get("communityId")).orElse(null);
final SaveCommunityMap scm = new SaveCommunityMap(outputPath, nameNode, isLookUpUrl);
scm.saveCommunityMap(singleCommunity, community_id);
scm.saveCommunityMap();
}
private void saveCommunityMap(boolean singleCommunity, String communityId)
private void saveCommunityMap()
throws ISLookUpException, IOException, DocumentException, SAXException {
final String communityMapString = Utils.OBJECT_MAPPER
.writeValueAsString(queryInformationSystem.getCommunityMap(singleCommunity, communityId));
.writeValueAsString(queryInformationSystem.getCommunityMap());
log.info("communityMap {} ", communityMapString);
writer
.write(

View File

@ -18,18 +18,6 @@
"paramLongName": "outputPath",
"paramDescription": "the path used to store temporary output files",
"paramRequired": true
},
{
"paramName": "sd",
"paramLongName": "singleDeposition",
"paramDescription": "true if the dump should be created for a single community",
"paramRequired": true
},
{
"paramName": "ci",
"paramLongName": "communityId",
"paramDescription": "the id of the community for which to create the dump",
"paramRequired": true
}
]

View File

@ -96,8 +96,6 @@
<arg>--outputPath</arg><arg>${workingDir}/communityMap</arg>
<arg>--nameNode</arg><arg>${nameNode}</arg>
<arg>--isLookUpUrl</arg><arg>${isLookUpUrl}</arg>
<arg>--singleDeposition</arg><arg>false</arg>
<arg>--communityId</arg><arg>${communityId}</arg>
</java>
<ok to="fork_dump_eosc_result"/>
<error to="Kill"/>