+ /**
+ * @param VIEWS_FILTER
+ * - a String key that can be used by the caller to tag the returned filter
+ * options to distinguish them in a collection
+ * @return list of FilterOption - convention is that the last one in the list
+ * will be constructed with 'addSeparator==true'
+ */
+ public abstract List<FilterOption> getAvailableFilterOptions(String VIEWS_FILTER);
+
+ /**
+ * construct a structure chooser query source for the given set of sequences
+ * @param selectedSeqs
+ * @return PDBe or 3DB query source
+ */
+ public static StructureChooserQuerySource getQuerySourceFor(
+ SequenceI[] selectedSeqs)
+ {
+ ThreeDBStructureChooserQuerySource tdbSource = new ThreeDBStructureChooserQuerySource();
+ boolean hasUniprot=false;
+ boolean hasNA=false,hasProtein=false;
+ for (SequenceI seq:selectedSeqs)
+ {
+ hasNA|=!seq.isProtein();
+ hasProtein |= seq.isProtein();
+ if (seq.isProtein())
+ {
+ String query = tdbSource.buildQuery(seq);
+ if (query!=null && query.length()>0)
+ {
+ hasUniprot=true;
+ }
+ }
+ }
+ if (hasProtein && hasUniprot && !hasNA)
+ {
+ return tdbSource;
+ }
+ return new PDBStructureChooserQuerySource();
+ }
+
+ /**
+ * some filter options may mean the original query needs to be executed again.
+ * @param selectedFilterOpt
+ * @return true if the fetchStructuresMetadata method needs to be called again
+ */
+ public abstract boolean needsRefetch(FilterOption selectedFilterOpt);
+
+
+
+ public void updateAvailableFilterOptions(String VIEWS_FILTER,
+ List<FilterOption> xtantOptions, Collection<FTSData> lastFTSData)
+ {
+ // TODO Auto-generated method stub
+
+ }}
\ No newline at end of file