Closed dbenn closed 1 year ago
It may be necessary to add a series
property (as distinct from band
) for the purpose of filtering in order to be able to ask the question: is some observation in series X?
A method could be added to ValidObservation
such as:
boolean isMemberOf(SeriesType series) {
boolean isMember = false;
Map<SeriesType, List<ValidObservation>> obsMap = Mediator.getInstance().getValidObservationCategoryMap();
if (obsMap.containsKey(series)) {
isMember = obsMap.get(visibleType).contains(ob);
}
return isMember;
}
and a filtering operation could turn a search for observations in the "MyTestSeries"
series:
series = "MyTestSeries"
into:
isInSeries = isMemberOf(SeriesType.getSeriesFromDescription("MyTestSeries") || isMemberOf(SeriesType.getSeriesFromShortName("MyTestSeries")
Thoughts @mpyat2?
Hi @dbenn , I think a series attribute would be a good approach since in practice series having different JD meanings etc. that come from different sources may belong to the same band (filter).
This was fixed by making Mediator
aware of the new series in a way it was not (in its list of valid observations not just in the map of series to observation lists).
In #195, @mpyat2 commented (excerpt) that: New series created via "Create Series" are independent of the loaded data now. However, they behave differently...those new series seem not visible for filters created via "Simple filter...", "Vela Filter...", "Observer list filter...", and, probably, other filters (however, "Filter from plot" takes them)... At least this behavior should be documented somewhere.