Merge branch 'release-4.14.0' of https://github.com/sleuthkit/autopsy into 5716-RawMediaArtifactType

This commit is contained in:
William Schaefer
2019-12-16 11:28:50 -05:00
8 changed files with 70 additions and 73 deletions
@@ -32,7 +32,7 @@ import org.sleuthkit.autopsy.datamodel.FileNode;
import org.sleuthkit.datamodel.AbstractFile;
/**
* Create a node containing the children for the to display in the
* Create a node containing the children to display in the
* DataResultViewerThumbnail
*/
class DiscoveryThumbnailChildren extends Children.Keys<AbstractFile> {
@@ -977,16 +977,6 @@ class FileSearch {
GroupKey getGroupKey(ResultFile file) {
return new FileTypeGroupKey(file);
}
@Override
void addAttributeToResultFiles(List<ResultFile> files, SleuthkitCase caseDb,
EamDb centralRepoDb) throws FileSearchException {
for (ResultFile file : files) {
if (file.getFileType().equals(FileType.OTHER)) {
file.setFileType(FileType.fromMIMEtype(file.getFirstInstance().getMIMEType()));
}
}
}
}
/**
@@ -72,7 +72,7 @@ class ResultFile {
tagNames = new ArrayList<>();
interestingSetNames = new ArrayList<>();
objectDetectedNames = new ArrayList<>();
fileType = FileType.OTHER;
fileType = FileType.fromMIMEtype(abstractFile.getMIMEType());
}
/**
@@ -103,6 +103,9 @@ class ResultFile {
if (deleted && !duplicate.isDirNameFlagSet(TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
deleted = false;
}
if (fileType == FileType.OTHER) {
fileType = FileType.fromMIMEtype(duplicate.getMIMEType());
}
updateScoreAndDescription(duplicate);
instances.add(duplicate);
}
@@ -156,15 +159,6 @@ class ResultFile {
return fileType;
}
/**
* Set the file type
*
* @param fileType the type
*/
void setFileType(FileType fileType) {
this.fileType = fileType;
}
/**
* Add a keyword list name that matched this file.
*
@@ -88,17 +88,21 @@ public class ResultsPanel extends javax.swing.JPanel {
imageThumbnailViewer = new ImageThumbnailViewer();
videoThumbnailViewer = new VideoThumbnailViewer();
videoThumbnailViewer.addListSelectionListener((e) -> {
if (!e.getValueIsAdjusting()) {
populateInstancesList();
} else {
instancesList.clearSelection();
if (resultType == FileSearchData.FileType.VIDEO) {
if (!e.getValueIsAdjusting()) {
populateInstancesList();
} else {
instancesList.clearSelection();
}
}
});
imageThumbnailViewer.addListSelectionListener((e) -> {
if (!e.getValueIsAdjusting()) {
populateInstancesList();
} else {
instancesList.clearSelection();
if (resultType == FileSearchData.FileType.IMAGE) {
if (!e.getValueIsAdjusting()) {
populateInstancesList();
} else {
instancesList.clearSelection();
}
}
});
//Add the context menu when right clicking
@@ -24,7 +24,7 @@ GeolocationSettingsPanel.mbtileFileField.toolTipText=
GeolocationSettingsPanel.mbtileFileField.text=
GeolocationSettingsPanel.defaultDataSource.text=Default online tile server (bing.com/maps)
GeolocationSettingsPanel.osmServerRBnt.text=OpenStreetMap server
GeolocationSettingsPanel.zipFileRBnt.text=OpenStreeMap zip file
GeolocationSettingsPanel.zipFileRBnt.text=OpenStreetMap zip file
GeolocationSettingsPanel.zipFileRBnt.actionCommand=OpenStreeMap tile ZIP file
GeolocationSettingsPanel.mbtilesRBtn.text=MBTiles file
GeolocationSettingsPanel.osmServerAddressField.text=
@@ -59,7 +59,7 @@ GeolocationSettingsPanel.mbtileFileField.toolTipText=
GeolocationSettingsPanel.mbtileFileField.text=
GeolocationSettingsPanel.defaultDataSource.text=Default online tile server (bing.com/maps)
GeolocationSettingsPanel.osmServerRBnt.text=OpenStreetMap server
GeolocationSettingsPanel.zipFileRBnt.text=OpenStreeMap zip file
GeolocationSettingsPanel.zipFileRBnt.text=OpenStreetMap zip file
GeolocationSettingsPanel.zipFileRBnt.actionCommand=OpenStreeMap tile ZIP file
GeolocationSettingsPanel.mbtilesRBtn.text=MBTiles file
GeolocationSettingsPanel.osmServerAddressField.text=
@@ -145,7 +145,7 @@
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="9" insetsBottom="9" insetsRight="9" anchor="18" weightX="0.0" weightY="0.0"/>
<GridBagConstraints gridX="2" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="9" insetsBottom="9" insetsRight="9" anchor="17" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
@@ -160,7 +160,7 @@
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="20" ipadY="0" insetsTop="0" insetsLeft="9" insetsBottom="9" insetsRight="9" anchor="18" weightX="0.0" weightY="0.0"/>
<GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="9" insetsBottom="9" insetsRight="9" anchor="17" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
@@ -200,36 +200,45 @@
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="mbtilesBrowseBtn">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/geolocation/Bundle.properties" key="GeolocationSettingsPanel.mbtilesBrowseBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mbtilesBrowseBtnActionPerformed"/>
</Events>
<Container class="javax.swing.JPanel" name="MBTilesBtnPanel">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="2" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="9" insetsBottom="9" insetsRight="9" anchor="18" weightX="0.0" weightY="0.0"/>
<GridBagConstraints gridX="2" gridY="3" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="9" insetsBottom="9" insetsRight="9" anchor="17" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="mbtileTestBtn">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/geolocation/Bundle.properties" key="GeolocationSettingsPanel.mbtileTestBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mbtileTestBtnActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="3" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="20" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="18" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
<Property name="columns" type="int" value="0"/>
<Property name="horizontalGap" type="int" value="5"/>
<Property name="rows" type="int" value="1"/>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="mbtilesBrowseBtn">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/geolocation/Bundle.properties" key="GeolocationSettingsPanel.mbtilesBrowseBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mbtilesBrowseBtnActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="mbtileTestBtn">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/geolocation/Bundle.properties" key="GeolocationSettingsPanel.mbtileTestBtn.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mbtileTestBtnActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
@@ -159,6 +159,7 @@ final class GeolocationSettingsPanel extends javax.swing.JPanel implements Optio
serverTestBtn = new javax.swing.JButton();
mbtilesRBtn = new javax.swing.JRadioButton();
mbtileFileField = new javax.swing.JTextField();
javax.swing.JPanel MBTilesBtnPanel = new javax.swing.JPanel();
mbtilesBrowseBtn = new javax.swing.JButton();
mbtileTestBtn = new javax.swing.JButton();
@@ -236,7 +237,7 @@ final class GeolocationSettingsPanel extends javax.swing.JPanel implements Optio
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 9, 9, 9);
tilePane.add(zipFileBrowseBnt, gridBagConstraints);
@@ -249,8 +250,8 @@ final class GeolocationSettingsPanel extends javax.swing.JPanel implements Optio
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 1;
gridBagConstraints.ipadx = 20;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 9, 9, 9);
tilePane.add(serverTestBtn, gridBagConstraints);
@@ -277,18 +278,15 @@ final class GeolocationSettingsPanel extends javax.swing.JPanel implements Optio
gridBagConstraints.insets = new java.awt.Insets(0, 0, 9, 0);
tilePane.add(mbtileFileField, gridBagConstraints);
MBTilesBtnPanel.setLayout(new java.awt.GridLayout(1, 0, 5, 0));
org.openide.awt.Mnemonics.setLocalizedText(mbtilesBrowseBtn, org.openide.util.NbBundle.getMessage(GeolocationSettingsPanel.class, "GeolocationSettingsPanel.mbtilesBrowseBtn.text")); // NOI18N
mbtilesBrowseBtn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
mbtilesBrowseBtnActionPerformed(evt);
}
});
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 3;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(0, 9, 9, 9);
tilePane.add(mbtilesBrowseBtn, gridBagConstraints);
MBTilesBtnPanel.add(mbtilesBrowseBtn);
org.openide.awt.Mnemonics.setLocalizedText(mbtileTestBtn, org.openide.util.NbBundle.getMessage(GeolocationSettingsPanel.class, "GeolocationSettingsPanel.mbtileTestBtn.text")); // NOI18N
mbtileTestBtn.addActionListener(new java.awt.event.ActionListener() {
@@ -296,13 +294,15 @@ final class GeolocationSettingsPanel extends javax.swing.JPanel implements Optio
mbtileTestBtnActionPerformed(evt);
}
});
MBTilesBtnPanel.add(mbtileTestBtn);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 3;
gridBagConstraints.ipadx = 20;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
tilePane.add(mbtileTestBtn, gridBagConstraints);
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 9, 9, 9);
tilePane.add(MBTilesBtnPanel, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;