From a34b54a80f0a10ae1cb54061ffeae72550111dca Mon Sep 17 00:00:00 2001 From: Oliver Spohngellert Date: Wed, 2 Mar 2016 13:24:07 -0500 Subject: [PATCH] Updated source file column alignment --- .../ExternalResultsImporter.java | 2 +- .../UserArtifactIngestModule.java | 16 ++- .../autopsy/report/ReportGenerator.java | 100 ++++++++++-------- 3 files changed, 65 insertions(+), 53 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java index f2f7f39797..068b1e2454 100644 --- a/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java +++ b/Core/src/org/sleuthkit/autopsy/externalresults/ExternalResultsImporter.java @@ -133,7 +133,7 @@ public final class ExternalResultsImporter { for (ExternalResults.Artifact artifactData : results.getArtifacts()) { try { // Add the artifact to the case database. - int artifactTypeId = caseDb.getArtifactTypeID(artifactData.getType()); + int artifactTypeId = caseDb.getArtifactType(artifactData.getType()).getTypeID(); if (artifactTypeId == -1) { artifactTypeId = caseDb.addBlackboardArtifactType(artifactData.getType(), artifactData.getType()).getTypeID(); } diff --git a/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModule.java index 62104143d9..ce3a713de9 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/UserArtifactIngestModule.java @@ -49,10 +49,10 @@ public class UserArtifactIngestModule implements DataSourceIngestModule { FileManager manager = Case.getCurrentCase().getServices().getFileManager(); List file1 = manager.findFiles("Sunset.jpg"); //NON-NLS List file2 = manager.findFiles("Winter.jpg"); //NON-NLS - List currArtifacts = Case.getCurrentCase().getSleuthkitCase().getBlackboardArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT); + List currArtifacts = Case.getCurrentCase().getSleuthkitCase().getBlackboardArtifacts(BlackboardArtifact.ARTIFACT_TYPE.TSK_METADATA_EXIF); BlackboardArtifact art1 = currArtifacts.size() == 0 ? null : currArtifacts.get(0); BlackboardArtifact art2; - if (art1 != null) { + if (art1 == null) { if (!file1.isEmpty()) { art1 = file1.get(0).newArtifact(type1.getTypeID()); } else { @@ -94,9 +94,15 @@ public class UserArtifactIngestModule implements DataSourceIngestModule { @Override public void startUp(IngestJobContext context) throws IngestModuleException { try { - type1 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("FINAL TEST a", "FINAL TEST a"); //NON-NLS - type2 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("FINAL TEST b", "FINAL TEST b"); //NON-NLS - } catch (BlackboardException ex) { + type1 = Case.getCurrentCase().getSleuthkitCase().getArtifactType("FINAL TEST a"); + type2 = Case.getCurrentCase().getSleuthkitCase().getArtifactType("FINAL TEST b"); + if (type1 == null) { + type1 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("FINAL TEST a", "FINAL TEST a"); //NON-NLS + } + if (type2 == null) { + type2 = Case.getCurrentCase().getServices().getBlackboard().addArtifactType("FINAL TEST b", "FINAL TEST b"); //NON-NLS + } + } catch (BlackboardException | TskCoreException ex) { Logger.logMsg(Logger.ERROR, "Startup failed"); //NON-NLS } } diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java index cd177bbaac..2188763708 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java @@ -1243,8 +1243,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.program"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_PROG_NAME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.url"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_URL))); @@ -1261,8 +1259,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.program"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_PROG_NAME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.url"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_URL))); @@ -1282,8 +1278,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.urlDomainDecoded"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_URL_DECODED))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dest"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_PATH))); @@ -1297,8 +1291,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.program"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_PROG_NAME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_RECENT_OBJECT.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.path"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_PATH))); @@ -1306,7 +1298,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTime"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); } else if (ARTIFACT_TYPE.TSK_INSTALLED_PROG.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.progName"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_PROG_NAME))); @@ -1314,13 +1305,9 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.instDateTime"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID() == artifactTypeId) { columns.add(new HeaderOnlyColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.preview"))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_HASHSET_HIT.getTypeID() == artifactTypeId) { columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.file"))); @@ -1339,8 +1326,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTime"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.text"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_TEXT))); @@ -1354,8 +1339,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.progName"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_PROG_NAME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_METADATA_EXIF.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTaken"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED))); @@ -1375,8 +1358,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.altitude"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_GEO_ALTITUDE))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_CONTACT.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.personName"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_NAME))); @@ -1396,8 +1377,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.email"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_EMAIL))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_MESSAGE.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.msgType"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE))); @@ -1429,8 +1408,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.text"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_TEXT))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_CALLLOG.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.personName"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_NAME))); @@ -1447,8 +1424,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.direction"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DIRECTION))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_CALENDAR_ENTRY.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.calendarEntryType"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_CALENDAR_ENTRY_TYPE))); @@ -1465,8 +1440,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.location"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_LOCATION))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_SPEED_DIAL_ENTRY.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.shortCut"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_SHORTCUT))); @@ -1477,8 +1450,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.phoneNumber"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_BLUETOOTH_PAIRING.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.deviceName"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DEVICE_NAME))); @@ -1489,8 +1460,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTime"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_GPS_TRACKPOINT.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.latitude"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_GEO_LATITUDE))); @@ -1501,8 +1470,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTime"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_GPS_BOOKMARK.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.latitude"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_GEO_LATITUDE))); @@ -1522,8 +1489,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTime"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_GPS_LAST_KNOWN_LOCATION.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.latitude"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_GEO_LATITUDE))); @@ -1543,8 +1508,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTime"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_GPS_SEARCH.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.latitude"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_GEO_LATITUDE))); @@ -1564,8 +1527,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.dateTime"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_SERVICE_ACCOUNT.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.category"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_CATEGORY))); @@ -1597,14 +1558,10 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.mailServer"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_SERVER_NAME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.name"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_NAME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_EXT_MISMATCH_DETECTED.getTypeID() == artifactTypeId) { columns.add(new HeaderOnlyColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.file"))); @@ -1624,8 +1581,6 @@ class ReportGenerator { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.osInstallDate.text"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_DATETIME))); - columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); - } else if (ARTIFACT_TYPE.TSK_EMAIL_MSG.getTypeID() == artifactTypeId) { columns.add(new AttributeColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.tskEmailTo"), new BlackboardAttribute.Type(ATTRIBUTE_TYPE.TSK_EMAIL_TO))); @@ -1733,9 +1688,41 @@ class ReportGenerator { columns.add(new AttributeColumn(type.getDisplayName(), type)); } columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); + columns.add(new TaggedResultsColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.tags"))); + + return columns; } - columns.add( - new TaggedResultsColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.tags"))); + for (Column column : columns) { + column.removeType(types); + } + for (BlackboardAttribute.Type type : types) { + columns.add(new AttributeColumn(type.getDisplayName(), type)); + } + if (artifactTypeId == ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_RECENT_OBJECT.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_INSTALLED_PROG.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_DEVICE_ATTACHED.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_WEB_SEARCH_QUERY.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_METADATA_EXIF.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_CONTACT.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_MESSAGE.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_CALLLOG.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_CALENDAR_ENTRY.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_SPEED_DIAL_ENTRY.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_BLUETOOTH_PAIRING.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_GPS_TRACKPOINT.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_GPS_BOOKMARK.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_GPS_LAST_KNOWN_LOCATION.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_GPS_SEARCH.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_SERVICE_ACCOUNT.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED.getTypeID() + || artifactTypeId == ARTIFACT_TYPE.TSK_OS_INFO.getTypeID()) { + columns.add(new SourceFileColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.srcFile"))); + } + columns.add(new TaggedResultsColumn(NbBundle.getMessage(this.getClass(), "ReportGenerator.artTableColHdr.tags"))); return columns; } @@ -2013,6 +2000,8 @@ class ReportGenerator { String getColumnHeader(); String getCellData(ArtifactData artData); + + void removeType(Set types); } private class AttributeColumn implements Column { @@ -2046,6 +2035,11 @@ class ReportGenerator { } return ""; } + + @Override + public void removeType(Set types) { + types.remove(this.attributeType); + } } private class SourceFileColumn implements Column { @@ -2069,6 +2063,10 @@ class ReportGenerator { } return "";*/ } + + @Override + public void removeType(Set types) { + } } private class TaggedResultsColumn implements Column { @@ -2088,6 +2086,10 @@ class ReportGenerator { public String getCellData(ArtifactData artData) { return makeCommaSeparatedList(artData.getTags()); } + + @Override + public void removeType(Set types) { + } } private class HeaderOnlyColumn implements Column { @@ -2107,5 +2109,9 @@ class ReportGenerator { public String getCellData(ArtifactData artData) { throw new UnsupportedOperationException("Cannot get cell data of unspecified column"); } + + @Override + public void removeType(Set types) { + } } }