Issue #1445 fix time range for accumulations
Former-commit-id: 590d927da3f051ed033c41bc0c89108a25826759
This commit is contained in:
parent
c3e9f40479
commit
144ddacb07
1 changed files with 11 additions and 11 deletions
|
@ -93,6 +93,9 @@ public class TimeRangeLevelNode extends AbstractAliasLevelNode {
|
|||
Set<AbstractRequestableData> records = new HashSet<AbstractRequestableData>();
|
||||
for (TimeAndSpace ast : availability) {
|
||||
Set<TimeAndSpace> needed = calculateNeededAvailability(ast);
|
||||
if (needed.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
Map<TimeAndSpace, MatchResult> matched = matcher.match(needed,
|
||||
dataMap.keySet());
|
||||
if (TimeAndSpaceMatcher.getAll1(matched).containsAll(needed)) {
|
||||
|
@ -123,12 +126,13 @@ public class TimeRangeLevelNode extends AbstractAliasLevelNode {
|
|||
Set<TimeAndSpace> goodAvail = new HashSet<TimeAndSpace>();
|
||||
for (TimeAndSpace ast : allAvail) {
|
||||
Set<TimeAndSpace> needed = calculateNeededAvailability(ast);
|
||||
Set<TimeAndSpace> matchedNeeded = TimeAndSpaceMatcher
|
||||
.getAll1(matcher.match(needed, allAvail));
|
||||
if (matchedNeeded.containsAll(needed)) {
|
||||
goodAvail.add(ast);
|
||||
if (!needed.isEmpty()) {
|
||||
Set<TimeAndSpace> matchedNeeded = TimeAndSpaceMatcher
|
||||
.getAll1(matcher.match(needed, allAvail));
|
||||
if (matchedNeeded.containsAll(needed)) {
|
||||
goodAvail.add(ast);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return goodAvail;
|
||||
}
|
||||
|
@ -139,14 +143,10 @@ public class TimeRangeLevelNode extends AbstractAliasLevelNode {
|
|||
AvailabilityContainer availabilityContainer) {
|
||||
TimeAndSpaceMatcher matcher = new TimeAndSpaceMatcher();
|
||||
matcher.setIgnoreRange(true);
|
||||
Set<TimeAndSpace> sourceAvailability = new HashSet<TimeAndSpace>(
|
||||
availability);
|
||||
Set<TimeAndSpace> sourceAvailability = new HashSet<TimeAndSpace>();
|
||||
for (TimeAndSpace ast : availability) {
|
||||
Set<TimeAndSpace> needed = calculateNeededAvailability(ast);
|
||||
Set<TimeAndSpace> matchedAvail = TimeAndSpaceMatcher
|
||||
.getAll1(matcher.match(needed, availability));
|
||||
sourceAvailability.addAll(matchedAvail);
|
||||
|
||||
sourceAvailability.addAll(needed);
|
||||
}
|
||||
Map<AbstractRequestableNode, Set<TimeAndSpace>> result = new HashMap<AbstractRequestableNode, Set<TimeAndSpace>>();
|
||||
result.put(sourceNode, sourceAvailability);
|
||||
|
|
Loading…
Add table
Reference in a new issue