no need to fetch from last going back for timeseries: they are already sorted
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@158990 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4e45429796
commit
1e277e8ed0
|
@ -182,7 +182,7 @@ public class CommonServiceUtils {
|
|||
// check if it is a time series, in this take the last X elements
|
||||
if(asList.get(0).getClass().equals(TimeSeriesBean.class)){
|
||||
elementsToConsider = Math.min(elementsToConsider, Constants.TIME_SERIES_TAKE_LAST_VALUES);
|
||||
for (int i = (asList.size() - elementsToConsider); i < asList.size(); i++) {
|
||||
for (int i = 0; i < elementsToConsider; i++) {
|
||||
String finalTag = asList.get(i).toString().trim().replaceAll(Constants.REGEX_TAGS, "");
|
||||
if(finalTag.length() <= TAG_MAX_SIZE)
|
||||
tags.add(finalTag);
|
||||
|
@ -288,8 +288,7 @@ public class CommonServiceUtils {
|
|||
// check if it is a time series, in this case take the last X elements
|
||||
if(asList.get(0).getClass().equals(TimeSeriesBean.class)){
|
||||
elementsToConsider = Math.min(elementsToConsider, Constants.TIME_SERIES_TAKE_LAST_VALUES);
|
||||
|
||||
for (int i = (asList.size() - elementsToConsider); i < asList.size(); i++) {
|
||||
for (int i = 0; i < elementsToConsider; i++) {
|
||||
// trim and remove html
|
||||
String clean = HelperMethods.removeHTML(asList.get(i).toString().trim());
|
||||
valuesForKey.add(clean);
|
||||
|
|
Loading…
Reference in New Issue