ProductDB getProductDatabase() throws Exception { if (db == null) { db = ProductDB.instance(); } return db; }
private void removeProducts() throws SQLException { if (baseDir == null) { db.removeAllProducts(pm); } else { db.removeProducts(baseDir, pm); } }
public ProductQueryInterface getProductQueryInterface() { return DBProductQuery.instance(); } }
public void actionPerformed(final ActionEvent e) { try { final File mstFile = tableModel.getFileAt(0); if (mstFile.exists()) { final ProductEntry[] entryList = DBSearch.search(mstFile); for (ProductEntry entry : entryList) { if (tableModel.getIndexOf(entry.getFile()) < 0) tableModel.addFile(entry); } } } catch (Exception ex) { appContext.handleError("Unable to query DB", ex); } } });
private void updateMissionCombo() throws SQLException { missionJList.removeAll(); missionJList.setListData(SQLUtils.prependString(DBQuery.ALL_MISSIONS, productQueryInterface.getAllMissions())); }
public ProductEntry[] getProductEntryList() { return productQueryInterface.getProductEntryList(); }
public boolean isSelected(final int m) { return dbPane.getDBQuery().isMonthSelected(m); } }
private void setBaseDir(final File dir) { dbQuery.setBaseDir(dir); partialQuery(); }
void findSlices(final int dataTakeId) { metadataArea.setText(AbstractMetadata.data_take_id + '=' + dataTakeId); dbQuery.setSelectionRect(null); partialQuery(); metadataArea.setText(""); }
public void setSelected(final int m, final boolean selected) { dbPane.getDBQuery().setMonthSelected(m, selected); dbPane.partialQuery(); }
public void partialQuery() { setData(); try { if(productQueryInterface.partialQuery(dbQuery)) { notifyQuery(); } } catch (Exception e) { handleException(e); } }
private void performSelectAction() { updateStatusLabel(); final AOI[] selectedAOIs = getSelectedAOIs(); enableOnSelection(selectedAOIs.length > 0); final GeoPos[][] geoBoundaries = new GeoPos[selectedAOIs.length][4]; int i = 0; for (GeoPosList aoi : selectedAOIs) { geoBoundaries[i++] = aoi.getPoints(); } worldMapUI.setSelectedGeoBoundaries(geoBoundaries); }
public File[] getSelectedFiles() { final int[] selectedRows = getSelectedRows(); final File[] selectedFiles = new File[selectedRows.length]; for (int i = 0; i < selectedRows.length; i++) { final Object entry = getValueAt(selectedRows[i], 0); if (entry instanceof ProductEntry) { File file = ((ProductEntry) entry).getFile(); if(file != null) { selectedFiles[i] = file; } } } return selectedFiles; }
public void addFile(final ProductEntry entry) { fileList.add(entry.getFile()); clearBlankFile(); dataList.add(createFileStats(entry)); fireTableDataChanged(); }