1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-03 14:30:01 +00:00

Merge pull request #3982 from sleuthkit/common_1

minor refactor
This commit is contained in:
Brian Carrier
2018-07-23 15:17:14 -04:00
committed by GitHub
14 changed files with 70 additions and 156 deletions

View File

@@ -26,6 +26,10 @@ import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.TskCoreException;
/**
* Represents an instance in either the CaseDB or CR that had a common match.
* Different implementations know how to get the instance details from either
* CaseDB or CR.
*
* Defines leaf-type nodes used in the Common Files Search results tree. Leaf
* nodes, may describe common attributes which exist in the current case DB or
* in the Central Repo. When a reference to the AbstractFile is lacking (such as
@@ -34,7 +38,7 @@ import org.sleuthkit.datamodel.TskCoreException;
* multiple types of leaf nodes are required to represent Common Attribute
* Instance nodes.
*/
public abstract class AbstractCommonAttributeSearchResult {
public abstract class AbstractCommonAttributeInstance {
private final Long abstractFileObjectId;
// maps object ID to file
@@ -52,7 +56,7 @@ public abstract class AbstractCommonAttributeSearchResult {
* @param dataSource datasource where this attribute appears
* @param caseName case where this attribute appears
*/
AbstractCommonAttributeSearchResult(Long abstractFileReference, Map<Long, AbstractFile> cachedFiles, String dataSource, String caseName) {
AbstractCommonAttributeInstance(Long abstractFileReference, Map<Long, AbstractFile> cachedFiles, String dataSource, String caseName) {
this.abstractFileObjectId = abstractFileReference;
this.cachedFiles = cachedFiles;
this.caseName = caseName;
@@ -66,7 +70,7 @@ public abstract class AbstractCommonAttributeSearchResult {
* @param cachedFiles storage for abstract files which have been used
* already so we can avoid extra roundtrips to the case db
*/
AbstractCommonAttributeSearchResult(Map<Long, AbstractFile> cachedFiles) {
AbstractCommonAttributeInstance(Map<Long, AbstractFile> cachedFiles) {
this.abstractFileObjectId = -1L;
this.cachedFiles = cachedFiles;
this.caseName = "";
@@ -80,11 +84,11 @@ public abstract class AbstractCommonAttributeSearchResult {
* @return AbstractFile which is identical to the file instance generated by
* implementations of this object
*/
AbstractFile lookupOrLoadAbstractFile() {
protected AbstractFile lookupOrLoadAbstractFile() {
if (this.cachedFiles.containsKey(this.getAbstractFileObjectId())) {
return this.cachedFiles.get(this.getAbstractFileObjectId());
} else {
AbstractFile file = this.loadFileFromSleuthkitCase();
AbstractFile file = this.getAbstractFile();
final long abstractFileId = file.getId();
this.cachedFiles.put(abstractFileId, file);
return file;
@@ -92,14 +96,14 @@ public abstract class AbstractCommonAttributeSearchResult {
}
/**
* Implement this in subclasses to find the AbstractFile by whatever means
* available. This will be called by this.lookupOrLoadAbstractFile. In some
* cases we may have the object abstractFileId, in other cases we may need
* to use the file name.
* Get an AbstractFile for this instance if it can be retrieved from
* the CaseDB.
*
* @return AbstractFile corresponding to this common attribute
* @return AbstractFile corresponding to this common attribute or null if
* it cannot be found
* @@@ Consider throwing exception instead of NULL
*/
abstract AbstractFile loadFileFromSleuthkitCase();
abstract AbstractFile getAbstractFile();
/**
* Create a list of leaf nodes, to be used to display a row in the tree
@@ -184,9 +188,9 @@ public abstract class AbstractCommonAttributeSearchResult {
final boolean sameDataSource = attributeDataSourceName.equalsIgnoreCase(abstractFileDataSourceName);
if (sameCase && sameFileName && sameDataSource) {
leafNode = new IntraCaseCommonAttributeInstanceNode(equivalentAbstractFile, currentCaseName, abstractFileDataSourceName);
leafNode = new CaseDBCommonAttributeInstanceNode(equivalentAbstractFile, currentCaseName, abstractFileDataSourceName);
} else {
leafNode = new InterCaseCommonAttributeInstanceNode(attributeInstance, equivalentAbstractFile);
leafNode = new CentralRepoCommonAttributeInstanceNode(attributeInstance, equivalentAbstractFile);
}
return leafNode;
}

View File

@@ -31,11 +31,11 @@ import org.sleuthkit.datamodel.SleuthkitCase;
import org.sleuthkit.datamodel.TskCoreException;
/**
* Encapsulates data required to instantiate a <code>FileInstanceNode</code>.
* Encapsulates data required to instantiate a <code>FileInstanceNode</code> for an instance in the CaseDB
*/
final public class IntraCaseCommonAttributeSearchResults extends AbstractCommonAttributeSearchResult {
final public class CaseDBCommonAttributeInstance extends AbstractCommonAttributeInstance {
private static final Logger LOGGER = Logger.getLogger(IntraCaseCommonAttributeSearchResults.class.getName());
private static final Logger LOGGER = Logger.getLogger(CaseDBCommonAttributeInstance.class.getName());
/**
@@ -45,18 +45,18 @@ final public class IntraCaseCommonAttributeSearchResults extends AbstractCommonA
* @param objectId id of abstract file to find
* @param dataSourceName name of datasource where the object is found
*/
IntraCaseCommonAttributeSearchResults(Long abstractFileReference, Map<Long, AbstractFile> cachedFiles, String dataSource, String caseName) {
CaseDBCommonAttributeInstance(Long abstractFileReference, Map<Long, AbstractFile> cachedFiles, String dataSource, String caseName) {
super(abstractFileReference, cachedFiles, dataSource, caseName);
}
@Override
public DisplayableItemNode[] generateNodes() {
final IntraCaseCommonAttributeInstanceNode intraCaseCommonAttributeInstanceNode = new IntraCaseCommonAttributeInstanceNode(this.lookupOrLoadAbstractFile(), this.getCaseName(), this.getDataSource());
final CaseDBCommonAttributeInstanceNode intraCaseCommonAttributeInstanceNode = new CaseDBCommonAttributeInstanceNode(this.lookupOrLoadAbstractFile(), this.getCaseName(), this.getDataSource());
return Arrays.asList(intraCaseCommonAttributeInstanceNode).toArray(new DisplayableItemNode[1]);
}
@Override
AbstractFile loadFileFromSleuthkitCase() {
AbstractFile getAbstractFile() {
Case currentCase;
try {

View File

@@ -26,15 +26,10 @@ import org.sleuthkit.autopsy.datamodel.NodeProperty;
import org.sleuthkit.datamodel.AbstractFile;
/**
* Used by the Common Files search feature to encapsulate instances of a given
* MD5s matched in the search. These nodes will be children of <code>Md5Node</code>s.
*
* Use this type for files which are in the current case. Contrast with
* <code>CentralRepositoryFileInstanceNode</code> which should be used when the
* FileInstance was found in some case not presently open in Autopsy, but present
* in the Central Repository.
* Node that wraps CaseDBCommonAttributeInstance to represent a file instance stored
* in the CaseDB.
*/
public class IntraCaseCommonAttributeInstanceNode extends FileNode {
public class CaseDBCommonAttributeInstanceNode extends FileNode {
private final String caseName;
private final String dataSource;
@@ -46,7 +41,7 @@ public class IntraCaseCommonAttributeInstanceNode extends FileNode {
* @param fsContent
* @param dataSource
*/
public IntraCaseCommonAttributeInstanceNode(AbstractFile fsContent, String caseName, String dataSource) {
public CaseDBCommonAttributeInstanceNode(AbstractFile fsContent, String caseName, String dataSource) {
super(fsContent);
this.caseName = caseName;
this.dataSource = dataSource;

View File

@@ -39,13 +39,13 @@ import org.sleuthkit.datamodel.TskCoreException;
*
* Generates a DisplayableItmeNode using a CentralRepositoryFile.
*/
final public class InterCaseCommonAttributeSearchResult extends AbstractCommonAttributeSearchResult {
final public class CentralRepoCommonAttributeInstance extends AbstractCommonAttributeInstance {
private static final Logger LOGGER = Logger.getLogger(InterCaseCommonAttributeSearchResult.class.getName());
private static final Logger LOGGER = Logger.getLogger(CentralRepoCommonAttributeInstance.class.getName());
private final Integer crFileId;
private CorrelationAttributeInstance currentAttributeInstance;
InterCaseCommonAttributeSearchResult(Integer attrInstId, Map<Long, AbstractFile> cachedFiles) {
CentralRepoCommonAttributeInstance(Integer attrInstId, Map<Long, AbstractFile> cachedFiles) {
super(cachedFiles);
this.crFileId = attrInstId;
}
@@ -55,9 +55,10 @@ final public class InterCaseCommonAttributeSearchResult extends AbstractCommonAt
}
@Override
AbstractFile loadFileFromSleuthkitCase() {
AbstractFile getAbstractFile() {
Case currentCase;
// @@@ Need to CHeck for NULL. This seems to depend on generateNodes to be called first
String currentFullPath = this.currentAttributeInstance.getFilePath();
try {
@@ -88,13 +89,14 @@ final public class InterCaseCommonAttributeSearchResult extends AbstractCommonAt
List<DisplayableItemNode> attrInstNodeList = new ArrayList<>(0);
String currCaseDbName = Case.getCurrentCase().getDisplayName();
// @@@ This seems wrong that we are looping here, but only setting one attrInst in the class, which is then used by getAbstractFile().
for (CorrelationAttributeInstance attrInst : corrAttr.getInstances()) {
try {
this.setCurrentAttributeInst(attrInst);
AbstractFile equivalentAbstractFile = this.lookupOrLoadAbstractFile();
DisplayableItemNode generatedInstNode = AbstractCommonAttributeSearchResult.createInstance(attrInst, equivalentAbstractFile, currCaseDbName);
DisplayableItemNode generatedInstNode = AbstractCommonAttributeInstance.createInstance(attrInst, equivalentAbstractFile, currCaseDbName);
attrInstNodeList.add(generatedInstNode);

View File

@@ -42,7 +42,7 @@ import org.sleuthkit.datamodel.Content;
* Central Repo. Contrast with <code>SleuthkitCase</code> which should be used
* when the FileInstance was found in the case presently open in Autopsy.
*/
public class InterCaseCommonAttributeInstanceNode extends DisplayableItemNode {
public class CentralRepoCommonAttributeInstanceNode extends DisplayableItemNode {
private final CorrelationAttributeInstance crFile;
@@ -50,7 +50,7 @@ public class InterCaseCommonAttributeInstanceNode extends DisplayableItemNode {
// and we can use this to support certain actions in the tree table and crFile viewer
private final AbstractFile md5Reference;
InterCaseCommonAttributeInstanceNode(CorrelationAttributeInstance content, AbstractFile md5Reference) {
CentralRepoCommonAttributeInstanceNode(CorrelationAttributeInstance content, AbstractFile md5Reference) {
super(Children.LEAF, Lookups.fixed(content)); // Using md5Reference enables Other Occurances, but for the current file path
this.crFile = content;
this.setDisplayName(new File(this.crFile.getFilePath()).getName());
@@ -88,7 +88,7 @@ public class InterCaseCommonAttributeInstanceNode extends DisplayableItemNode {
public String getItemType() {
//objects of type FileNode will co-occur in the treetable with objects
// of this type and they will need to provide the same key
return IntraCaseCommonAttributeInstanceNode.class.getName();
return CaseDBCommonAttributeInstanceNode.class.getName();
}
@Override

View File

@@ -1,89 +0,0 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2018 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sleuthkit.autopsy.commonfilesearch;
import org.apache.commons.lang3.StringUtils;
import org.openide.nodes.Sheet;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.datamodel.DisplayableItemNodeVisitor;
import org.sleuthkit.autopsy.datamodel.FileNode;
import org.sleuthkit.autopsy.datamodel.NodeProperty;
import org.sleuthkit.datamodel.AbstractFile;
/**
* Used by the Common Files search feature to encapsulate instances of a given
MD5s matched in the search. These nodes will be children of <code>Md5Node</code>s.
*/
public class CommonAttributeInstanceNode extends FileNode {
private final String dataSource;
/**
* Create a node which can be used in a multilayer tree table and is based
* on an <code>AbstractFile</code>.
*
* @param fsContent
* @param dataSource
*/
public CommonAttributeInstanceNode(AbstractFile fsContent, String dataSource) {
super(fsContent);
this.dataSource = dataSource;
this.setDisplayName(fsContent.getName());
}
@Override
public boolean isLeafTypeNode(){
//Not used atm - could maybe be leveraged for better use in Children objects
return true;
}
@Override
public <T> T accept(DisplayableItemNodeVisitor<T> visitor) {
return visitor.visit(this);
}
String getDataSource() {
return this.dataSource;
}
@NbBundle.Messages({"FileInstanceNode.createSheet.noDescription= "})
@Override
protected Sheet createSheet() {
Sheet sheet = new Sheet();
Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
if (sheetSet == null) {
sheetSet = Sheet.createPropertiesSet();
sheet.put(sheetSet);
}
final String NO_DESCR = Bundle.FileInstanceNode_createSheet_noDescription();
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), Bundle.CommonFilesSearchResultsViewerTable_filesColLbl(), NO_DESCR, this.getContent().getName()));
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), Bundle.CommonFilesSearchResultsViewerTable_pathColLbl(), NO_DESCR, this.getContent().getParentPath()));
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), Bundle.CommonFilesSearchResultsViewerTable_hashsetHitsColLbl(), NO_DESCR, getHashSetHitsForFile(this.getContent())));
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), Bundle.CommonFilesSearchResultsViewerTable_dataSourceColLbl(), NO_DESCR, this.getDataSource()));
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_mimeTypeColLbl(), Bundle.CommonFilesSearchResultsViewerTable_mimeTypeColLbl(), NO_DESCR, StringUtils.defaultString(this.getContent().getMIMEType())));
this.addTagProperty(sheetSet);
sheetSet.put(new NodeProperty<>(Bundle.CommonFilesSearchResultsViewerTable_caseColLbl1(), Bundle.CommonFilesSearchResultsViewerTable_caseColLbl1(), NO_DESCR, Case.getCurrentCase().getDisplayName()));
return sheet;
}
}

View File

@@ -28,14 +28,15 @@ import java.util.Set;
import java.util.stream.Collectors;
/**
* Defines a value that is used for correlation, such as file MD5 or email address.
* Defines a value that was in the common file search results
* as well as information about its instances.
*/
final public class CommonAttributeValue {
private final String md5;
private final List<AbstractCommonAttributeSearchResult> fileInstances;
private final List<AbstractCommonAttributeInstance> fileInstances;
CommonAttributeValue(String md5, List<AbstractCommonAttributeSearchResult> fileInstances) {
CommonAttributeValue(String md5, List<AbstractCommonAttributeInstance> fileInstances) {
this.md5 = md5;
this.fileInstances = fileInstances;
}
@@ -55,13 +56,13 @@ final public class CommonAttributeValue {
* @return
*/
public String getCases() {
final String cases = this.fileInstances.stream().map(AbstractCommonAttributeSearchResult::getCaseName).collect(Collectors.joining(", "));
final String cases = this.fileInstances.stream().map(AbstractCommonAttributeInstance::getCaseName).collect(Collectors.joining(", "));
return cases;
}
public String getDataSources() {
Set<String> sources = new HashSet<>();
for (AbstractCommonAttributeSearchResult data : this.fileInstances) {
for (AbstractCommonAttributeInstance data : this.fileInstances) {
sources.add(data.getDataSource());
}
@@ -69,15 +70,16 @@ final public class CommonAttributeValue {
return dataSources;
}
void addFileInstanceMetadata(AbstractCommonAttributeSearchResult metadata) {
void addInstance(AbstractCommonAttributeInstance metadata) {
this.fileInstances.add(metadata);
}
void addFileInstanceMetadata(AbstractCommonAttributeSearchResult metadata, String caseName) {
void addFileInstanceMetadata(AbstractCommonAttributeInstance metadata, String caseName) {
this.fileInstances.add(metadata);
// @@@ Why are we ignoring caseName?
}
public Collection<AbstractCommonAttributeSearchResult> getInstances() {
public Collection<AbstractCommonAttributeInstance> getInstances() {
return Collections.unmodifiableCollection(this.fileInstances);
}

View File

@@ -131,7 +131,7 @@ public class CommonAttributeValueNode extends DisplayableItemNode {
* Child generator for <code>SleuthkitCaseFileInstanceNode</code> of
* <code>CommonAttributeValueNode</code>.
*/
static class FileInstanceNodeFactory extends ChildFactory<AbstractCommonAttributeSearchResult> {
static class FileInstanceNodeFactory extends ChildFactory<AbstractCommonAttributeInstance> {
private final CommonAttributeValue descendants;
@@ -140,13 +140,13 @@ public class CommonAttributeValueNode extends DisplayableItemNode {
}
@Override
protected boolean createKeys(List<AbstractCommonAttributeSearchResult> list) {
protected boolean createKeys(List<AbstractCommonAttributeInstance> list) {
list.addAll(this.descendants.getInstances());
return true;
}
@Override
protected Node[] createNodesForKey(AbstractCommonAttributeSearchResult searchResult) {
protected Node[] createNodesForKey(AbstractCommonAttributeInstance searchResult) {
return searchResult.generateNodes();
}

View File

@@ -85,14 +85,14 @@ abstract class InterCaseCommonAttributeSearcher extends AbstractCommonAttributeS
//Add to intercase metaData
final CommonAttributeValue commonAttributeValue = interCaseCommonFiles.get(md5);
AbstractCommonAttributeSearchResult searchResult = new InterCaseCommonAttributeSearchResult(commonAttrId, fileCache);
AbstractCommonAttributeInstance searchResult = new CentralRepoCommonAttributeInstance(commonAttrId, fileCache);
commonAttributeValue.addFileInstanceMetadata(searchResult, correlationCaseDisplayName);
} else {
CommonAttributeValue commonAttributeValue = new CommonAttributeValue(md5);
interCaseCommonFiles.put(md5, commonAttributeValue);
AbstractCommonAttributeSearchResult searchResult = new InterCaseCommonAttributeSearchResult(commonAttrId, fileCache);
AbstractCommonAttributeInstance searchResult = new CentralRepoCommonAttributeInstance(commonAttrId, fileCache);
commonAttributeValue.addFileInstanceMetadata(searchResult, correlationCaseDisplayName);
}

View File

@@ -124,12 +124,12 @@ public abstract class IntraCaseCommonAttributeSearcher extends AbstractCommonAtt
}
if (commonFiles.containsKey(md5)) {
final CommonAttributeValue md5Metadata = commonFiles.get(md5);
md5Metadata.addFileInstanceMetadata(new IntraCaseCommonAttributeSearchResults(objectId, fileCache, dataSource, caseName));
final CommonAttributeValue commonAttributeValue = commonFiles.get(md5);
commonAttributeValue.addInstance(new CaseDBCommonAttributeInstance(objectId, fileCache, dataSource, caseName));
} else {
final CommonAttributeValue md5Metadata = new CommonAttributeValue(md5);
md5Metadata.addFileInstanceMetadata(new IntraCaseCommonAttributeSearchResults(objectId, fileCache, dataSource, caseName));
commonFiles.put(md5, md5Metadata);
final CommonAttributeValue commonAttributeValue = new CommonAttributeValue(md5);
commonAttributeValue.addInstance(new CaseDBCommonAttributeInstance(objectId, fileCache, dataSource, caseName));
commonFiles.put(md5, commonAttributeValue);
}
}
}

View File

@@ -18,11 +18,11 @@
*/
package org.sleuthkit.autopsy.datamodel;
import org.sleuthkit.autopsy.commonfilesearch.InterCaseCommonAttributeInstanceNode;
import org.sleuthkit.autopsy.commonfilesearch.CentralRepoCommonAttributeInstanceNode;
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeSearchResultRootNode;
import org.sleuthkit.autopsy.commonfilesearch.InstanceCountNode;
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValueNode;
import org.sleuthkit.autopsy.commonfilesearch.IntraCaseCommonAttributeInstanceNode;
import org.sleuthkit.autopsy.commonfilesearch.CaseDBCommonAttributeInstanceNode;
import org.sleuthkit.autopsy.datamodel.DeletedContent.DeletedContentsChildren.DeletedContentNode;
import org.sleuthkit.autopsy.datamodel.DeletedContent.DeletedContentsNode;
import org.sleuthkit.autopsy.datamodel.FileSize.FileSizeRootChildren.FileSizeNode;
@@ -120,9 +120,9 @@ public interface DisplayableItemNodeVisitor<T> {
T visit(CommonAttributeSearchResultRootNode cfn);
T visit(IntraCaseCommonAttributeInstanceNode fin);
T visit(CaseDBCommonAttributeInstanceNode fin);
T visit(InterCaseCommonAttributeInstanceNode crfin);
T visit(CentralRepoCommonAttributeInstanceNode crfin);
T visit(InstanceCountNode icn);
@@ -195,7 +195,7 @@ public interface DisplayableItemNodeVisitor<T> {
protected abstract T defaultVisit(DisplayableItemNode c);
@Override
public T visit(IntraCaseCommonAttributeInstanceNode fin) {
public T visit(CaseDBCommonAttributeInstanceNode fin) {
return defaultVisit(fin);
}
@@ -215,7 +215,7 @@ public interface DisplayableItemNodeVisitor<T> {
}
@Override
public T visit(InterCaseCommonAttributeInstanceNode crfin){
public T visit(CentralRepoCommonAttributeInstanceNode crfin){
return defaultVisit(crfin);
}

View File

@@ -56,14 +56,14 @@ import org.sleuthkit.autopsy.datamodel.FileTypeExtensions;
import org.sleuthkit.autopsy.datamodel.FileTypes.FileTypesNode;
import org.sleuthkit.autopsy.commonfilesearch.InstanceCountNode;
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValueNode;
import org.sleuthkit.autopsy.commonfilesearch.InterCaseCommonAttributeInstanceNode;
import org.sleuthkit.autopsy.commonfilesearch.CentralRepoCommonAttributeInstanceNode;
import org.sleuthkit.autopsy.datamodel.LayoutFileNode;
import org.sleuthkit.autopsy.datamodel.LocalFileNode;
import org.sleuthkit.autopsy.datamodel.LocalDirectoryNode;
import org.sleuthkit.autopsy.datamodel.NodeSelectionInfo;
import org.sleuthkit.autopsy.datamodel.Reports;
import org.sleuthkit.autopsy.datamodel.SlackFileNode;
import org.sleuthkit.autopsy.commonfilesearch.IntraCaseCommonAttributeInstanceNode;
import org.sleuthkit.autopsy.commonfilesearch.CaseDBCommonAttributeInstanceNode;
import org.sleuthkit.autopsy.datamodel.VirtualDirectoryNode;
import static org.sleuthkit.autopsy.directorytree.Bundle.DataResultFilterNode_viewSourceArtifact_text;
import org.sleuthkit.autopsy.modules.embeddedfileextractor.ExtractArchiveWithPasswordAction;
@@ -535,12 +535,12 @@ public class DataResultFilterNode extends FilterNode {
}
@Override
public AbstractAction visit(IntraCaseCommonAttributeInstanceNode fin){
public AbstractAction visit(CaseDBCommonAttributeInstanceNode fin){
return null;
}
@Override
public AbstractAction visit(InterCaseCommonAttributeInstanceNode iccan){
public AbstractAction visit(CentralRepoCommonAttributeInstanceNode iccan){
return null;
}

View File

@@ -52,7 +52,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeSearchResults;
import org.sleuthkit.autopsy.commonfilesearch.DataSourceLoader;
import org.sleuthkit.autopsy.commonfilesearch.IntraCaseCommonAttributeSearchResults;
import org.sleuthkit.autopsy.commonfilesearch.CaseDBCommonAttributeInstance;
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValue;
/**

View File

@@ -33,7 +33,7 @@ import org.python.icu.impl.Assert;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.ImageDSProcessor;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.commonfilesearch.AbstractCommonAttributeSearchResult;
import org.sleuthkit.autopsy.commonfilesearch.AbstractCommonAttributeInstance;
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeSearchResults;
import org.sleuthkit.autopsy.commonfilesearch.DataSourceLoader;
import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValue;
@@ -207,7 +207,7 @@ class IntraCaseUtils {
for (Map.Entry<Integer, List<CommonAttributeValue>> entry : metadata.getMetadata().entrySet()) {
for (CommonAttributeValue md : entry.getValue()) {
for (AbstractCommonAttributeSearchResult fim : md.getInstances()) {
for (AbstractCommonAttributeInstance fim : md.getInstances()) {
instanceIdToDataSource.put(fim.getAbstractFileObjectId(), fim.getDataSource());
}
}