mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 08:26:15 +00:00
refactor and rename
This commit is contained in:
parent
143aabd6e0
commit
e6fc2df6da
@ -45,7 +45,7 @@ public final class Installer extends ModuleInstall {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restored() {
|
public void restored() {
|
||||||
GeolocationSummary summary = GeolocationSummary.getInstance();
|
WhereUsedSummary summary = WhereUsedSummary.getInstance();
|
||||||
try {
|
try {
|
||||||
summary.load();
|
summary.load();
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
@ -56,7 +56,7 @@ import org.sleuthkit.datamodel.DataSource;
|
|||||||
@Messages({
|
@Messages({
|
||||||
"GeolocationSummary_cities_noRecordFound=Other"
|
"GeolocationSummary_cities_noRecordFound=Other"
|
||||||
})
|
})
|
||||||
public class GeolocationSummary implements DefaultArtifactUpdateGovernor {
|
public class WhereUsedSummary implements DefaultArtifactUpdateGovernor {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A count of hits for a particular city.
|
* A count of hits for a particular city.
|
||||||
@ -197,14 +197,14 @@ public class GeolocationSummary implements DefaultArtifactUpdateGovernor {
|
|||||||
.map(artifactType -> artifactType.getTypeID())
|
.map(artifactType -> artifactType.getTypeID())
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
private static GeolocationSummary instance = null;
|
private static WhereUsedSummary instance = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The singleton instance of this class.
|
* @return The singleton instance of this class.
|
||||||
*/
|
*/
|
||||||
public static GeolocationSummary getInstance() {
|
public static WhereUsedSummary getInstance() {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
instance = new GeolocationSummary();
|
instance = new WhereUsedSummary();
|
||||||
}
|
}
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
@ -217,8 +217,8 @@ public class GeolocationSummary implements DefaultArtifactUpdateGovernor {
|
|||||||
/**
|
/**
|
||||||
* Main constructor.
|
* Main constructor.
|
||||||
*/
|
*/
|
||||||
private GeolocationSummary() {
|
private WhereUsedSummary() {
|
||||||
this(SleuthkitCaseProvider.DEFAULT, Logger.getLogger(GeolocationSummary.class.getName()));
|
this(SleuthkitCaseProvider.DEFAULT, Logger.getLogger(WhereUsedSummary.class.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -226,7 +226,7 @@ public class GeolocationSummary implements DefaultArtifactUpdateGovernor {
|
|||||||
*
|
*
|
||||||
* @param provider The means of obtaining a sleuthkit case.
|
* @param provider The means of obtaining a sleuthkit case.
|
||||||
*/
|
*/
|
||||||
public GeolocationSummary(SleuthkitCaseProvider provider, java.util.logging.Logger logger) {
|
public WhereUsedSummary(SleuthkitCaseProvider provider, java.util.logging.Logger logger) {
|
||||||
this.provider = provider;
|
this.provider = provider;
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
}
|
}
|
||||||
@ -306,7 +306,7 @@ public class GeolocationSummary implements DefaultArtifactUpdateGovernor {
|
|||||||
* Pre-loads city data.
|
* Pre-loads city data.
|
||||||
*/
|
*/
|
||||||
public void load() throws IOException {
|
public void load() throws IOException {
|
||||||
latLngMap = new LatLngMap<CityRecord>(parseCsvLines(GeolocationSummary.class.getResourceAsStream("worldcities.csv"), true));
|
latLngMap = new LatLngMap<CityRecord>(parseCsvLines(WhereUsedSummary.class.getResourceAsStream("worldcities.csv"), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static CityRecord OTHER_RECORD = new CityRecord(Bundle.GeolocationSummary_cities_noRecordFound(), "", 0, 0);
|
private static CityRecord OTHER_RECORD = new CityRecord(Bundle.GeolocationSummary_cities_noRecordFound(), "", 0, 0);
|
@ -42,4 +42,5 @@ RecentFilesPanel.attachmentLabel.text=Recent Attachments
|
|||||||
PastCasesPanel.notableFileLabel.text=Cases with Common Items That Were Tagged as Notable
|
PastCasesPanel.notableFileLabel.text=Cases with Common Items That Were Tagged as Notable
|
||||||
PastCasesPanel.sameIdLabel.text=Past Cases with the Same Device IDs
|
PastCasesPanel.sameIdLabel.text=Past Cases with the Same Device IDs
|
||||||
DataSourceSummaryTabbedPane.noDataSourceLabel.text=No data source has been selected.
|
DataSourceSummaryTabbedPane.noDataSourceLabel.text=No data source has been selected.
|
||||||
GeolocationPanel.cityCountsLabel.text=Cities
|
WhereUsedPanel.cityCountsLabel.text=Cities
|
||||||
|
WhereUsedPanel.viewInGeolocationBtn.text=View In Geolocation
|
||||||
|
@ -39,7 +39,7 @@ import org.sleuthkit.datamodel.DataSource;
|
|||||||
"DataSourceSummaryTabbedPane_recentFileTab_title=Recent Files",
|
"DataSourceSummaryTabbedPane_recentFileTab_title=Recent Files",
|
||||||
"DataSourceSummaryTabbedPane_pastCasesTab_title=Past Cases",
|
"DataSourceSummaryTabbedPane_pastCasesTab_title=Past Cases",
|
||||||
"DataSourceSummaryTabbedPane_analysisTab_title=Analysis",
|
"DataSourceSummaryTabbedPane_analysisTab_title=Analysis",
|
||||||
"DataSourceSummaryTabbedPane_geolocationTab_title=Geolocation"
|
"DataSourceSummaryTabbedPane_whereUsedTab_title=Where Used"
|
||||||
})
|
})
|
||||||
public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
|||||||
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_analysisTab_title(), new AnalysisPanel()),
|
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_analysisTab_title(), new AnalysisPanel()),
|
||||||
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_recentFileTab_title(), new RecentFilesPanel()),
|
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_recentFileTab_title(), new RecentFilesPanel()),
|
||||||
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_pastCasesTab_title(), new PastCasesPanel()),
|
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_pastCasesTab_title(), new PastCasesPanel()),
|
||||||
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_geolocationTab_title(), new GeolocationPanel()),
|
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_whereUsedTab_title(), new WhereUsedPanel()),
|
||||||
// do nothing on closing
|
// do nothing on closing
|
||||||
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_ingestHistoryTab_title(), ingestHistoryPanel, ingestHistoryPanel::setDataSource, () -> {
|
new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_ingestHistoryTab_title(), ingestHistoryPanel, ingestHistoryPanel::setDataSource, () -> {
|
||||||
}),
|
}),
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
<Component class="javax.swing.JLabel" name="cityCountsLabel">
|
<Component class="javax.swing.JLabel" name="cityCountsLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties" key="GeolocationPanel.cityCountsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties" key="WhereUsedPanel.cityCountsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
<AccessibilityProperties>
|
<AccessibilityProperties>
|
||||||
@ -128,43 +128,12 @@
|
|||||||
|
|
||||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||||
</Container>
|
</Container>
|
||||||
<Component class="javax.swing.Box$Filler" name="filler2">
|
<Component class="javax.swing.JButton" name="viewInGeolocationBtn">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<Dimension value="[0, 20]"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties" key="WhereUsedPanel.viewInGeolocationBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[0, 20]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[0, 20]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="alignmentX" type="float" value="0.0"/>
|
|
||||||
</Properties>
|
</Properties>
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
|
||||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalStrut"/>
|
|
||||||
</AuxValues>
|
|
||||||
</Component>
|
|
||||||
<Component class="javax.swing.Box$Filler" name="filler3">
|
|
||||||
<Properties>
|
|
||||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[0, 2]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[0, 2]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
|
||||||
<Dimension value="[0, 2]"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="alignmentX" type="float" value="0.0"/>
|
|
||||||
</Properties>
|
|
||||||
<AuxValues>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
|
|
||||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
|
||||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.VerticalStrut"/>
|
|
||||||
</AuxValues>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.Box$Filler" name="filler5">
|
<Component class="javax.swing.Box$Filler" name="filler5">
|
||||||
<Properties>
|
<Properties>
|
@ -22,9 +22,9 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.sleuthkit.autopsy.datasourcesummary.datamodel.GeolocationSummary;
|
import org.sleuthkit.autopsy.datasourcesummary.datamodel.WhereUsedSummary;
|
||||||
import org.sleuthkit.autopsy.datasourcesummary.datamodel.GeolocationSummary.CityCount;
|
import org.sleuthkit.autopsy.datasourcesummary.datamodel.WhereUsedSummary.CityCount;
|
||||||
import org.sleuthkit.autopsy.datasourcesummary.datamodel.GeolocationSummary.CityRecord;
|
import org.sleuthkit.autopsy.datasourcesummary.datamodel.WhereUsedSummary.CityRecord;
|
||||||
import org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.DefaultCellModel;
|
import org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.DefaultCellModel;
|
||||||
import org.sleuthkit.autopsy.datasourcesummary.uiutils.DataFetchWorker;
|
import org.sleuthkit.autopsy.datasourcesummary.uiutils.DataFetchWorker;
|
||||||
import org.sleuthkit.autopsy.datasourcesummary.uiutils.DataFetchWorker.DataFetchComponents;
|
import org.sleuthkit.autopsy.datasourcesummary.uiutils.DataFetchWorker.DataFetchComponents;
|
||||||
@ -37,11 +37,11 @@ import org.sleuthkit.datamodel.DataSource;
|
|||||||
* A tab shown in data source summary displaying information about a data source's geolocation data.
|
* A tab shown in data source summary displaying information about a data source's geolocation data.
|
||||||
*/
|
*/
|
||||||
@Messages({
|
@Messages({
|
||||||
"GeolocationPanel_cityColumn_title=City",
|
"WhereUsedPanel_cityColumn_title=City",
|
||||||
"GeolocationPanel_countColumn_title=Count",
|
"WhereUsedPanel_countColumn_title=Count",
|
||||||
"GeolocationPanel_onNoCrIngest_message=No results will be shown because the GPX Parser was not run."
|
"WhereUsedPanel_onNoCrIngest_message=No results will be shown because the GPX Parser was not run."
|
||||||
})
|
})
|
||||||
public class GeolocationPanel extends BaseDataSourceSummaryPanel {
|
public class WhereUsedPanel extends BaseDataSourceSummaryPanel {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private static final String GPX_FACTORY = "org.python.proxies.GPX_Parser_Module$GPXParserFileIngestModuleFactory";
|
private static final String GPX_FACTORY = "org.python.proxies.GPX_Parser_Module$GPXParserFileIngestModuleFactory";
|
||||||
@ -65,13 +65,13 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final ColumnModel<CityCount> CITY_COL = new ColumnModel<>(
|
private static final ColumnModel<CityCount> CITY_COL = new ColumnModel<>(
|
||||||
Bundle.GeolocationPanel_cityColumn_title(),
|
Bundle.WhereUsedPanel_cityColumn_title(),
|
||||||
(cityCount) -> new DefaultCellModel(getCityName(cityCount.getCityRecord())),
|
(cityCount) -> new DefaultCellModel(getCityName(cityCount.getCityRecord())),
|
||||||
300
|
300
|
||||||
);
|
);
|
||||||
|
|
||||||
private static final ColumnModel<CityCount> COUNT_COL = new ColumnModel<>(
|
private static final ColumnModel<CityCount> COUNT_COL = new ColumnModel<>(
|
||||||
Bundle.GeolocationPanel_countColumn_title(),
|
Bundle.WhereUsedPanel_countColumn_title(),
|
||||||
(cityCount) -> new DefaultCellModel(Integer.toString(cityCount.getCount())),
|
(cityCount) -> new DefaultCellModel(Integer.toString(cityCount.getCount())),
|
||||||
100
|
100
|
||||||
);
|
);
|
||||||
@ -93,15 +93,15 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel {
|
|||||||
/**
|
/**
|
||||||
* Main constructor.
|
* Main constructor.
|
||||||
*/
|
*/
|
||||||
public GeolocationPanel() {
|
public WhereUsedPanel() {
|
||||||
this(GeolocationSummary.getInstance());
|
this(WhereUsedSummary.getInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main constructor.
|
* Main constructor.
|
||||||
* @param geolocationData The GeolocationSummary instance to use.
|
* @param geolocationData The GeolocationSummary instance to use.
|
||||||
*/
|
*/
|
||||||
public GeolocationPanel(GeolocationSummary geolocationData) {
|
public WhereUsedPanel(WhereUsedSummary geolocationData) {
|
||||||
// set up data acquisition methods
|
// set up data acquisition methods
|
||||||
dataFetchComponents = Arrays.asList(
|
dataFetchComponents = Arrays.asList(
|
||||||
new DataFetchWorker.DataFetchComponents<>(
|
new DataFetchWorker.DataFetchComponents<>(
|
||||||
@ -142,8 +142,7 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel {
|
|||||||
javax.swing.JLabel cityCountsLabel = new javax.swing.JLabel();
|
javax.swing.JLabel cityCountsLabel = new javax.swing.JLabel();
|
||||||
javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
||||||
javax.swing.JPanel cityCountsPanel = cityCountsTable;
|
javax.swing.JPanel cityCountsPanel = cityCountsTable;
|
||||||
javax.swing.Box.Filler filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20));
|
viewInGeolocationBtn = new javax.swing.JButton();
|
||||||
javax.swing.Box.Filler filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2));
|
|
||||||
javax.swing.Box.Filler filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
|
javax.swing.Box.Filler filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
|
||||||
|
|
||||||
mainContentPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
|
mainContentPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
|
||||||
@ -155,9 +154,9 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel {
|
|||||||
ingestRunningPanel.setPreferredSize(new java.awt.Dimension(10, 25));
|
ingestRunningPanel.setPreferredSize(new java.awt.Dimension(10, 25));
|
||||||
mainContentPanel.add(ingestRunningPanel);
|
mainContentPanel.add(ingestRunningPanel);
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(cityCountsLabel, org.openide.util.NbBundle.getMessage(GeolocationPanel.class, "GeolocationPanel.cityCountsLabel.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(cityCountsLabel, org.openide.util.NbBundle.getMessage(WhereUsedPanel.class, "WhereUsedPanel.cityCountsLabel.text")); // NOI18N
|
||||||
mainContentPanel.add(cityCountsLabel);
|
mainContentPanel.add(cityCountsLabel);
|
||||||
cityCountsLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(GeolocationPanel.class, "PastCasesPanel.notableFileLabel.text")); // NOI18N
|
cityCountsLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(WhereUsedPanel.class, "PastCasesPanel.notableFileLabel.text")); // NOI18N
|
||||||
|
|
||||||
filler1.setAlignmentX(0.0F);
|
filler1.setAlignmentX(0.0F);
|
||||||
mainContentPanel.add(filler1);
|
mainContentPanel.add(filler1);
|
||||||
@ -168,11 +167,8 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel {
|
|||||||
cityCountsPanel.setPreferredSize(new java.awt.Dimension(100, 212));
|
cityCountsPanel.setPreferredSize(new java.awt.Dimension(100, 212));
|
||||||
mainContentPanel.add(cityCountsPanel);
|
mainContentPanel.add(cityCountsPanel);
|
||||||
|
|
||||||
filler2.setAlignmentX(0.0F);
|
org.openide.awt.Mnemonics.setLocalizedText(viewInGeolocationBtn, org.openide.util.NbBundle.getMessage(WhereUsedPanel.class, "WhereUsedPanel.viewInGeolocationBtn.text")); // NOI18N
|
||||||
mainContentPanel.add(filler2);
|
mainContentPanel.add(viewInGeolocationBtn);
|
||||||
|
|
||||||
filler3.setAlignmentX(0.0F);
|
|
||||||
mainContentPanel.add(filler3);
|
|
||||||
|
|
||||||
filler5.setAlignmentX(0.0F);
|
filler5.setAlignmentX(0.0F);
|
||||||
mainContentPanel.add(filler5);
|
mainContentPanel.add(filler5);
|
||||||
@ -193,5 +189,6 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel {
|
|||||||
|
|
||||||
|
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
|
private javax.swing.JButton viewInGeolocationBtn;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user