Functioning common file search on types.

This commit is contained in:
Andrew Ziehl 2018-08-27 16:28:39 -07:00
parent dc8749d000
commit 1d99ed0e3b
4 changed files with 22 additions and 12 deletions

View File

@ -44,12 +44,14 @@ final public class CentralRepoCommonAttributeInstance extends AbstractCommonAttr
private static final Logger LOGGER = Logger.getLogger(CentralRepoCommonAttributeInstance.class.getName()); private static final Logger LOGGER = Logger.getLogger(CentralRepoCommonAttributeInstance.class.getName());
private final Integer crFileId; private final Integer crFileId;
private CorrelationAttributeInstance currentAttribute; private CorrelationAttributeInstance currentAttribute;
private CorrelationAttributeInstance.Type correlationType;
private final Map<String, Long> dataSourceNameToIdMap; private final Map<String, Long> dataSourceNameToIdMap;
CentralRepoCommonAttributeInstance(Integer attrInstId, Map<Long, String> dataSourceIdToNameMap) { CentralRepoCommonAttributeInstance(Integer attrInstId, Map<Long, String> dataSourceIdToNameMap, CorrelationAttributeInstance.Type correlationType) {
super(); super();
this.crFileId = attrInstId; this.crFileId = attrInstId;
this.dataSourceNameToIdMap = invertMap(dataSourceIdToNameMap); this.dataSourceNameToIdMap = invertMap(dataSourceIdToNameMap);
this.correlationType = correlationType;
} }
void setCurrentAttributeInst(CorrelationAttributeInstance attribute) { void setCurrentAttributeInst(CorrelationAttributeInstance attribute) {
@ -107,7 +109,7 @@ final public class CentralRepoCommonAttributeInstance extends AbstractCommonAttr
// @@@ We should be doing more of this work in teh generateKeys method. We want to do as little as possible in generateNodes // @@@ We should be doing more of this work in teh generateKeys method. We want to do as little as possible in generateNodes
InterCaseSearchResultsProcessor eamDbAttrInst = new InterCaseSearchResultsProcessor(); InterCaseSearchResultsProcessor eamDbAttrInst = new InterCaseSearchResultsProcessor();
CorrelationAttributeInstance corrAttr = eamDbAttrInst.findSingleCorrelationAttribute(crFileId, currentAttribute.getCorrelationType()); CorrelationAttributeInstance corrAttr = eamDbAttrInst.findSingleCorrelationAttribute(crFileId, correlationType);
List<DisplayableItemNode> attrInstNodeList = new ArrayList<>(0); List<DisplayableItemNode> attrInstNodeList = new ArrayList<>(0);
String currCaseDbName = Case.getCurrentCase().getDisplayName(); String currCaseDbName = Case.getCurrentCase().getDisplayName();

View File

@ -8,8 +8,14 @@
</Component> </Component>
</NonVisualComponents> </NonVisualComponents>
<Properties> <Properties>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[412, 440]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[412, 375]"/> <Dimension value="[412, 440]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[412, 440]"/>
</Property> </Property>
<Property name="resizable" type="boolean" value="false"/> <Property name="resizable" type="boolean" value="false"/>
</Properties> </Properties>
@ -29,7 +35,7 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-76,0,0,1,-61"/> <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-72,0,0,1,-61"/>
</AuxValues> </AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
@ -37,13 +43,13 @@
<Container class="javax.swing.JPanel" name="jPanel1"> <Container class="javax.swing.JPanel" name="jPanel1">
<Properties> <Properties>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[412, 375]"/> <Dimension value="[412, 440]"/>
</Property> </Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[412, 375]"/> <Dimension value="[412, 440]"/>
</Property> </Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[412, 375]"/> <Dimension value="[412, 440]"/>
</Property> </Property>
</Properties> </Properties>
<Constraints> <Constraints>

View File

@ -476,7 +476,9 @@ public final class CommonAttributePanel extends javax.swing.JDialog {
percentageThreshold = new javax.swing.JTextField(); percentageThreshold = new javax.swing.JTextField();
jLabel1 = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel();
setMinimumSize(new java.awt.Dimension(412, 375)); setMaximumSize(new java.awt.Dimension(412, 440));
setMinimumSize(new java.awt.Dimension(412, 440));
setPreferredSize(new java.awt.Dimension(412, 440));
setResizable(false); setResizable(false);
addWindowListener(new java.awt.event.WindowAdapter() { addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosed(java.awt.event.WindowEvent evt) { public void windowClosed(java.awt.event.WindowEvent evt) {
@ -484,9 +486,9 @@ public final class CommonAttributePanel extends javax.swing.JDialog {
} }
}); });
jPanel1.setMaximumSize(new java.awt.Dimension(412, 375)); jPanel1.setMaximumSize(new java.awt.Dimension(412, 440));
jPanel1.setMinimumSize(new java.awt.Dimension(412, 375)); jPanel1.setMinimumSize(new java.awt.Dimension(412, 440));
jPanel1.setPreferredSize(new java.awt.Dimension(412, 375)); jPanel1.setPreferredSize(new java.awt.Dimension(412, 440));
org.openide.awt.Mnemonics.setLocalizedText(commonFilesSearchLabel2, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.commonFilesSearchLabel2.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(commonFilesSearchLabel2, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.commonFilesSearchLabel2.text")); // NOI18N
commonFilesSearchLabel2.setFocusable(false); commonFilesSearchLabel2.setFocusable(false);

View File

@ -202,7 +202,7 @@ final class InterCaseSearchResultsProcessor {
// we don't *have* all the information for the rows in the CR, // we don't *have* all the information for the rows in the CR,
// so we need to consult the present case via the SleuthkitCase object // so we need to consult the present case via the SleuthkitCase object
// Later, when the FileInstanceNode is built. Therefore, build node generators for now. // Later, when the FileInstanceNode is built. Therefore, build node generators for now.
AbstractCommonAttributeInstance searchResult = new CentralRepoCommonAttributeInstance(resultId, InterCaseSearchResultsProcessor.this.dataSources); AbstractCommonAttributeInstance searchResult = new CentralRepoCommonAttributeInstance(resultId, InterCaseSearchResultsProcessor.this.dataSources, correlationType);
commonAttributeValue.addInstance(searchResult); commonAttributeValue.addInstance(searchResult);
} }