* 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();
+ }
+
}
\ No newline at end of file