+
+ @Override
+ public void updateAvailableFilterOptions(String VIEWS_FILTER,
+ List<FilterOption> xtantOptions, Collection<FTSData> tdbEntries)
+ {
+ if (tdbEntries != null && lastTdbRequest != null)
+ {
+ boolean hasPDBe = false;
+ for (FTSData _row : tdbEntries)
+ {
+ // tdb returns custom object
+ TDB_FTSData row = (TDB_FTSData) _row;
+ String provider = row.getProvider();
+ FilterOption providerOpt = new FilterOption(
+ "3DB Provider - " + provider,
+ FILTER_SOURCE_PREFIX + provider, VIEWS_FILTER, false, this);
+ if (!xtantOptions.contains(providerOpt))
+ {
+ xtantOptions.add(1, providerOpt);
+ tdBeaconsFilters.add(FILTER_SOURCE_PREFIX + provider);
+ if ("PDBe".equalsIgnoreCase(provider))
+ {
+ hasPDBe = true;
+ }
+ }
+ }
+ if (!hasPDBe)
+ {
+ // remove the PDBe options from the available filters
+ int op = 0;
+ while (op < xtantOptions.size())
+ {
+ FilterOption filter = xtantOptions.get(op);
+ if (filter
+ .getQuerySource() instanceof PDBStructureChooserQuerySource)
+ {
+ xtantOptions.remove(op);
+ }
+ else
+ {
+ op++;
+ }
+ }
+ }
+ }
+
+ }
+