Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
GeoFilterPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2019 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.geolocation;
20 
22 import java.awt.Color;
23 import java.awt.Graphics;
24 import java.awt.event.ActionListener;
25 import java.awt.image.BufferedImage;
26 import java.sql.ResultSet;
27 import java.sql.SQLException;
28 import java.util.ArrayList;
29 import java.util.Collections;
30 import java.util.HashMap;
31 import java.util.List;
32 import java.util.Map;
33 import java.util.concurrent.ExecutionException;
34 import java.util.logging.Level;
35 import javafx.util.Pair;
36 import javax.swing.Icon;
37 import javax.swing.ImageIcon;
38 import javax.swing.SpinnerNumberModel;
39 import javax.swing.SwingWorker;
40 import org.openide.util.NbBundle.Messages;
43 import org.sleuthkit.datamodel.BlackboardArtifact;
44 import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE;
45 import org.sleuthkit.datamodel.BlackboardAttribute;
46 import org.sleuthkit.datamodel.DataSource;
47 import org.sleuthkit.datamodel.SleuthkitCase;
48 import org.sleuthkit.datamodel.TskCoreException;
49 
54 class GeoFilterPanel extends javax.swing.JPanel {
55 
56  final static String INITPROPERTY = "FilterPanelInitCompleted";
57 
58  private static final long serialVersionUID = 1L;
59  private static final Logger logger = Logger.getLogger(GeoFilterPanel.class.getName());
60 
61  private final SpinnerNumberModel numberModel;
62  private final CheckBoxListPanel<DataSource> dsCheckboxPanel;
63  private final CheckBoxListPanel<ARTIFACT_TYPE> atCheckboxPanel;
64 
65  private final Object initialFilterLock = new Object();
66  private GeoFilter initialFilter = null;
67 
68  // Make sure to update if other GPS artifacts are added
69  @SuppressWarnings("deprecation")
70  private static final ARTIFACT_TYPE[] GPS_ARTIFACT_TYPES = {
71  ARTIFACT_TYPE.TSK_GPS_BOOKMARK,
72  ARTIFACT_TYPE.TSK_GPS_LAST_KNOWN_LOCATION,
73  ARTIFACT_TYPE.TSK_GPS_ROUTE,
74  ARTIFACT_TYPE.TSK_GPS_SEARCH,
75  ARTIFACT_TYPE.TSK_GPS_TRACK,
76  ARTIFACT_TYPE.TSK_GPS_TRACKPOINT,
77  ARTIFACT_TYPE.TSK_METADATA_EXIF,
78  ARTIFACT_TYPE.TSK_GPS_AREA
79  };
80 
84  @Messages({
85  "GeoFilterPanel_DataSource_List_Title=Data Sources",
86  "GeoFilterPanel_ArtifactType_List_Title=Types"
87  })
88  @SuppressWarnings("unchecked")
89  GeoFilterPanel() {
90  // numberModel is used in initComponents
91  numberModel = new SpinnerNumberModel(10, 1, Integer.MAX_VALUE, 1);
92 
93  initComponents();
94 
95  dsCheckboxPanel = (CheckBoxListPanel<DataSource>) dsCBPanel;
96  dsCheckboxPanel.setPanelTitle(Bundle.GeoFilterPanel_DataSource_List_Title());
97  dsCheckboxPanel.setPanelTitleIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/image.png")));
98  dsCheckboxPanel.setSetAllSelected(true);
99 
100  atCheckboxPanel = (CheckBoxListPanel<ARTIFACT_TYPE>) atCBPanel;
101  atCheckboxPanel.setPanelTitle(Bundle.GeoFilterPanel_ArtifactType_List_Title());
102  atCheckboxPanel.setPanelTitleIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/extracted_content.png")));
103  atCheckboxPanel.setSetAllSelected(true);
104  }
105 
106  @Override
107  public void setEnabled(boolean enabled) {
108  applyButton.setEnabled(enabled);
109  mostRecentButton.setEnabled(enabled);
110  allButton.setEnabled(enabled);
111  showWaypointsWOTSCheckBox.setEnabled(enabled && mostRecentButton.isSelected());
112  dsCheckboxPanel.setEnabled(enabled);
113  atCheckboxPanel.setEnabled(enabled);
114  daysLabel.setEnabled(enabled);
115  daysSpinner.setEnabled(enabled);
116  }
117 
121  void updateDataSourceList() {
122  DataSourceUpdater updater = new DataSourceUpdater();
123  updater.execute();
124  }
125 
129  void clearDataSourceList() {
130  dsCheckboxPanel.clearList();
131  atCheckboxPanel.clearList();
132  }
133 
134  boolean hasDataSources() {
135  return !dsCheckboxPanel.isEmpty();
136  }
137 
143  void addActionListener(ActionListener listener) {
144  applyButton.addActionListener(listener);
145  }
146 
154  @Messages({
155  "GeoFilterPanel_empty_dataSource=Unable to apply filter, please select one or more data sources.",
156  "GeoFilterPanel_empty_artifactType=Unable to apply filter, please select one or more artifact types."
157  })
158  GeoFilter getFilterState() throws GeoLocationUIException {
159  List<DataSource> dataSources = dsCheckboxPanel.getSelectedElements();
160  if (dataSources.isEmpty()) {
161  throw new GeoLocationUIException(Bundle.GeoFilterPanel_empty_dataSource());
162  }
163 
164  List<ARTIFACT_TYPE> artifactTypes = atCheckboxPanel.getSelectedElements();
165  if (artifactTypes.isEmpty()) {
166  throw new GeoLocationUIException(Bundle.GeoFilterPanel_empty_artifactType());
167  }
168  return new GeoFilter(allButton.isSelected(),
169  showWaypointsWOTSCheckBox.isSelected(),
170  numberModel.getNumber().intValue(),
171  dataSources,
172  artifactTypes);
173  }
174 
182  void setupFilter(GeoFilter filter) {
183  if (filter == null) {
184  return;
185  }
186 
187  dsCheckboxPanel.setSelectedElements(filter.getDataSources() == null ? Collections.emptyList() : filter.getDataSources());
188  atCheckboxPanel.setSelectedElements(filter.getArtifactTypes() == null ? Collections.emptyList() : filter.getArtifactTypes());
189 
190  if (filter.showAllWaypoints()) {
191  allButton.setSelected(true);
192  } else {
193  mostRecentButton.setSelected(true);
194  }
195 
196  showWaypointsWOTSCheckBox.setSelected(filter.showWaypointsWithoutTimeStamp());
197  numberModel.setValue(filter.getMostRecentNumDays());
198  }
199 
208  void setInitialFilterState(GeoFilter filter) throws GeoLocationUIException {
209  synchronized (initialFilterLock) {
210  if (filter == null) {
211  throw new GeoLocationUIException("Unable to set filter state as no filter was provided.");
212  }
213 
214  initialFilter = filter;
215  }
216  }
217 
222  private void updateWaypointOptions() {
223  boolean selected = mostRecentButton.isSelected();
224  showWaypointsWOTSCheckBox.setEnabled(selected);
225  daysSpinner.setEnabled(selected);
226  }
227 
233  @SuppressWarnings("unchecked")
234  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
235  private void initComponents() {
236  java.awt.GridBagConstraints gridBagConstraints;
237 
238  javax.swing.ButtonGroup buttonGroup = new javax.swing.ButtonGroup();
239  javax.swing.JPanel waypointSettings = new javax.swing.JPanel();
240  allButton = new javax.swing.JRadioButton();
241  mostRecentButton = new javax.swing.JRadioButton();
242  showWaypointsWOTSCheckBox = new javax.swing.JCheckBox();
243  daysSpinner = new javax.swing.JSpinner(numberModel);
244  daysLabel = new javax.swing.JLabel();
245  showLabel = new javax.swing.JLabel();
246  javax.swing.JPanel buttonPanel = new javax.swing.JPanel();
247  applyButton = new javax.swing.JButton();
248  javax.swing.JLabel optionsLabel = new javax.swing.JLabel();
249  dsCBPanel = new CheckBoxListPanel<DataSource>();
250  atCBPanel = new CheckBoxListPanel<ARTIFACT_TYPE>();
251 
252  setMinimumSize(new java.awt.Dimension(10, 700));
253  setPreferredSize(new java.awt.Dimension(300, 700));
254  setLayout(new java.awt.GridBagLayout());
255 
256  waypointSettings.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.waypointSettings.border.title"))); // NOI18N
257  waypointSettings.setLayout(new java.awt.GridBagLayout());
258 
259  buttonGroup.add(allButton);
260  allButton.setSelected(true);
261  org.openide.awt.Mnemonics.setLocalizedText(allButton, org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.allButton.text")); // NOI18N
262  allButton.addActionListener(new java.awt.event.ActionListener() {
263  public void actionPerformed(java.awt.event.ActionEvent evt) {
264  allButtonActionPerformed(evt);
265  }
266  });
267  gridBagConstraints = new java.awt.GridBagConstraints();
268  gridBagConstraints.gridx = 0;
269  gridBagConstraints.gridy = 1;
270  gridBagConstraints.gridwidth = 4;
271  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
272  gridBagConstraints.weightx = 1.0;
273  waypointSettings.add(allButton, gridBagConstraints);
274 
275  buttonGroup.add(mostRecentButton);
276  org.openide.awt.Mnemonics.setLocalizedText(mostRecentButton, org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.mostRecentButton.text")); // NOI18N
277  mostRecentButton.addActionListener(new java.awt.event.ActionListener() {
278  public void actionPerformed(java.awt.event.ActionEvent evt) {
279  mostRecentButtonActionPerformed(evt);
280  }
281  });
282  gridBagConstraints = new java.awt.GridBagConstraints();
283  gridBagConstraints.gridx = 0;
284  gridBagConstraints.gridy = 2;
285  gridBagConstraints.gridwidth = 2;
286  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
287  waypointSettings.add(mostRecentButton, gridBagConstraints);
288 
289  org.openide.awt.Mnemonics.setLocalizedText(showWaypointsWOTSCheckBox, org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.showWaypointsWOTSCheckBox.text")); // NOI18N
290  showWaypointsWOTSCheckBox.setEnabled(false);
291  gridBagConstraints = new java.awt.GridBagConstraints();
292  gridBagConstraints.gridx = 1;
293  gridBagConstraints.gridy = 3;
294  gridBagConstraints.gridwidth = 3;
295  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
296  gridBagConstraints.insets = new java.awt.Insets(0, -20, 0, 5);
297  waypointSettings.add(showWaypointsWOTSCheckBox, gridBagConstraints);
298 
299  daysSpinner.setEnabled(false);
300  daysSpinner.setMaximumSize(new java.awt.Dimension(100, 26));
301  daysSpinner.setPreferredSize(new java.awt.Dimension(75, 26));
302  gridBagConstraints = new java.awt.GridBagConstraints();
303  gridBagConstraints.gridx = 2;
304  gridBagConstraints.gridy = 2;
305  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
306  waypointSettings.add(daysSpinner, gridBagConstraints);
307 
308  org.openide.awt.Mnemonics.setLocalizedText(daysLabel, org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.daysLabel.text")); // NOI18N
309  gridBagConstraints = new java.awt.GridBagConstraints();
310  gridBagConstraints.gridx = 3;
311  gridBagConstraints.gridy = 2;
312  gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
313  gridBagConstraints.weightx = 1.0;
314  gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 5);
315  waypointSettings.add(daysLabel, gridBagConstraints);
316 
317  org.openide.awt.Mnemonics.setLocalizedText(showLabel, org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.showLabel.text")); // NOI18N
318  showLabel.setToolTipText(org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.showLabel.toolTipText")); // NOI18N
319  gridBagConstraints = new java.awt.GridBagConstraints();
320  gridBagConstraints.gridx = 0;
321  gridBagConstraints.gridy = 0;
322  gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
323  waypointSettings.add(showLabel, gridBagConstraints);
324 
325  gridBagConstraints = new java.awt.GridBagConstraints();
326  gridBagConstraints.gridx = 0;
327  gridBagConstraints.gridy = 2;
328  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
329  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
330  gridBagConstraints.weightx = 1.0;
331  gridBagConstraints.insets = new java.awt.Insets(5, 15, 9, 25);
332  add(waypointSettings, gridBagConstraints);
333 
334  buttonPanel.setLayout(new java.awt.GridBagLayout());
335 
336  applyButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/tick.png"))); // NOI18N
337  org.openide.awt.Mnemonics.setLocalizedText(applyButton, org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.applyButton.text")); // NOI18N
338  gridBagConstraints = new java.awt.GridBagConstraints();
339  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
340  gridBagConstraints.weightx = 1.0;
341  buttonPanel.add(applyButton, gridBagConstraints);
342 
343  gridBagConstraints = new java.awt.GridBagConstraints();
344  gridBagConstraints.gridx = 0;
345  gridBagConstraints.gridy = 0;
346  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
347  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
348  gridBagConstraints.weightx = 1.0;
349  gridBagConstraints.insets = new java.awt.Insets(9, 15, 0, 25);
350  add(buttonPanel, gridBagConstraints);
351 
352  optionsLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/blueGeo16.png"))); // NOI18N
353  org.openide.awt.Mnemonics.setLocalizedText(optionsLabel, org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.optionsLabel.text")); // NOI18N
354  gridBagConstraints = new java.awt.GridBagConstraints();
355  gridBagConstraints.gridx = 0;
356  gridBagConstraints.gridy = 1;
357  gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
358  gridBagConstraints.insets = new java.awt.Insets(0, 15, 0, 0);
359  add(optionsLabel, gridBagConstraints);
360 
361  dsCBPanel.setMinimumSize(new java.awt.Dimension(150, 250));
362  dsCBPanel.setPreferredSize(new java.awt.Dimension(150, 250));
363  gridBagConstraints = new java.awt.GridBagConstraints();
364  gridBagConstraints.gridx = 0;
365  gridBagConstraints.gridy = 3;
366  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
367  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
368  gridBagConstraints.weighty = 1.0;
369  gridBagConstraints.insets = new java.awt.Insets(5, 15, 9, 25);
370  add(dsCBPanel, gridBagConstraints);
371 
372  atCBPanel.setMinimumSize(new java.awt.Dimension(150, 250));
373  atCBPanel.setPreferredSize(new java.awt.Dimension(150, 250));
374  gridBagConstraints = new java.awt.GridBagConstraints();
375  gridBagConstraints.gridx = 0;
376  gridBagConstraints.gridy = 4;
377  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
378  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
379  gridBagConstraints.weighty = 1.0;
380  gridBagConstraints.insets = new java.awt.Insets(5, 15, 9, 25);
381  add(atCBPanel, gridBagConstraints);
382  atCBPanel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(GeoFilterPanel.class, "GeoFilterPanel.atCBPanel.AccessibleContext.accessibleName")); // NOI18N
383  }// </editor-fold>//GEN-END:initComponents
384 
385  private void allButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allButtonActionPerformed
386  updateWaypointOptions();
387  }//GEN-LAST:event_allButtonActionPerformed
388 
389  private void mostRecentButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mostRecentButtonActionPerformed
390  updateWaypointOptions();
391  }//GEN-LAST:event_mostRecentButtonActionPerformed
392 
393 
394  // Variables declaration - do not modify//GEN-BEGIN:variables
395  private javax.swing.JRadioButton allButton;
396  private javax.swing.JButton applyButton;
397  private javax.swing.JPanel atCBPanel;
398  private javax.swing.JLabel daysLabel;
399  private javax.swing.JSpinner daysSpinner;
400  private javax.swing.JPanel dsCBPanel;
401  private javax.swing.JRadioButton mostRecentButton;
402  private javax.swing.JLabel showLabel;
403  private javax.swing.JCheckBox showWaypointsWOTSCheckBox;
404  // End of variables declaration//GEN-END:variables
405 
410  final private class Sources {
411 
412  final List<Pair<String, DataSource>> dataSources;
413  final Map<ARTIFACT_TYPE, Long> artifactTypes;
414 
415  private Sources(List<Pair<String, DataSource>> dataSources,
416  Map<ARTIFACT_TYPE, Long> artifactTypes) {
417  this.dataSources = dataSources;
418  this.artifactTypes = artifactTypes;
419  }
420  }
421 
428  final private class DataSourceUpdater extends SwingWorker<Sources, Void> {
429 
430  @Override
431  protected Sources doInBackground() throws Exception {
432  SleuthkitCase sleuthkitCase = Case.getCurrentCase().getSleuthkitCase();
433  List<Pair<String, DataSource>> validSources = new ArrayList<>();
434  HashMap<ARTIFACT_TYPE, Long> atCountsTotal = new HashMap<>();
435 
436  for (DataSource dataSource : sleuthkitCase.getDataSources()) {
437  Map<ARTIFACT_TYPE, Long> atCounts = getGPSDataSources(sleuthkitCase, dataSource);
438  if (!atCounts.isEmpty()) {
439  for (Map.Entry<ARTIFACT_TYPE, Long> entry : atCounts.entrySet()) {
440  atCountsTotal.putIfAbsent(entry.getKey(), 0L);
441  atCountsTotal.put(entry.getKey(), atCountsTotal.get(entry.getKey()) + entry.getValue());
442  }
443  String dsName = sleuthkitCase.getContentById(dataSource.getId()).getName();
444  Pair<String, DataSource> pair = new Pair<>(dsName, dataSource);
445  validSources.add(pair);
446  }
447  }
448  return new Sources(validSources, atCountsTotal);
449  }
450 
463  private long getGPSDataCount(SleuthkitCase sleuthkitCase,
464  DataSource dataSource, BlackboardArtifact.ARTIFACT_TYPE artifactType) throws TskCoreException {
465  long count = 0;
466  String queryStr
467  = "SELECT count(DISTINCT artIds) AS count FROM"
468  + " ("
469  + " SELECT arts.artifact_id as artIds, * FROM blackboard_artifacts as arts"
470  + " INNER JOIN blackboard_attributes as attrs"
471  + " ON attrs.artifact_id = arts.artifact_id"
472  + " WHERE arts.artifact_type_id = " + artifactType.getTypeID()
473  + " AND arts.data_source_obj_id = " + dataSource.getId()
474  + " AND arts.review_status_id != " + BlackboardArtifact.ReviewStatus.REJECTED.getID()
475  + " AND"
476  + " ("
477  + "attrs.attribute_type_id = " + BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID()
478  + " or attrs.attribute_type_id = " + BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE.getTypeID()
479  + " or attrs.attribute_type_id = " + BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_TRACKPOINTS.getTypeID()
480  + " or attrs.attribute_type_id = " + BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_WAYPOINTS.getTypeID()
481  + " or attrs.attribute_type_id = " + BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_AREAPOINTS.getTypeID()
482  + " )"
483  + " ) as innerTable";
484  try (SleuthkitCase.CaseDbQuery queryResult = sleuthkitCase.executeQuery(queryStr);
485  ResultSet resultSet = queryResult.getResultSet()) {
486  if (resultSet.next()) {
487  count = resultSet.getLong("count");
488  }
489  } catch (SQLException ex) {
490  Throwable cause = ex.getCause();
491  if (cause != null) {
492  logger.log(Level.SEVERE, cause.getMessage(), cause);
493  } else {
494  logger.log(Level.SEVERE, ex.getMessage(), ex);
495  }
496  }
497  return count;
498  }
499 
511  private Map<ARTIFACT_TYPE, Long> getGPSDataSources(SleuthkitCase sleuthkitCase, DataSource dataSource) throws TskCoreException {
512  HashMap<ARTIFACT_TYPE, Long> ret = new HashMap<>();
513  for (BlackboardArtifact.ARTIFACT_TYPE type : GPS_ARTIFACT_TYPES) {
514  long count = getGPSDataCount(sleuthkitCase, dataSource, type);
515  if (count > 0) {
516  ret.put(type, count);
517  }
518  }
519  return ret;
520  }
521 
530  private ImageIcon getImageIcon(int artifactTypeId) {
531  Color color = MapWaypoint.getColor(artifactTypeId);
532  BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
533 
534  Graphics g = img.createGraphics();
535  g.setColor(color);
536  g.fillRect(0, 0, 16, 16);
537  g.dispose();
538 
539  return new ImageIcon(img);
540  }
541 
542  @Override
543  public void done() {
544  Sources sources = null;
545  try {
546  sources = get();
547  } catch (InterruptedException | ExecutionException ex) {
548  Throwable cause = ex.getCause();
549  if (cause != null) {
550  logger.log(Level.SEVERE, cause.getMessage(), cause);
551  } else {
552  logger.log(Level.SEVERE, ex.getMessage(), ex);
553  }
554  }
555 
556  if (sources != null) {
557  for (Pair<String, DataSource> source : sources.dataSources) {
558  dsCheckboxPanel.addElement(source.getKey(), null, source.getValue());
559  }
560  for (Map.Entry<ARTIFACT_TYPE, Long> entry : sources.artifactTypes.entrySet()) {
561  String dispName = entry.getKey().getDisplayName() + " (" + entry.getValue() + ")";
562  Icon icon = getImageIcon(entry.getKey().getTypeID());
563  atCheckboxPanel.addElement(dispName, icon, entry.getKey());
564  }
565  }
566 
567  GeoFilter filter = null;
568  synchronized (GeoFilterPanel.this.initialFilterLock) {
569  filter = GeoFilterPanel.this.initialFilter;
570  GeoFilterPanel.this.initialFilter = null;
571  }
572 
573  if (filter != null) {
574  setupFilter(filter);
575  }
576 
577  GeoFilterPanel.this.firePropertyChange(INITPROPERTY, false, true);
578  }
579 
580  }
581 
582 }
Map< ARTIFACT_TYPE, Long > getGPSDataSources(SleuthkitCase sleuthkitCase, DataSource dataSource)
long getGPSDataCount(SleuthkitCase sleuthkitCase, DataSource dataSource, BlackboardArtifact.ARTIFACT_TYPE artifactType)
Sources(List< Pair< String, DataSource >> dataSources, Map< ARTIFACT_TYPE, Long > artifactTypes)

Copyright © 2012-2022 Basis Technology. Generated on: Tue Jun 27 2023
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.