private boolean overwriteExisting = true;
private boolean emptySecundumDetail = true;
-
-
public SecundumForSubtreeConfigurator(UUID subtreeUuid, Reference newSecundum, IRemotingProgressMonitor monitor, boolean includeRelations) {
super(subtreeUuid, monitor);
this.newSecundum = newSecundum;
return repository.getTransactionManager();
}
-
// TODO merge with CdmRepository#startTransaction() into common base class
protected void commitTransaction(TransactionStatus txStatus){
logger.debug("commiting transaction ...");
return txStatus;
}
-
protected Session getSession() {
return getDescriptionService().getSession();
}
for (DescriptionBase<?> descriptionBase : sourceDescriptions) {
DescriptionBase<?> sourceDescription = null;
if(descriptionBase.isInstanceOf(SpecimenDescription.class)){
- DescriptionBase<?> clone = (DescriptionBase<?>)descriptionBase.clone();
+ DescriptionBase<?> clone = descriptionBase.clone();
clone.removeDescriptiveDataSet(dataSet);
clone.getTypes().add(DescriptionType.CLONE_FOR_SOURCE);
SpecimenOrObservationBase<?> specimen = CdmBase.deproxy(descriptionBase, SpecimenDescription.class).getDescribedSpecimenOrObservation();
CategoricalData aggregatedCategoricalData = resultHolder.categoricalMap.get(cd.getFeature());
if(aggregatedCategoricalData==null){
// no CategoricalData with this feature in aggregation
- aggregatedCategoricalData = (CategoricalData) cd.clone();
+ aggregatedCategoricalData = cd.clone();
// set count to 1 if not set
aggregatedCategoricalData.getStateData().stream().filter(sd->sd.getCount()==null).forEach(sd->sd.incrementCount());
resultHolder.categoricalMap.put(aggregatedCategoricalData.getFeature(), aggregatedCategoricalData);
List<StateData> sdWithNoExistingStateInAggregation = cd.getStateData().stream().filter(sd->!statesOnly.contains(sd.getState())).collect(Collectors.toList());
for (StateData sd : sdWithNoExistingStateInAggregation) {
- StateData clone = (StateData) sd.clone();
+ StateData clone = sd.clone();
// set count to 1 if not set
if(clone.getCount()==null){
clone.incrementCount();
}
else{
// qd has only min, max, ... but no exact values
- aggQD = (QuantitativeData) sourceQd.clone();
+ aggQD = sourceQd.clone();
aggQD = handleMissingValues(aggQD);
}
return aggQD;
<ORIGINALSOURCEBASE DTYPE="SecundumSource" ID="4" SOURCEDTAXON_ID="39" UUID="e29d25c4-7e5f-4852-b400-dfbd87622de4" SOURCETYPE="PTS" CITATION_ID="2" />\r
<ORIGINALSOURCEBASE DTYPE="SecundumSource" ID="5" SOURCEDTAXON_ID="40" UUID="e81c3860-b681-4d91-9177-2e0d15f90350" SOURCETYPE="PTS" CITATION_ID="2" />\r
\r
- <TAXONBASE DTYPE="Taxon" ID="37" UUID="7b8b5cb3-37ba-4dba-91ac-4c6ffd6ac331" TITLECACHE="Acherontia styx Westwood, 1847 sec. cate-sphingidae.org" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="37"/>\r
- <TAXONBASE DTYPE="Taxon" ID="36" UUID="3b2b3e17-5c4a-4d1b-aa39-349f63100d6b" TITLECACHE="Acherontia(Fabricius, 1798)" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="36"/>\r
- <TAXONBASE DTYPE="Taxon" ID="38" UUID="bc09aca6-06fd-4905-b1e7-cbf7cc65d783" TITLECACHE="Acherontia lachesis (Fabricius, 1798)" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="38"/>\r
- <TAXONBASE DTYPE="Synonym" ID="39" UUID="3ef145f7-bd92-4a64-8afd-2b8203e00e02" TITLECACHE="Acheontitia ciprosus (Fabricius, 1797)" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="39" ACCEPTEDTAXON_ID="38" TYPE_ID="846"/>\r
- <TAXONBASE DTYPE="Synonym" ID="40" UUID="0b196c1a-5a1c-4a4b-a818-26a8d21b5c17" TITLECACHE="SynGenus" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="40" ACCEPTEDTAXON_ID="36" TYPE_ID="846"/>\r
+ <TAXONBASE DTYPE="Taxon" ID="37" UUID="7b8b5cb3-37ba-4dba-91ac-4c6ffd6ac331" TITLECACHE="Acherontia styx Westwood, 1847 sec. cate-sphingidae.org" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="37"/>\r
+ <TAXONBASE DTYPE="Taxon" ID="36" UUID="3b2b3e17-5c4a-4d1b-aa39-349f63100d6b" TITLECACHE="Acherontia(Fabricius, 1798)" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="36"/>\r
+ <TAXONBASE DTYPE="Taxon" ID="38" UUID="bc09aca6-06fd-4905-b1e7-cbf7cc65d783" TITLECACHE="Acherontia lachesis (Fabricius, 1798)" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="38"/>\r
+ <TAXONBASE DTYPE="Synonym" ID="39" UUID="3ef145f7-bd92-4a64-8afd-2b8203e00e02" TITLECACHE="Acheontitia ciprosus (Fabricius, 1797)" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="39" ACCEPTEDTAXON_ID="38" TYPE_ID="846"/>\r
+ <TAXONBASE DTYPE="Synonym" ID="40" UUID="0b196c1a-5a1c-4a4b-a818-26a8d21b5c17" TITLECACHE="SynGenus" PROTECTEDTITLECACHE="true" TAXONSTATUSUNKNOWN="false" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" NAME_ID="40" ACCEPTEDTAXON_ID="36" TYPE_ID="846"/>\r
\r
<TAXONNAME NAMETYPE="ICZN" ID="36" UUID="6d1d279a-d245-4b16-9049-44a2b028c303" TITLECACHE="Acherontia Westwood, 1847" PROTECTEDTITLECACHE="true" PARSINGPROBLEM="0" FULLTITLECACHE="" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="true" AUTHORSHIPCACHE="Westwood, 1847" NAMECACHE="Acherontia" PROTECTEDAUTHORSHIPCACHE="true" PROTECTEDNAMECACHE="true" ANAMORPHIC="false" BINOMHYBRID="false" HYBRIDFORMULA="false" MONOMHYBRID="false" TRINOMHYBRID="false" RANK_ID="774" GENUSORUNINOMIAL="Acherontia"/>\r
<TAXONNAME NAMETYPE="ICZN" ID="38" UUID="7969821b-a2cf-4d01-95ec-6a5ed0ca3f69" TITLECACHE="Acherontia lachesis (Fabricius, 1798)" PROTECTEDTITLECACHE="true" PARSINGPROBLEM="0" FULLTITLECACHE="" PROBLEMENDS="-1" PROBLEMSTARTS="-1" PROTECTEDFULLTITLECACHE="true" AUTHORSHIPCACHE="(Fabricius, 1798)" NAMECACHE="Acherontia lachesis" PROTECTEDAUTHORSHIPCACHE="true" PROTECTEDNAMECACHE="true" ANAMORPHIC="false" BINOMHYBRID="false" HYBRIDFORMULA="false" MONOMHYBRID="false" TRINOMHYBRID="false" RANK_ID="765" GENUSORUNINOMIAL="Acherontia" SPECIFICEPITHET="lachesis" />\r