// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/dialog/RegistryInputDialog.java
// public class TableUpdater {
// 	public void updateTable(ArrayList<TableMetadata> identified, String filterText) {
// 		if (!filterSelection.getText().equals(filterText)) {
// 			// don't update if the filterSelection text has changed.
// 			return;
// 		}
// 
// 		TableMetadataTableModel tableModel = new TableMetadataTableModel(identified);
// 		table = new JTable(tableModel);
// 		tableLabel.setText("Matching parts (" + identified.size() + ")");
// 
// 		refreshSearch = identified.size() >= SynBioHubQuery.QUERY_LIMIT;
// 		if (filterText != null && !refreshSearch) {
// 			cacheKey = filterText;
// 		}
// 		/*
// 		 * System.out.println(); System.out.println("TableUpdater");
// 		 * System.out.println("refreshSearch: " + refreshSearch);
// 		 * System.out.println("cacheKey: " + cacheKey); System.out.println(
// 		 * "filter: " + filterSelection.getText());
// 		 */
// 
// 		TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tableModel);
// 		table.setRowSorter(sorter);
// 		setWidthAsPercentages(table, tableModel.getWidths());
// 
// 		table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
// 		table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
// 			@Override
// 			public void valueChanged(ListSelectionEvent event) {
// 				setSelectAllowed(table.getSelectedRow() >= 0);
// 			}
// 		});
// 
// 		table.addMouseListener(new MouseAdapter() {
// 			public void mouseClicked(MouseEvent e) {
// 				if (e.getClickCount() == 2 && table.getSelectedRow() >= 0) {
// 					handleTableSelection(false);
// 				}
// 			}
// 		});
// 
// 		scroller.setViewportView(table);
// 	}
// }


import java.awt.Component;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.swing.SwingWorker;
import org.synbiohub.frontend.IdentifiedMetadata;
import org.synbiohub.frontend.SearchCriteria;
import org.synbiohub.frontend.SearchQuery;
import org.synbiohub.frontend.SynBioHubException;
import org.synbiohub.frontend.SynBioHubFrontend;
import edu.utah.ece.async.sboldesigner.sbol.editor.dialog.RegistryInputDialog.TableUpdater;
package edu.utah.ece.async.sboldesigner.sbol.editor.dialog;





public class SynBioHubQuery extends SwingWorker<Object, Object> {

	public static int QUERY_LIMIT = 10000;
	static SynBioHubQuery lastQuery = null;
	private boolean cancelled = false;

	SynBioHubFrontend synBioHub;
	Set<URI> roles;
	Set<URI> types;
	Set<URI> collections;
	String filterText;
// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/dialog/RegistryInputDialog.java
// public class TableUpdater {
// 	public void updateTable(ArrayList<TableMetadata> identified, String filterText) {
// 		if (!filterSelection.getText().equals(filterText)) {
// 			// don't update if the filterSelection text has changed.
// 			return;
// 		}
// 
// 		TableMetadataTableModel tableModel = new TableMetadataTableModel(identified);
// 		table = new JTable(tableModel);
// 		tableLabel.setText("Matching parts (" + identified.size() + ")");
// 
// 		refreshSearch = identified.size() >= SynBioHubQuery.QUERY_LIMIT;
// 		if (filterText != null && !refreshSearch) {
// 			cacheKey = filterText;
// 		}
// 		/*
// 		 * System.out.println(); System.out.println("TableUpdater");
// 		 * System.out.println("refreshSearch: " + refreshSearch);
// 		 * System.out.println("cacheKey: " + cacheKey); System.out.println(
// 		 * "filter: " + filterSelection.getText());
// 		 */
// 
// 		TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tableModel);
// 		table.setRowSorter(sorter);
// 		setWidthAsPercentages(table, tableModel.getWidths());
// 
// 		table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
// 		table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
// 			@Override
// 			public void valueChanged(ListSelectionEvent event) {
// 				setSelectAllowed(table.getSelectedRow() >= 0);
// 			}
// 		});
// 
// 		table.addMouseListener(new MouseAdapter() {
// 			public void mouseClicked(MouseEvent e) {
// 				if (e.getClickCount() == 2 && table.getSelectedRow() >= 0) {
// 					handleTableSelection(false);
// 				}
// 			}
// 		});
// 
// 		scroller.setViewportView(table);
// 	}
// }


// Path: src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/dialog/SynBioHubQuery.java
import java.awt.Component;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.swing.SwingWorker;
import org.synbiohub.frontend.IdentifiedMetadata;
import org.synbiohub.frontend.SearchCriteria;
import org.synbiohub.frontend.SearchQuery;
import org.synbiohub.frontend.SynBioHubException;
import org.synbiohub.frontend.SynBioHubFrontend;
import edu.utah.ece.async.sboldesigner.sbol.editor.dialog.RegistryInputDialog.TableUpdater;

package edu.utah.ece.async.sboldesigner.sbol.editor.dialog;





public class SynBioHubQuery extends SwingWorker<Object, Object> {

	public static int QUERY_LIMIT = 10000;
	static SynBioHubQuery lastQuery = null;
	private boolean cancelled = false;

	SynBioHubFrontend synBioHub;
	Set<URI> roles;
	Set<URI> types;
	Set<URI> collections;
	String filterText;
	TableUpdater tableUpdater;