From f6524b1c4a1167e38338e879f316847998a40b54 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Fri, 18 Apr 2014 15:13:17 -0400 Subject: [PATCH 01/42] updated KeywordSearchIngestModule to keep track of ingest status per job, not all jobs combined together --- .../KeywordSearchIngestModule.java | 52 ++++++++++++------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java index dbb9c198e5..ad2a8a6c6f 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java @@ -103,11 +103,22 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme SKIPPED_ERROR_TEXTEXTRACT, ///< File was skipped because of text extraction issues SKIPPED_ERROR_IO ///< File was skipped because of IO issues reading it }; - private static final Map ingestStatus = new HashMap<>(); //guarded by itself + private static final Map> ingestStatus = new HashMap<>(); //guarded by itself - static void putIngestStatus(long id, IngestStatus status) { - synchronized(ingestStatus) { - ingestStatus.put(id, status); + private static void initIngestStatus(long ingestJobId) { + synchronized(ingestStatus) { + if (ingestStatus.get(ingestJobId) == null) { + Map ingestStatusForJob = new HashMap<>(); + ingestStatus.put(ingestJobId, ingestStatusForJob); + } + } + } + + private static void putIngestStatus(long ingestJobId, long fileId, IngestStatus status) { + synchronized(ingestStatus) { + Map ingestStatusForJob = ingestStatus.get(ingestJobId); + ingestStatusForJob.put(fileId, status); + ingestStatus.put(ingestJobId, ingestStatusForJob); } } @@ -201,7 +212,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme if (initialized == false) //error initializing indexing/Solr { logger.log(Level.WARNING, "Skipping processing, module not initialized, file: {0}", abstractFile.getName()); - putIngestStatus(abstractFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); + putIngestStatus(jobId, abstractFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); return ProcessResult.OK; } try { @@ -314,16 +325,17 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme int error_io = 0; synchronized(ingestStatus) { - for (IngestStatus s : ingestStatus.values()) { + Map ingestStatusForJob = ingestStatus.get(jobId); + for (IngestStatus s : ingestStatusForJob.values()) { switch (s) { case TEXT_INGESTED: - ++text_ingested; + text_ingested++; break; case METADATA_INGESTED: - ++metadata_ingested; + metadata_ingested++; break; case STRINGS_INGESTED: - ++strings_ingested; + strings_ingested++; break; case SKIPPED_ERROR_TEXTEXTRACT: error_text++; @@ -411,16 +423,16 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme private boolean extractStringsAndIndex(AbstractFile aFile) { try { if (stringExtractor.index(aFile)) { - putIngestStatus(aFile.getId(), IngestStatus.STRINGS_INGESTED); + putIngestStatus(jobId, aFile.getId(), IngestStatus.STRINGS_INGESTED); return true; } else { logger.log(Level.WARNING, "Failed to extract strings and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); - putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); + putIngestStatus(jobId, aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); return false; } } catch (IngesterException ex) { logger.log(Level.WARNING, "Failed to extract strings and ingest, file '" + aFile.getName() + "' (id: " + aFile.getId() + ").", ex); - putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); + putIngestStatus(jobId, aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); return false; } } @@ -466,9 +478,9 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme if ((indexContent == false || aFile.isDir() || size == 0)) { try { ingester.ingest(aFile, false); //meta-data only - putIngestStatus(aFile.getId(), IngestStatus.METADATA_INGESTED); + putIngestStatus(jobId, aFile.getId(), IngestStatus.METADATA_INGESTED); } catch (IngesterException ex) { - putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); + putIngestStatus(jobId, aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); } return; @@ -502,9 +514,9 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme if (AbstractFileExtract.ARCHIVE_MIME_TYPES.contains(detectedFormat)) { try { ingester.ingest(aFile, false); //meta-data only - putIngestStatus(aFile.getId(), IngestStatus.METADATA_INGESTED); + putIngestStatus(jobId, aFile.getId(), IngestStatus.METADATA_INGESTED); } catch (IngesterException ex) { - putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); + putIngestStatus(jobId, aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); } return; @@ -517,20 +529,20 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme //logger.log(Level.INFO, "indexing: " + aFile.getName()); if (!extractTextAndIndex(aFile, detectedFormat)) { logger.log(Level.WARNING, "Failed to extract text and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); - putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); + putIngestStatus(jobId, aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); } else { - putIngestStatus(aFile.getId(), IngestStatus.TEXT_INGESTED); + putIngestStatus(jobId, aFile.getId(), IngestStatus.TEXT_INGESTED); wasTextAdded = true; } } catch (IngesterException e) { logger.log(Level.INFO, "Could not extract text with Tika, " + aFile.getId() + ", " + aFile.getName(), e); - putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); + putIngestStatus(jobId, aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); } catch (Exception e) { logger.log(Level.WARNING, "Error extracting text with Tika, " + aFile.getId() + ", " + aFile.getName(), e); - putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); + putIngestStatus(jobId, aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); } } From f8e922928b3f63df91a4e0a6c4a846e7c8191db3 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Fri, 18 Apr 2014 16:04:19 -0400 Subject: [PATCH 02/42] init ingest status --- .../autopsy/keywordsearch/KeywordSearchIngestModule.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java index ad2a8a6c6f..9bafa43ec0 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java @@ -136,7 +136,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme public void startUp(IngestJobContext context) throws IngestModuleException { logger.log(Level.INFO, "Initializing instance {0}", instanceNum); initialized = false; - jobId = context.getJobId(); + jobId = context.getJobId(); caseHandle = Case.getCurrentCase().getSleuthkitCase(); tikaFormatDetector = new Tika(); ingester = Server.getIngester(); @@ -144,6 +144,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme // increment the module reference count // if first instance of this module for this job then check the server and existence of keywords if (refCounter.incrementAndGet(jobId) == 1) { + initIngestStatus(jobId); final Server server = KeywordSearch.getServer(); try { if (!server.isRunning()) { From 2c7eeba6d5862123a58e5a7368cc61ef0cf6a3c6 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Fri, 18 Apr 2014 16:30:15 -0400 Subject: [PATCH 03/42] cleanup() now only removes the ingest status for the current job. call cleanup() from shutDown(). --- .../autopsy/keywordsearch/KeywordSearchIngestModule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java index 9bafa43ec0..9491553c6b 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java @@ -284,6 +284,8 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme } catch (NoOpenCoreException | KeywordSearchModuleException ex) { logger.log(Level.WARNING, "Error executing Solr query to check number of indexed files/chunks: ", ex); } + + cleanup(); } /** @@ -302,7 +304,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme */ private void cleanup() { synchronized(ingestStatus) { - ingestStatus.clear(); + ingestStatus.remove(jobId); } textExtractors.clear(); From 376f82d3a7848a7af29cbb8228c5eec26faef777 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Fri, 18 Apr 2014 17:31:49 -0400 Subject: [PATCH 04/42] clean up ingestStatus only if this is the last module for that job --- .../autopsy/keywordsearch/KeywordSearchIngestModule.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java index 9491553c6b..d4c20ef695 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java @@ -272,6 +272,9 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme // We only need to post the summary msg from the last module per job if (refCounter.decrementAndGet(jobId) == 0) { postIndexSummary(); + synchronized(ingestStatus) { + ingestStatus.remove(jobId); + } } //log number of files / chunks in index @@ -303,10 +306,6 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme * Common cleanup code when module stops or final searcher completes */ private void cleanup() { - synchronized(ingestStatus) { - ingestStatus.remove(jobId); - } - textExtractors.clear(); textExtractors = null; stringExtractor = null; From 1646a5ef410e247d4f895f755402db0983ccbc0b Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Mon, 21 Apr 2014 15:25:24 -0400 Subject: [PATCH 05/42] updated HashDbIngestModule to keep track of totals for all modules per job, not all jobs combined together --- .../hashdatabase/HashDbIngestModule.java | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java index e623b4f561..6aaa7af0b8 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java @@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.hashdatabase; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.concurrent.atomic.AtomicLong; import java.util.logging.Level; @@ -57,18 +58,27 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges private List knownBadHashSets = new ArrayList<>(); private List knownHashSets = new ArrayList<>(); private long jobId; - private static AtomicLong totalKnownBadCount = new AtomicLong(0); - private static AtomicLong totalCalctime = new AtomicLong(0); - private static AtomicLong totalLookuptime = new AtomicLong(0); + private static final HashMap totalsForIngestJobs = new HashMap<>(); private static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter(); + private static class IngestJobTotals { + private AtomicLong totalKnownBadCount = new AtomicLong(0); + private AtomicLong totalCalctime = new AtomicLong(0); + private AtomicLong totalLookuptime = new AtomicLong(0); + } + + private static synchronized void initTotals(long ingestJobId) { + totalsForIngestJobs.put(ingestJobId, new HashDbIngestModule.IngestJobTotals()); + } + HashDbIngestModule(HashLookupModuleSettings settings) { this.settings = settings; } @Override public void startUp(org.sleuthkit.autopsy.ingest.IngestJobContext context) throws IngestModuleException { - jobId = context.getJobId(); + jobId = context.getJobId(); + initTotals(jobId); getEnabledHashSets(hashDbManager.getKnownBadFileHashSets(), knownBadHashSets); getEnabledHashSets(hashDbManager.getKnownFileHashSets(), knownHashSets); @@ -131,7 +141,7 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges long calcstart = System.currentTimeMillis(); md5Hash = hasher.calculateMd5(file); long delta = (System.currentTimeMillis() - calcstart); - totalCalctime.addAndGet(delta); + totalsForIngestJobs.get(jobId).totalCalctime.addAndGet(delta); } catch (IOException ex) { logger.log(Level.WARNING, "Error calculating hash of file " + name, ex); @@ -156,7 +166,7 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges HashInfo hashInfo = db.lookUp(file); if (null != hashInfo) { foundBad = true; - totalKnownBadCount.incrementAndGet(); + totalsForIngestJobs.get(jobId).totalKnownBadCount.incrementAndGet(); try { skCase.setKnown(file, TskData.FileKnown.BAD); @@ -191,7 +201,7 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges postHashSetHitToBlackboard(file, md5Hash, hashSetName, comment, db.getSendIngestMessages()); } long delta = (System.currentTimeMillis() - lookupstart); - totalLookuptime.addAndGet(delta); + totalsForIngestJobs.get(jobId).totalLookuptime.addAndGet(delta); } catch (TskException ex) { logger.log(Level.WARNING, "Couldn't lookup known bad hash for file " + name + " - see sleuthkit log for details", ex); @@ -224,7 +234,7 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges } } long delta = (System.currentTimeMillis() - lookupstart); - totalLookuptime.addAndGet(delta); + totalsForIngestJobs.get(jobId).totalLookuptime.addAndGet(delta); } catch (TskException ex) { logger.log(Level.WARNING, "Couldn't lookup known hash for file " + name + " - see sleuthkit log for details", ex); @@ -306,6 +316,8 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges @Override public void shutDown(boolean ingestJobCancelled) { if (refCounter.decrementAndGet(jobId) == 0) { + IngestJobTotals jobTotals = totalsForIngestJobs.remove(jobId); + if ((!knownBadHashSets.isEmpty()) || (!knownHashSets.isEmpty())) { StringBuilder detailsSb = new StringBuilder(); //details @@ -314,14 +326,14 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges detailsSb.append("") .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.knownBadsFound")) .append(""); - detailsSb.append("").append(totalKnownBadCount.get()).append(""); + detailsSb.append("").append(jobTotals.totalKnownBadCount.get()).append(""); detailsSb.append("") .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.totalCalcTime")) - .append("").append(totalCalctime.get()).append("\n"); + .append("").append(jobTotals.totalCalctime.get()).append("\n"); detailsSb.append("") .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.totalLookupTime")) - .append("").append(totalLookuptime.get()).append("\n"); + .append("").append(jobTotals.totalLookuptime.get()).append("\n"); detailsSb.append(""); detailsSb.append("

") From 4fb5b491bd7ac340f0acc770614b76f7f3a8e309 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Mon, 21 Apr 2014 15:31:56 -0400 Subject: [PATCH 06/42] fixed init for changes in previous commit --- .../sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java index 6aaa7af0b8..197bfde03a 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java @@ -78,11 +78,12 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges @Override public void startUp(org.sleuthkit.autopsy.ingest.IngestJobContext context) throws IngestModuleException { jobId = context.getJobId(); - initTotals(jobId); getEnabledHashSets(hashDbManager.getKnownBadFileHashSets(), knownBadHashSets); getEnabledHashSets(hashDbManager.getKnownFileHashSets(), knownHashSets); - if (refCounter.incrementAndGet(jobId) == 1) { + if (refCounter.incrementAndGet(jobId) == 1) { + initTotals(jobId); + // if first module for this job then post error msgs if needed if (knownBadHashSets.isEmpty()) { From 3b3ae6ee8e591c0f5af090034fd5cc5f6633f444 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Mon, 21 Apr 2014 15:34:30 -0400 Subject: [PATCH 07/42] updated FileExtMismatchIngestModule to keep track of totals for all modules per job, not all jobs combined together --- .../FileExtMismatchIngestModule.java | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java index 5745017a08..122a35e440 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java @@ -52,10 +52,30 @@ public class FileExtMismatchIngestModule extends IngestModuleAdapter implements private final FileExtMismatchDetectorModuleSettings settings; private HashMap SigTypeToExtMap = new HashMap<>(); private long jobId; - private static AtomicLong processTime = new AtomicLong(0); - private static AtomicLong numFiles = new AtomicLong(0); + private static final HashMap totalsForIngestJobs = new HashMap<>(); private static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter(); + private static class IngestJobTotals { + long processTime = 0; + long numFiles = 0; + } + + private static synchronized void initTotals(long ingestJobId) { + totalsForIngestJobs.put(ingestJobId, new IngestJobTotals()); + } + + /** + * Update the match time total and increment num of files for this job + * @param ingestJobId + * @param matchTimeInc amount of time to add + */ + private static synchronized void addToTotals(long ingestJobId, long processTimeInc) { + IngestJobTotals ingestJobTotals = totalsForIngestJobs.get(ingestJobId); + ingestJobTotals.processTime += processTimeInc; + ingestJobTotals.numFiles++; + totalsForIngestJobs.put(ingestJobId, ingestJobTotals); + } + FileExtMismatchIngestModule(FileExtMismatchDetectorModuleSettings settings) { this.settings = settings; } @@ -63,7 +83,9 @@ public class FileExtMismatchIngestModule extends IngestModuleAdapter implements @Override public void startUp(IngestJobContext context) throws IngestModuleException { jobId = context.getJobId(); - refCounter.incrementAndGet(jobId); + if (refCounter.incrementAndGet(jobId) == 1) { + initTotals(jobId); + } FileExtMismatchXML xmlLoader = FileExtMismatchXML.getDefault(); SigTypeToExtMap = xmlLoader.load(); } @@ -87,8 +109,7 @@ public class FileExtMismatchIngestModule extends IngestModuleAdapter implements boolean mismatchDetected = compareSigTypeToExt(abstractFile); - processTime.getAndAdd(System.currentTimeMillis() - startTime); - numFiles.getAndIncrement(); + addToTotals(jobId, System.currentTimeMillis() - startTime); if (mismatchDetected) { // add artifact @@ -155,16 +176,18 @@ public class FileExtMismatchIngestModule extends IngestModuleAdapter implements @Override public void shutDown(boolean ingestJobCancelled) { // We only need to post the summary msg from the last module per job - if (refCounter.decrementAndGet(jobId) == 0) { + if (refCounter.decrementAndGet(jobId) == 0) { + IngestJobTotals jobTotals = totalsForIngestJobs.remove(jobId); + StringBuilder detailsSb = new StringBuilder(); detailsSb.append(""); detailsSb.append(""); detailsSb.append("\n"); + .append("\n"); detailsSb.append("\n"); + .append("\n"); detailsSb.append("
").append(FileExtMismatchDetectorModuleFactory.getModuleName()).append("
").append( NbBundle.getMessage(this.getClass(), "FileExtMismatchIngestModule.complete.totalProcTime")) - .append("").append(processTime.get()).append("
").append(jobTotals.processTime).append("
").append( NbBundle.getMessage(this.getClass(), "FileExtMismatchIngestModule.complete.totalFiles")) - .append("").append(numFiles.get()).append("
").append(jobTotals.numFiles).append("
"); services.postMessage(IngestMessage.createMessage(IngestMessage.MessageType.INFO, FileExtMismatchDetectorModuleFactory.getModuleName(), NbBundle.getMessage(this.getClass(), From 882a9adf86dbeaf48b9e65f483d98d803c1bf6b2 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Mon, 21 Apr 2014 17:30:29 -0400 Subject: [PATCH 08/42] Pulled 2 new hardcoded strings. --- .../autopsy/modules/fileextmismatch/Bundle.properties | 2 ++ .../FileExtMismatchDetectorModuleFactory.java | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties index c5610f46ad..7c63074fbe 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties @@ -50,3 +50,5 @@ FileExtMismatchSettingsPanel.userExtTextField.text= FileExtMismatchSettingsPanel.addExtButton.text=Add Extension FileExtMismatchSettingsPanel.removeExtButton.text=Remove Selected Extension FileExtMismatchSettingsPanel.userTypeTextField.text= +FileExtMismatchDetectorModuleFactory.getIngestJobSettingsPanel.exception.msg=Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings +FileExtMismatchDetectorModuleFactory.createFileIngestModule.exception.msg=Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchDetectorModuleFactory.java b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchDetectorModuleFactory.java index 645de2ba48..4eb9931d2e 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchDetectorModuleFactory.java +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchDetectorModuleFactory.java @@ -70,7 +70,8 @@ public class FileExtMismatchDetectorModuleFactory extends IngestModuleFactoryAda public IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings) { assert settings instanceof FileExtMismatchDetectorModuleSettings; if (!(settings instanceof FileExtMismatchDetectorModuleSettings)) { - throw new IllegalArgumentException("Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings"); + throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(), + "FileExtMismatchDetectorModuleFactory.getIngestJobSettingsPanel.exception.msg")); } FileExtMismatchModuleSettingsPanel settingsPanel = new FileExtMismatchModuleSettingsPanel((FileExtMismatchDetectorModuleSettings) settings); return settingsPanel; @@ -97,7 +98,8 @@ public class FileExtMismatchDetectorModuleFactory extends IngestModuleFactoryAda public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) { assert settings instanceof FileExtMismatchDetectorModuleSettings; if (!(settings instanceof FileExtMismatchDetectorModuleSettings)) { - throw new IllegalArgumentException("Expected settings argument to be instanceof FileExtMismatchDetectorModuleSettings"); + throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(), + "FileExtMismatchDetectorModuleFactory.createFileIngestModule.exception.msg")); } return new FileExtMismatchIngestModule((FileExtMismatchDetectorModuleSettings) settings); } From 2d6a6234eb16e790e220004ce6045967f3c8b35f Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Mon, 21 Apr 2014 17:42:37 -0400 Subject: [PATCH 09/42] Pulled 2 new hardcoded strings. --- .../sleuthkit/autopsy/modules/filetypeid/Bundle.properties | 2 ++ .../autopsy/modules/filetypeid/FileTypeIdModuleFactory.java | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties index 4850085f1e..dd37c22195 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties @@ -6,3 +6,5 @@ FileTypeIdIngestModule.moduleDesc.text=Matches file types based on binary signat FileTypeIdIngestModule.complete.totalProcTime=Total Processing Time FileTypeIdIngestModule.complete.totalFiles=Total Files Processed FileTypeIdIngestModule.complete.srvMsg.text=File Type Id Results +FileTypeIdModuleFactory.getIngestJobSettingsPanel.exception.msg=Expected settings argument to be instanceof FileTypeIdModuleSettings +FileTypeIdModuleFactory.createFileIngestModule.exception.msg=Expected settings argument to be instanceof FileTypeIdModuleSettings diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdModuleFactory.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdModuleFactory.java index 0e041f116e..6688fd8027 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdModuleFactory.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeIdModuleFactory.java @@ -69,7 +69,8 @@ public class FileTypeIdModuleFactory extends IngestModuleFactoryAdapter { public IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings) { assert settings instanceof FileTypeIdModuleSettings; if (!(settings instanceof FileTypeIdModuleSettings)) { - throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdModuleSettings"); + throw new IllegalArgumentException(NbBundle.getMessage(this.getClass(), + "FileTypeIdModuleFactory.getIngestJobSettingsPanel.exception.msg")); } return new FileTypeIdModuleSettingsPanel((FileTypeIdModuleSettings) settings); } @@ -83,7 +84,8 @@ public class FileTypeIdModuleFactory extends IngestModuleFactoryAdapter { public FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings) { assert settings instanceof FileTypeIdModuleSettings; if (!(settings instanceof FileTypeIdModuleSettings)) { - throw new IllegalArgumentException("Expected settings argument to be instanceof FileTypeIdModuleSettings"); + throw new IllegalArgumentException( + NbBundle.getMessage(this.getClass(), "FileTypeIdModuleFactory.createFileIngestModule.exception.msg")); } return new FileTypeIdIngestModule((FileTypeIdModuleSettings) settings); } From d2bc6672faf027a672336489acaedb564dc0f5e5 Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Tue, 22 Apr 2014 10:31:00 -0400 Subject: [PATCH 10/42] Translation complete. --- .../fileextmismatch/Bundle_ja.properties | 92 ++++++++++--------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties index 5ab739bd53..b3a8612dee 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties @@ -1,46 +1,48 @@ -OpenIDE-Module-Name=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4 -OptionsCategory_Name_FileExtMismatchOptions=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4 -OptionsCategory_FileExtMismatch=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4 -AddFileExtensionAction.msgDlg.msg=XML\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304f\u306e\u3092\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -AddFileExtensionAction.msgDlg.title=\u4e0d\u4e00\u81f4\u62e1\u5f35\u5b50\u306e\u8ffd\u52a0\u30a8\u30e9\u30fc -FileExtMismatchConfigPanel.name.text=\u30a2\u30c9\u30d0\u30f3\u30b9\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4\u8a2d\u5b9a -FileExtMismatchConfigPanel.addExtButton.errLabel.empty=\u62e1\u5f35\u5b50\u30c6\u30ad\u30b9\u30c8\u304c\u7a7a\u767d\u3067\u3059\uff01 -FileExtMismatchConfigPanel.addExtButton.errLabel.noMimeType=MIME\u30bf\u30a4\u30d7\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 -FileExtMismatchConfigPanel.addExtButton.errLabel.extExists=\u62e1\u5f35\u5b50\u306f\u3059\u3067\u306b\u5b58\u5728\u3057\u307e\u3059\uff01 -FileExtMismatchConfigPanel.addExtButton.errLabel.extAdded=\u62e1\u5f35\u5b50{0}\u306f\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 -FileExtMismatchConfigPanel.addTypeButton.empty=MIME\u30bf\u30a4\u30d7\u30c6\u30ad\u30b9\u30c8\u304c\u7a7a\u767d\u3067\u3059\uff01 -FileExtMismatchConfigPanel.addTypeButton.mimeTypeNotSupported=MIME\u30bf\u30a4\u30d7\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 -FileExtMismatchConfigPanel.addTypeButton.mimeTypeExists=MIME\u30bf\u30a4\u30d7\u306f\u3059\u3067\u306b\u5b58\u5728\u3057\u307e\u3059\uff01 -FileExtMismatchConfigPanel.addTypeButton.mimeTypeNotDetectable=MIME\u30bf\u30a4\u30d7\u306f\u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u306f\u691c\u51fa\u3067\u304d\u307e\u305b\u3093\u3002 -FileExtMismatchConfigPanel.addTypeButton.mimeTypeAdded=MIME\u30bf\u30a4\u30d7{0}\u306f\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002 -FileExtMismatchConfigPanel.removeTypeButton.noneSelected=MIME\u30bf\u30a4\u30d7\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 -FileExtMismatchConfigPanel.remoteTypeButton.deleted=MIME\u30bf\u30a4\u30d7{0}\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002 -FileExtMismatchConfigPanel.removeExtButton.noneSelected=\u62e1\u5f35\u5b50\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 -FileExtMismatchConfigPanel.removeExtButton.noMimeTypeSelected=MIME\u30bf\u30a4\u30d7\u304c\u9078\u629e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\uff01 -FileExtMismatchConfigPanel.removeExtButton.deleted=\u62e1\u5f35\u5b50{0}\u306f\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002 -FileExtMismatchConfigPanel.store.msg=\u4fdd\u5b58\u3055\u308c\u307e\u3057\u305f\u3002 -FileExtMismatchConfigPanel.store.msgDlg.msg=XML\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304f\u306e\u3092\u5931\u6557\u3057\u307e\u3057\u305f\u3002 -FileExtMismatchConfigPanel.save.msgDlg.title=\u4fdd\u5b58\u30a8\u30e9\u30fc -FileExtMismatchConfigPanel.ok.confDlg.msg=\u8a2d\u5b9a\u5909\u66f4\u3092\u4fdd\u5b58\u3057\u307e\u3059\u304b\uff1f -FileExtMismatchConfigPanel.confDlg.title=\u4fdd\u5b58\u3055\u308c\u3066\u3044\u306a\u3044\u5909\u66f4 -FileExtMismatchConfigPanel.mimeTableModel.colName=MIME\u30bf\u30a4\u30d7 -FileExtMismatchConfigPanel.extTableModel.colName=\u62e1\u5f35\u5b50 -FileExtMismatchContextMenuActionsProvider.menuItemStr=\u62e1\u5f35\u5b50{0}\u3092MIME\u30bf\u30a4\u30d7{1}\u306e\u4e00\u81f4\u3068\u3057\u3066\u8ffd\u52a0 -FileExtMismatchIngestModule.moduleName=\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4\u30c7\u30a3\u30c6\u30af\u30bf\u30fc -FileExtMismatchIngestModule.moduleDesc.text=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\u306b\u57fa\u3065\u3044\u3066\u3001\u6a19\u6e96\u7684\u3067\u306f\u306a\u3044\u62e1\u5f35\u5b50\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\u3092\u30d5\u30e9\u30b0\u4ed8\u3051\u3057\u307e\u3059\u3002d -FileExtMismatchIngestModule.complete.totalProcTime=\u5408\u8a08\u51e6\u7406\u6642\u9593 -FileExtMismatchIngestModule.complete.totalFiles=\u5408\u8a08\u51e6\u7406\u30d5\u30a1\u30a4\u30eb\u6570 -FileExtMismatchIngestModule.complete.svcMsg.text=\u30d5\u30a1\u30a4\u30eb\u62e1\u5f35\u5b50\u4e0d\u4e00\u81f4\u7d50\u679c -FileExtMismatchOptionsPanelController.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc -FileExtMismatchOptionsPanelController.moduleErr.msg=FileExtMismatchOptionsPanelController\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306e\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3067\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 -AddFileExtensionAction.extHeaderLbl.text=\u4e0b\u8a18\u7528\u306b\u8a31\u53ef\u3055\u308c\u305f\u62e1\u5f35\u5b50 -FileExtMismatchModuleSettingsPanel.skipTextPlain.text=\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u30b9\u30ad\u30c3\u30d7 +OpenIDE-Module-Name=\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4 +OptionsCategory_Name_FileExtMismatchOptions=\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4 +OptionsCategory_FileExtMismatch=\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4 +AddFileExtensionAction.msgDlg.msg=XML\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304F\u306E\u3092\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +AddFileExtensionAction.msgDlg.title=\u4E0D\u4E00\u81F4\u62E1\u5F35\u5B50\u306E\u8FFD\u52A0\u30A8\u30E9\u30FC +FileExtMismatchConfigPanel.name.text=\u30A2\u30C9\u30D0\u30F3\u30B9\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4\u8A2D\u5B9A +FileExtMismatchConfigPanel.addExtButton.errLabel.empty=\u62E1\u5F35\u5B50\u30C6\u30AD\u30B9\u30C8\u304C\u7A7A\u767D\u3067\u3059\uFF01 +FileExtMismatchConfigPanel.addExtButton.errLabel.noMimeType=MIME\u30BF\u30A4\u30D7\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01 +FileExtMismatchConfigPanel.addExtButton.errLabel.extExists=\u62E1\u5F35\u5B50\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\uFF01 +FileExtMismatchConfigPanel.addExtButton.errLabel.extAdded=\u62E1\u5F35\u5B50{0}\u306F\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002 +FileExtMismatchConfigPanel.addTypeButton.empty=MIME\u30BF\u30A4\u30D7\u30C6\u30AD\u30B9\u30C8\u304C\u7A7A\u767D\u3067\u3059\uFF01 +FileExtMismatchConfigPanel.addTypeButton.mimeTypeNotSupported=MIME\u30BF\u30A4\u30D7\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01 +FileExtMismatchConfigPanel.addTypeButton.mimeTypeExists=MIME\u30BF\u30A4\u30D7\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\uFF01 +FileExtMismatchConfigPanel.addTypeButton.mimeTypeNotDetectable=MIME\u30BF\u30A4\u30D7\u306F\u3053\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u306F\u691C\u51FA\u3067\u304D\u307E\u305B\u3093\u3002 +FileExtMismatchConfigPanel.addTypeButton.mimeTypeAdded=MIME\u30BF\u30A4\u30D7{0}\u306F\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F\u3002 +FileExtMismatchConfigPanel.removeTypeButton.noneSelected=MIME\u30BF\u30A4\u30D7\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01 +FileExtMismatchConfigPanel.remoteTypeButton.deleted=MIME\u30BF\u30A4\u30D7{0}\u306F\u524A\u9664\u3055\u308C\u307E\u3057\u305F\u3002 +FileExtMismatchConfigPanel.removeExtButton.noneSelected=\u62E1\u5F35\u5B50\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01 +FileExtMismatchConfigPanel.removeExtButton.noMimeTypeSelected=MIME\u30BF\u30A4\u30D7\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\uFF01 +FileExtMismatchConfigPanel.removeExtButton.deleted=\u62E1\u5F35\u5B50{0}\u306F\u524A\u9664\u3055\u308C\u307E\u3057\u305F\u3002 +FileExtMismatchConfigPanel.store.msg=\u4FDD\u5B58\u3055\u308C\u307E\u3057\u305F\u3002 +FileExtMismatchConfigPanel.store.msgDlg.msg=XML\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304F\u306E\u3092\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +FileExtMismatchConfigPanel.save.msgDlg.title=\u4FDD\u5B58\u30A8\u30E9\u30FC +FileExtMismatchConfigPanel.ok.confDlg.msg=\u8A2D\u5B9A\u5909\u66F4\u3092\u4FDD\u5B58\u3057\u307E\u3059\u304B\uFF1F +FileExtMismatchConfigPanel.confDlg.title=\u4FDD\u5B58\u3055\u308C\u3066\u3044\u306A\u3044\u5909\u66F4 +FileExtMismatchConfigPanel.mimeTableModel.colName=MIME\u30BF\u30A4\u30D7 +FileExtMismatchConfigPanel.extTableModel.colName=\u62E1\u5F35\u5B50 +FileExtMismatchContextMenuActionsProvider.menuItemStr=\u62E1\u5F35\u5B50{0}\u3092MIME\u30BF\u30A4\u30D7{1}\u306E\u4E00\u81F4\u3068\u3057\u3066\u8FFD\u52A0 +FileExtMismatchIngestModule.moduleName=\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4\u30C7\u30A3\u30C6\u30AF\u30BF\u30FC +FileExtMismatchIngestModule.moduleDesc.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\u306B\u57FA\u3065\u3044\u3066\u3001\u6A19\u6E96\u7684\u3067\u306F\u306A\u3044\u62E1\u5F35\u5B50\u3092\u6301\u3064\u30D5\u30A1\u30A4\u30EB\u3092\u30D5\u30E9\u30B0\u4ED8\u3051\u3057\u307E\u3059\u3002d +FileExtMismatchIngestModule.complete.totalProcTime=\u5408\u8A08\u51E6\u7406\u6642\u9593 +FileExtMismatchIngestModule.complete.totalFiles=\u5408\u8A08\u51E6\u7406\u30D5\u30A1\u30A4\u30EB\u6570 +FileExtMismatchIngestModule.complete.svcMsg.text=\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4\u7D50\u679C +FileExtMismatchOptionsPanelController.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC +FileExtMismatchOptionsPanelController.moduleErr.msg=FileExtMismatchOptionsPanelController\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306E\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002 +AddFileExtensionAction.extHeaderLbl.text=\u4E0B\u8A18\u7528\u306B\u8A31\u53EF\u3055\u308C\u305F\u62E1\u5F35\u5B50 +FileExtMismatchModuleSettingsPanel.skipTextPlain.text=\u30C6\u30AD\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u306F\u30B9\u30AD\u30C3\u30D7 -FileExtMismatchModuleSettingsPanel.skipNoExtCheckBox.text=\u62e1\u5f35\u5b50\u306e\u7121\u3044\u30d5\u30a1\u30a4\u30eb\u306f\u30b9\u30ad\u30c3\u30d7 -FileExtMismatchSettingsPanel.addTypeButton.text=\u30bf\u30a4\u30d7\u3092\u8ffd\u52a0 -FileExtMismatchSettingsPanel.extHeaderLabel.text=\u8a31\u53ef\u3055\u308c\u305f\u62e1\u5f35\u5b50\uff1a -FileExtMismatchSettingsPanel.removeTypeButton.text=\u9078\u629e\u3057\u305f\u30bf\u30a4\u30d7\u3092\u524a\u9664 -FileExtMismatchSettingsPanel.saveButton.text=\u8a2d\u5b9a\u3092\u4fdd\u5b58 -FileExtMismatchSettingsPanel.jLabel1.text=\u30d5\u30a1\u30a4\u30eb\u30bf\u30a4\u30d7\uff1a -FileExtMismatchSettingsPanel.addExtButton.text=\u62e1\u5f35\u5b50\u3092\u8ffd\u52a0 -FileExtMismatchSettingsPanel.removeExtButton.text=\u9078\u629e\u3057\u305f\u62e1\u5f35\u5b50\u3092\u524a\u9664 +FileExtMismatchModuleSettingsPanel.skipNoExtCheckBox.text=\u62E1\u5F35\u5B50\u306E\u7121\u3044\u30D5\u30A1\u30A4\u30EB\u306F\u30B9\u30AD\u30C3\u30D7 +FileExtMismatchSettingsPanel.addTypeButton.text=\u30BF\u30A4\u30D7\u3092\u8FFD\u52A0 +FileExtMismatchSettingsPanel.extHeaderLabel.text=\u8A31\u53EF\u3055\u308C\u305F\u62E1\u5F35\u5B50\uFF1A +FileExtMismatchSettingsPanel.removeTypeButton.text=\u9078\u629E\u3057\u305F\u30BF\u30A4\u30D7\u3092\u524A\u9664 +FileExtMismatchSettingsPanel.saveButton.text=\u8A2D\u5B9A\u3092\u4FDD\u5B58 +FileExtMismatchSettingsPanel.jLabel1.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\uFF1A +FileExtMismatchSettingsPanel.addExtButton.text=\u62E1\u5F35\u5B50\u3092\u8FFD\u52A0 +FileExtMismatchSettingsPanel.removeExtButton.text=\u9078\u629E\u3057\u305F\u62E1\u5F35\u5B50\u3092\u524A\u9664 +FileExtMismatchDetectorModuleFactory.getIngestJobSettingsPanel.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof FileExtMismatchDetectorModuleSettings\u3067\u3059\u3002 +FileExtMismatchDetectorModuleFactory.createFileIngestModule.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof FileExtMismatchDetectorModuleSettings\u3067\u3059\u3002 From 87252f606bacdd1cce16386e7775dbbf7433a210 Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Tue, 22 Apr 2014 10:36:07 -0400 Subject: [PATCH 11/42] Committing before checking out different branch. --- .../sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties index ba061fa59d..7bd2227b8a 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties @@ -5,4 +5,5 @@ FileTypeIdIngestModule.moduleDesc.text=\u30D0\u30A4\u30CA\u30EA\u7F72\u540D\u306 FileTypeIdIngestModule.complete.totalProcTime=\u5408\u8A08\u51E6\u7406\u6642\u9593 FileTypeIdIngestModule.complete.totalFiles=\u5408\u8A08\u51E6\u7406\u30D5\u30A1\u30A4\u30EB\u6570 FileTypeIdIngestModule.complete.srvMsg.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\u7279\u5B9A\u306E\u7D50\u679C -FileTypeIdModuleSettingsPanel.skipKnownCheckBox.text=\u65E2\u77E5\u30D5\u30A1\u30A4\u30EB\uFF08NSRL\uFF09\u3092\u30B9\u30AD\u30C3\u30D7 \ No newline at end of file +FileTypeIdModuleSettingsPanel.skipKnownCheckBox.text=\u65E2\u77E5\u30D5\u30A1\u30A4\u30EB\uFF08NSRL\uFF09\u3092\u30B9\u30AD\u30C3\u30D7 +FileTypeIdModuleFactory.getIngestJobSettingsPanel.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u305F\u5F15\u6570\u306Finstanceof FileTypeIdModuleSettings\u3067\u3059\u3002 \ No newline at end of file From ef8f3516826684032428e9fd9f11d3aaa0bfda6c Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Tue, 22 Apr 2014 10:40:01 -0400 Subject: [PATCH 12/42] Translation complete. --- .../sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties index 7bd2227b8a..a12d0e7cd8 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle_ja.properties @@ -6,4 +6,5 @@ FileTypeIdIngestModule.complete.totalProcTime=\u5408\u8A08\u51E6\u7406\u6642\u95 FileTypeIdIngestModule.complete.totalFiles=\u5408\u8A08\u51E6\u7406\u30D5\u30A1\u30A4\u30EB\u6570 FileTypeIdIngestModule.complete.srvMsg.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\u7279\u5B9A\u306E\u7D50\u679C FileTypeIdModuleSettingsPanel.skipKnownCheckBox.text=\u65E2\u77E5\u30D5\u30A1\u30A4\u30EB\uFF08NSRL\uFF09\u3092\u30B9\u30AD\u30C3\u30D7 -FileTypeIdModuleFactory.getIngestJobSettingsPanel.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u305F\u5F15\u6570\u306Finstanceof FileTypeIdModuleSettings\u3067\u3059\u3002 \ No newline at end of file +FileTypeIdModuleFactory.getIngestJobSettingsPanel.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof FileTypeIdModuleSettings\u3067\u3059\u3002 +FileTypeIdModuleFactory.createFileIngestModule.exception.msg=\u8A2D\u5B9A\u3092\u884C\u3046\u70BA\u306E\u60F3\u5B9A\u3055\u308C\u308B\u5F15\u6570\u306Finstanceof FileTypeIdModuleSettings\u3067\u3059\u3002 \ No newline at end of file From c952f3ba0e1c06818c87a85e7d96ed4cdbfdb248 Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Tue, 22 Apr 2014 11:13:11 -0400 Subject: [PATCH 13/42] Corrected inconsistency --- .../autopsy/modules/fileextmismatch/Bundle_ja.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties index b3a8612dee..b90675d25a 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties @@ -33,7 +33,7 @@ FileExtMismatchIngestModule.complete.totalFiles=\u5408\u8A08\u51E6\u7406\u30D5\u FileExtMismatchIngestModule.complete.svcMsg.text=\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u4E0D\u4E00\u81F4\u7D50\u679C FileExtMismatchOptionsPanelController.moduleErr=\u30E2\u30B8\u30E5\u30FC\u30EB\u30A8\u30E9\u30FC FileExtMismatchOptionsPanelController.moduleErr.msg=FileExtMismatchOptionsPanelController\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306E\u78BA\u8A8D\u4E2D\u306B\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u30A8\u30E9\u30FC\u3092\u8D77\u3053\u3057\u307E\u3057\u305F\u3002\u3069\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u304B\u30ED\u30B0\u3067\u78BA\u8A8D\u3057\u3066\u4E0B\u3055\u3044\u3002\u4E00\u90E8\u306E\u30C7\u30FC\u30BF\u304C\u4E0D\u5B8C\u5168\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002 -AddFileExtensionAction.extHeaderLbl.text=\u4E0B\u8A18\u7528\u306B\u8A31\u53EF\u3055\u308C\u305F\u62E1\u5F35\u5B50 +AddFileExtensionAction.extHeaderLbl.text=\u4E0B\u8A18\u7528\u306B\u8A31\u53EF\u3059\u308B\u62E1\u5F35\u5B50 FileExtMismatchModuleSettingsPanel.skipTextPlain.text=\u30C6\u30AD\u30B9\u30C8\u30D5\u30A1\u30A4\u30EB\u306F\u30B9\u30AD\u30C3\u30D7 FileExtMismatchModuleSettingsPanel.skipNoExtCheckBox.text=\u62E1\u5F35\u5B50\u306E\u7121\u3044\u30D5\u30A1\u30A4\u30EB\u306F\u30B9\u30AD\u30C3\u30D7 From af17f63171608dc199b34c1b38a955a992123e60 Mon Sep 17 00:00:00 2001 From: Kay Bassi Date: Tue, 22 Apr 2014 11:19:25 -0400 Subject: [PATCH 14/42] Corrected inconsistency --- .../autopsy/modules/fileextmismatch/Bundle_ja.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties index b90675d25a..ecaba3fc54 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle_ja.properties @@ -38,7 +38,7 @@ FileExtMismatchModuleSettingsPanel.skipTextPlain.text=\u30C6\u30AD\u30B9\u30C8\u FileExtMismatchModuleSettingsPanel.skipNoExtCheckBox.text=\u62E1\u5F35\u5B50\u306E\u7121\u3044\u30D5\u30A1\u30A4\u30EB\u306F\u30B9\u30AD\u30C3\u30D7 FileExtMismatchSettingsPanel.addTypeButton.text=\u30BF\u30A4\u30D7\u3092\u8FFD\u52A0 -FileExtMismatchSettingsPanel.extHeaderLabel.text=\u8A31\u53EF\u3055\u308C\u305F\u62E1\u5F35\u5B50\uFF1A +FileExtMismatchSettingsPanel.extHeaderLabel.text=\u8A31\u53EF\u3059\u308B\u62E1\u5F35\u5B50\uFF1A FileExtMismatchSettingsPanel.removeTypeButton.text=\u9078\u629E\u3057\u305F\u30BF\u30A4\u30D7\u3092\u524A\u9664 FileExtMismatchSettingsPanel.saveButton.text=\u8A2D\u5B9A\u3092\u4FDD\u5B58 FileExtMismatchSettingsPanel.jLabel1.text=\u30D5\u30A1\u30A4\u30EB\u30BF\u30A4\u30D7\uFF1A From 7bd773f7c964843b9671fdd78bd791bf0357840a Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Tue, 22 Apr 2014 11:55:32 -0400 Subject: [PATCH 15/42] HashDbIngestModule: Thread-safety refinement of summary posting --- .../hashdatabase/HashDbIngestModule.java | 96 ++++++++++--------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java index 197bfde03a..d32d3d073c 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java @@ -67,10 +67,15 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges private AtomicLong totalLookuptime = new AtomicLong(0); } - private static synchronized void initTotals(long ingestJobId) { - totalsForIngestJobs.put(ingestJobId, new HashDbIngestModule.IngestJobTotals()); - } - + private static synchronized IngestJobTotals getTotalsForIngestJobs(long ingestJobId) { + IngestJobTotals totals = totalsForIngestJobs.get(ingestJobId); + if (totals == null) { + totals = new HashDbIngestModule.IngestJobTotals(); + totalsForIngestJobs.put(ingestJobId, totals); + } + return totals; + } + HashDbIngestModule(HashLookupModuleSettings settings) { this.settings = settings; } @@ -82,8 +87,6 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges getEnabledHashSets(hashDbManager.getKnownFileHashSets(), knownHashSets); if (refCounter.incrementAndGet(jobId) == 1) { - initTotals(jobId); - // if first module for this job then post error msgs if needed if (knownBadHashSets.isEmpty()) { @@ -142,7 +145,7 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges long calcstart = System.currentTimeMillis(); md5Hash = hasher.calculateMd5(file); long delta = (System.currentTimeMillis() - calcstart); - totalsForIngestJobs.get(jobId).totalCalctime.addAndGet(delta); + getTotalsForIngestJobs(jobId).totalCalctime.addAndGet(delta); } catch (IOException ex) { logger.log(Level.WARNING, "Error calculating hash of file " + name, ex); @@ -167,7 +170,7 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges HashInfo hashInfo = db.lookUp(file); if (null != hashInfo) { foundBad = true; - totalsForIngestJobs.get(jobId).totalKnownBadCount.incrementAndGet(); + getTotalsForIngestJobs(jobId).totalKnownBadCount.incrementAndGet(); try { skCase.setKnown(file, TskData.FileKnown.BAD); @@ -202,7 +205,7 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges postHashSetHitToBlackboard(file, md5Hash, hashSetName, comment, db.getSendIngestMessages()); } long delta = (System.currentTimeMillis() - lookupstart); - totalsForIngestJobs.get(jobId).totalLookuptime.addAndGet(delta); + getTotalsForIngestJobs(jobId).totalLookuptime.addAndGet(delta); } catch (TskException ex) { logger.log(Level.WARNING, "Couldn't lookup known bad hash for file " + name + " - see sleuthkit log for details", ex); @@ -235,7 +238,7 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges } } long delta = (System.currentTimeMillis() - lookupstart); - totalsForIngestJobs.get(jobId).totalLookuptime.addAndGet(delta); + getTotalsForIngestJobs(jobId).totalLookuptime.addAndGet(delta); } catch (TskException ex) { logger.log(Level.WARNING, "Couldn't lookup known hash for file " + name + " - see sleuthkit log for details", ex); @@ -313,45 +316,48 @@ public class HashDbIngestModule extends IngestModuleAdapter implements FileInges } } + private synchronized void postSummary() { + IngestJobTotals jobTotals = totalsForIngestJobs.remove(jobId); + + if ((!knownBadHashSets.isEmpty()) || (!knownHashSets.isEmpty())) { + StringBuilder detailsSb = new StringBuilder(); + //details + detailsSb.append(""); + + detailsSb.append(""); + detailsSb.append(""); + + detailsSb.append("\n"); + detailsSb.append("\n"); + detailsSb.append("
") + .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.knownBadsFound")) + .append("").append(jobTotals.totalKnownBadCount.get()).append("
") + .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.totalCalcTime")) + .append("").append(jobTotals.totalCalctime.get()).append("
") + .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.totalLookupTime")) + .append("").append(jobTotals.totalLookuptime.get()).append("
"); + + detailsSb.append("

") + .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.databasesUsed")) + .append("

\n
    "); + for (HashDb db : knownBadHashSets) { + detailsSb.append("
  • ").append(db.getHashSetName()).append("
  • \n"); + } + + detailsSb.append("
"); + services.postMessage(IngestMessage.createMessage( + IngestMessage.MessageType.INFO, + HashLookupModuleFactory.getModuleName(), + NbBundle.getMessage(this.getClass(), + "HashDbIngestModule.complete.hashLookupResults"), + detailsSb.toString())); + } + } @Override public void shutDown(boolean ingestJobCancelled) { if (refCounter.decrementAndGet(jobId) == 0) { - IngestJobTotals jobTotals = totalsForIngestJobs.remove(jobId); - - if ((!knownBadHashSets.isEmpty()) || (!knownHashSets.isEmpty())) { - StringBuilder detailsSb = new StringBuilder(); - //details - detailsSb.append(""); - - detailsSb.append(""); - detailsSb.append(""); - - detailsSb.append("\n"); - detailsSb.append("\n"); - detailsSb.append("
") - .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.knownBadsFound")) - .append("").append(jobTotals.totalKnownBadCount.get()).append("
") - .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.totalCalcTime")) - .append("").append(jobTotals.totalCalctime.get()).append("
") - .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.totalLookupTime")) - .append("").append(jobTotals.totalLookuptime.get()).append("
"); - - detailsSb.append("

") - .append(NbBundle.getMessage(this.getClass(), "HashDbIngestModule.complete.databasesUsed")) - .append("

\n
    "); - for (HashDb db : knownBadHashSets) { - detailsSb.append("
  • ").append(db.getHashSetName()).append("
  • \n"); - } - - detailsSb.append("
"); - services.postMessage(IngestMessage.createMessage( - IngestMessage.MessageType.INFO, - HashLookupModuleFactory.getModuleName(), - NbBundle.getMessage(this.getClass(), - "HashDbIngestModule.complete.hashLookupResults"), - detailsSb.toString())); - } + postSummary(); } } } From 87de6bc96850813364fe01058ad15803ca8c8169 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Tue, 22 Apr 2014 12:01:40 -0400 Subject: [PATCH 16/42] KeywordSearchIngestModule: Added a null check to putIngestStatus() and removed the now-unnecessary init method for that --- .../KeywordSearchIngestModule.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java index d4c20ef695..7a3104f57e 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java @@ -104,19 +104,14 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme SKIPPED_ERROR_IO ///< File was skipped because of IO issues reading it }; private static final Map> ingestStatus = new HashMap<>(); //guarded by itself - - private static void initIngestStatus(long ingestJobId) { - synchronized(ingestStatus) { - if (ingestStatus.get(ingestJobId) == null) { - Map ingestStatusForJob = new HashMap<>(); - ingestStatus.put(ingestJobId, ingestStatusForJob); - } - } - } - + private static void putIngestStatus(long ingestJobId, long fileId, IngestStatus status) { synchronized(ingestStatus) { - Map ingestStatusForJob = ingestStatus.get(ingestJobId); + Map ingestStatusForJob = ingestStatus.get(ingestJobId); + if (ingestStatusForJob == null) { + ingestStatusForJob = new HashMap<>(); + } + ingestStatusForJob.put(fileId, status); ingestStatus.put(ingestJobId, ingestStatusForJob); } @@ -144,7 +139,6 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme // increment the module reference count // if first instance of this module for this job then check the server and existence of keywords if (refCounter.incrementAndGet(jobId) == 1) { - initIngestStatus(jobId); final Server server = KeywordSearch.getServer(); try { if (!server.isRunning()) { From d3c0b6d4dde0a86175f155dcac288d20bf4da29a Mon Sep 17 00:00:00 2001 From: alexjacks92 Date: Tue, 22 Apr 2014 13:44:16 -0400 Subject: [PATCH 17/42] DB dumps will now show file paths instead of object ids. --- test/script/tskdbdiff.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/test/script/tskdbdiff.py b/test/script/tskdbdiff.py index c098a6a369..9d5dff0d38 100644 --- a/test/script/tskdbdiff.py +++ b/test/script/tskdbdiff.py @@ -230,6 +230,7 @@ class TskDbDiff(object): backup_db_file = TskDbDiff._get_tmp_file("tsk_backup_db", ".db") shutil.copy(db_file, backup_db_file) conn = sqlite3.connect(backup_db_file) + id_path_table = build_id_table(conn.cursor()) conn.text_factory = lambda x: x.decode("utf-8", "ignore") # Delete the blackboard tables conn.execute("DROP TABLE blackboard_artifacts") @@ -238,7 +239,7 @@ class TskDbDiff(object): # Write to the database dump with codecs.open(dump_file, "wb", "utf_8") as db_log: for line in conn.iterdump(): - line = remove_id(line) + line = replace_id(line, id_path_table) db_log.write('%s\n' % line) # cleanup the backup @@ -263,20 +264,36 @@ class TskDbDiff(object): class TskDbDiffException(Exception): pass -def remove_id(line): +def replace_id(line, table): """Remove the object id from a line. Args: line: a String, the line to remove the object id from. + table: a map from object ids to file paths. """ index = line.find('INSERT INTO "tsk_files"') if (index != -1): - newLine = (line[:line.find('('):] + '(' + line[line.find(',') + 1:]) - #print(newLine) + # take the portion of the string between the open parenthesis and the comma (ie, the object id) + obj_id = line[line.find('(') + 1 : line.find(',')] + # taks everything from the beginning of the string up to the opening + # parenthesis, the path associated with the object id, and everything after + # the first comma, and concactenate it + newLine = (line[:line.find('('):] + '(' + table[int(obj_id)] + line[line.find(','):]) return newLine else: return line +def build_id_table(artifact_cursor): + """Build the map of object ids to file paths. + + Args: + artifact_cursor: the database cursor + """ + + mapping = dict([(row[0], str(row[1]) + str(row[2])) for row in artifact_cursor.execute("SELECT obj_id, parent_path, name FROM tsk_files")]) + return mapping + + def main(): try: sys.argv.pop(0) From 1e943b1f2d43cc0b2f6e130351c2ce186c79a3ab Mon Sep 17 00:00:00 2001 From: alexjacks92 Date: Tue, 22 Apr 2014 13:47:26 -0400 Subject: [PATCH 18/42] Added a comment for the potentially confusing dictionary creation code. --- test/script/tskdbdiff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/script/tskdbdiff.py b/test/script/tskdbdiff.py index 9d5dff0d38..c43c631d09 100644 --- a/test/script/tskdbdiff.py +++ b/test/script/tskdbdiff.py @@ -289,7 +289,8 @@ def build_id_table(artifact_cursor): Args: artifact_cursor: the database cursor """ - + # for each row in the db, take the object id, parent path, and name, then create a tuple in the dictionary + # with the object id as the key and the full file path (parent + name) as the value mapping = dict([(row[0], str(row[1]) + str(row[2])) for row in artifact_cursor.execute("SELECT obj_id, parent_path, name FROM tsk_files")]) return mapping From fcd7c3cdd7459bf9da4ac3c6125904eb0b0b9212 Mon Sep 17 00:00:00 2001 From: alexjacks92 Date: Tue, 22 Apr 2014 13:48:06 -0400 Subject: [PATCH 19/42] Typo fix. --- test/script/tskdbdiff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/script/tskdbdiff.py b/test/script/tskdbdiff.py index c43c631d09..b3b7a986cb 100644 --- a/test/script/tskdbdiff.py +++ b/test/script/tskdbdiff.py @@ -275,7 +275,7 @@ def replace_id(line, table): if (index != -1): # take the portion of the string between the open parenthesis and the comma (ie, the object id) obj_id = line[line.find('(') + 1 : line.find(',')] - # taks everything from the beginning of the string up to the opening + # takes everything from the beginning of the string up to the opening # parenthesis, the path associated with the object id, and everything after # the first comma, and concactenate it newLine = (line[:line.find('('):] + '(' + table[int(obj_id)] + line[line.find(','):]) From 6473ffb5b31a8655d9b7341849aa12f07a96c9e8 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Tue, 22 Apr 2014 14:13:20 -0400 Subject: [PATCH 20/42] Fixed spelling mistake. --- .../sleuthkit/autopsy/examples/SampleIngestModuleFactory.java | 4 ++-- .../sleuthkit/autopsy/ingest/IngestJobConfigurationPanel.java | 4 ++-- .../src/org/sleuthkit/autopsy/ingest/IngestModuleFactory.java | 2 +- .../sleuthkit/autopsy/ingest/IngestModuleFactoryAdapter.java | 2 +- ...tttingsPanel.java => IngestModuleGlobalSettingsPanel.java} | 2 +- .../org/sleuthkit/autopsy/ingest/IngestModuleTemplate.java | 2 +- .../fileextmismatch/FileExtMismatchDetectorModuleFactory.java | 4 ++-- .../modules/fileextmismatch/FileExtMismatchSettingsPanel.java | 4 ++-- .../autopsy/hashdatabase/HashLookupModuleFactory.java | 4 ++-- .../autopsy/hashdatabase/HashLookupSettingsPanel.java | 4 ++-- .../keywordsearch/KeywordSearchGlobalSettingsPanel.java | 4 ++-- .../autopsy/keywordsearch/KeywordSearchModuleFactory.java | 4 ++-- 12 files changed, 20 insertions(+), 20 deletions(-) rename Core/src/org/sleuthkit/autopsy/ingest/{IngestModuleGlobalSetttingsPanel.java => IngestModuleGlobalSettingsPanel.java} (92%) diff --git a/Core/src/org/sleuthkit/autopsy/examples/SampleIngestModuleFactory.java b/Core/src/org/sleuthkit/autopsy/examples/SampleIngestModuleFactory.java index 9e9fbba5fe..a1388ce15f 100755 --- a/Core/src/org/sleuthkit/autopsy/examples/SampleIngestModuleFactory.java +++ b/Core/src/org/sleuthkit/autopsy/examples/SampleIngestModuleFactory.java @@ -43,7 +43,7 @@ import org.openide.util.NbBundle; import org.sleuthkit.autopsy.ingest.IngestModuleFactory; import org.sleuthkit.autopsy.ingest.DataSourceIngestModule; import org.sleuthkit.autopsy.ingest.FileIngestModule; -import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel; +import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel; @@ -167,7 +167,7 @@ public class SampleIngestModuleFactory implements IngestModuleFactory { * @return A global settings panel. */ @Override - public IngestModuleGlobalSetttingsPanel getGlobalSettingsPanel() { + public IngestModuleGlobalSettingsPanel getGlobalSettingsPanel() { throw new UnsupportedOperationException(); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobConfigurationPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobConfigurationPanel.java index a0c617a4bd..117d8882e0 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobConfigurationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobConfigurationPanel.java @@ -325,7 +325,7 @@ class IngestJobConfigurationPanel extends javax.swing.JPanel { static private class IngestModuleModel { private final IngestModuleTemplate moduleTemplate; - private IngestModuleGlobalSetttingsPanel globalSettingsPanel = null; + private IngestModuleGlobalSettingsPanel globalSettingsPanel = null; private IngestModuleIngestJobSettingsPanel moduleSettingsPanel = null; IngestModuleModel(IngestModuleTemplate moduleTemplate) { @@ -370,7 +370,7 @@ class IngestJobConfigurationPanel extends javax.swing.JPanel { return moduleTemplate.hasGlobalSettingsPanel(); } - IngestModuleGlobalSetttingsPanel getGlobalSettingsPanel() { + IngestModuleGlobalSettingsPanel getGlobalSettingsPanel() { return globalSettingsPanel; } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactory.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactory.java index d097ff557c..c59e3868c8 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactory.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactory.java @@ -113,7 +113,7 @@ public interface IngestModuleFactory { * * @return A global settings panel. */ - IngestModuleGlobalSetttingsPanel getGlobalSettingsPanel(); + IngestModuleGlobalSettingsPanel getGlobalSettingsPanel(); /** * Gets the default per ingest job settings for instances of the family of diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryAdapter.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryAdapter.java index 60bea92713..2c4831bb01 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryAdapter.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleFactoryAdapter.java @@ -39,7 +39,7 @@ public abstract class IngestModuleFactoryAdapter implements IngestModuleFactory } @Override - public IngestModuleGlobalSetttingsPanel getGlobalSettingsPanel() { + public IngestModuleGlobalSettingsPanel getGlobalSettingsPanel() { throw new UnsupportedOperationException(); } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSetttingsPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSettingsPanel.java similarity index 92% rename from Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSetttingsPanel.java rename to Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSettingsPanel.java index f6de631e9b..30724bfe8d 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSetttingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleGlobalSettingsPanel.java @@ -23,7 +23,7 @@ import javax.swing.JPanel; /** * Base class for ingest module global settings panels. */ -public abstract class IngestModuleGlobalSetttingsPanel extends JPanel { +public abstract class IngestModuleGlobalSettingsPanel extends JPanel { public abstract void saveSettings(); } \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleTemplate.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleTemplate.java index f536b7916e..58dbc0004f 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleTemplate.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestModuleTemplate.java @@ -61,7 +61,7 @@ final class IngestModuleTemplate { return moduleFactory.hasGlobalSettingsPanel(); } - IngestModuleGlobalSetttingsPanel getGlobalSettingsPanel() { + IngestModuleGlobalSettingsPanel getGlobalSettingsPanel() { return moduleFactory.getGlobalSettingsPanel(); } diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchDetectorModuleFactory.java b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchDetectorModuleFactory.java index 645de2ba48..5bffca30c2 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchDetectorModuleFactory.java +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchDetectorModuleFactory.java @@ -26,7 +26,7 @@ import org.sleuthkit.autopsy.ingest.FileIngestModule; import org.sleuthkit.autopsy.ingest.IngestModuleFactory; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel; -import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel; +import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel; /** * An factory that creates file ingest modules that detect mismatches between @@ -82,7 +82,7 @@ public class FileExtMismatchDetectorModuleFactory extends IngestModuleFactoryAda } @Override - public IngestModuleGlobalSetttingsPanel getGlobalSettingsPanel() { + public IngestModuleGlobalSettingsPanel getGlobalSettingsPanel() { FileExtMismatchSettingsPanel globalOptionsPanel = new FileExtMismatchSettingsPanel(); globalOptionsPanel.load(); return globalOptionsPanel; diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchSettingsPanel.java index ee76aa4095..de8b1e30dd 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchSettingsPanel.java @@ -29,7 +29,7 @@ import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.table.AbstractTableModel; -import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel; +import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.modules.filetypeid.FileTypeIdIngestModule; @@ -39,7 +39,7 @@ import org.sleuthkit.autopsy.corecomponents.OptionsPanel; * Container panel for File Extension Mismatch Ingest Module advanced * configuration options */ -final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSetttingsPanel implements OptionsPanel { +final class FileExtMismatchSettingsPanel extends IngestModuleGlobalSettingsPanel implements OptionsPanel { private static Logger logger = Logger.getLogger(FileExtMismatchSettingsPanel.class.getName()); private HashMap editableMap = new HashMap<>(); diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupModuleFactory.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupModuleFactory.java index 3e2934f323..b9fa7bebf5 100755 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupModuleFactory.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupModuleFactory.java @@ -28,7 +28,7 @@ import org.sleuthkit.autopsy.ingest.FileIngestModule; import org.sleuthkit.autopsy.ingest.IngestModuleFactory; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel; -import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel; +import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel; /** * A factory that creates file ingest modules that do hash database lookups. @@ -98,7 +98,7 @@ public class HashLookupModuleFactory extends IngestModuleFactoryAdapter { } @Override - public IngestModuleGlobalSetttingsPanel getGlobalSettingsPanel() { + public IngestModuleGlobalSettingsPanel getGlobalSettingsPanel() { HashLookupSettingsPanel globalSettingsPanel = new HashLookupSettingsPanel(); globalSettingsPanel.load(); return globalSettingsPanel; diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java index 4e1e9ceb70..055a242cc3 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashLookupSettingsPanel.java @@ -45,13 +45,13 @@ import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb; import org.sleuthkit.autopsy.hashdatabase.HashDbManager.HashDb.KnownFilesType; -import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel; +import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel; /** * Instances of this class provide a comprehensive UI for managing the hash sets * configuration. */ -public final class HashLookupSettingsPanel extends IngestModuleGlobalSetttingsPanel implements OptionsPanel { +public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPanel implements OptionsPanel { private static final String NO_SELECTION_TEXT = NbBundle .getMessage(HashLookupSettingsPanel.class, "HashDbConfigPanel.noSelectionText"); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSettingsPanel.java index d400abe80c..dc0fdf2912 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSettingsPanel.java @@ -20,12 +20,12 @@ package org.sleuthkit.autopsy.keywordsearch; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.corecomponents.OptionsPanel; -import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel; +import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel; /** * Global options panel for keyword searching. */ -final class KeywordSearchGlobalSettingsPanel extends IngestModuleGlobalSetttingsPanel implements OptionsPanel { +final class KeywordSearchGlobalSettingsPanel extends IngestModuleGlobalSettingsPanel implements OptionsPanel { private KeywordSearchGlobalListSettingsPanel listsPanel; private KeywordSearchGlobalLanguageSettingsPanel languagesPanel; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchModuleFactory.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchModuleFactory.java index d20d7c4c96..98e882ba2c 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchModuleFactory.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchModuleFactory.java @@ -30,7 +30,7 @@ import org.sleuthkit.autopsy.ingest.FileIngestModule; import org.sleuthkit.autopsy.ingest.IngestModuleFactory; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel; -import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel; +import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel; /** * An ingest module factory that creates file ingest modules that do keyword @@ -100,7 +100,7 @@ public class KeywordSearchModuleFactory extends IngestModuleFactoryAdapter { } @Override - public IngestModuleGlobalSetttingsPanel getGlobalSettingsPanel() { + public IngestModuleGlobalSettingsPanel getGlobalSettingsPanel() { KeywordSearchGlobalSettingsPanel globalSettingsPanel = new KeywordSearchGlobalSettingsPanel(); globalSettingsPanel.load(); return globalSettingsPanel; From 840538d52c6cd27ca079ac4b6612e3c32f72bda2 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Tue, 22 Apr 2014 14:22:31 -0400 Subject: [PATCH 21/42] Adjusted SampleFileIngestModule to use the null check / init idiom --- .../examples/SampleFileIngestModule.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java b/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java index 988d834904..05bdb633da 100755 --- a/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/examples/SampleFileIngestModule.java @@ -97,10 +97,6 @@ class SampleFileIngestModule extends IngestModuleAdapter implements FileIngestMo } } } - - // This method is thread-safe with per ingest job reference counted - // management of shared data. - initBlackboardPostCount(context.getJobId()); } @Override @@ -168,15 +164,15 @@ class SampleFileIngestModule extends IngestModuleAdapter implements FileIngestMo reportBlackboardPostCount(context.getJobId()); } - synchronized static void initBlackboardPostCount(long ingestJobId) { - Long refCount = refCounter.incrementAndGet(ingestJobId); - if (refCount == 1) { - artifactCountsForIngestJobs.put(ingestJobId, 0L); - } - } - synchronized static void addToBlackboardPostCount(long ingestJobId, long countToAdd) { Long fileCount = artifactCountsForIngestJobs.get(ingestJobId); + + // Ensures that this job has an entry + if (fileCount == null) { + fileCount = 0L; + artifactCountsForIngestJobs.put(ingestJobId, fileCount); + } + fileCount += countToAdd; artifactCountsForIngestJobs.put(ingestJobId, fileCount); } From dfe3ad2233b25ae62fdc003033a3824bb2f18c7c Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Tue, 22 Apr 2014 14:29:14 -0400 Subject: [PATCH 22/42] Pulled new static strings. Marked a few static strings with NON-NLS. --- .../autopsy/ingest/Bundle.properties | 11 ++++++ .../autopsy/ingest/IngestJobLauncher.java | 16 ++++----- .../autopsy/ingest/IngestManager.java | 34 +++++++++++++------ 3 files changed, 43 insertions(+), 18 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties index 2c49135848..fed46c8bac 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties @@ -65,3 +65,14 @@ IngestMessagePanel.sortByComboBox.model.time=Time IngestMessagePanel.sortByComboBox.model.priority=Priority IngestMessagesToolbar.customizeButton.toolTipText=Ingest Messages IngestMessageTopComponent.initComponents.name=Ingest Inbox +IngestManager.StartIngestJobsTask.run.startupErr.dlgMsg=Unable to start up one or more ingest modules, ingest job cancelled. +IngestManager.StartIngestJobsTask.run.startupErr.dlgSolution=Please disable the failed modules or fix the errors and then restart ingest\ +by right clicking on the data source and selecting Run Ingest Modules. +IngestManager.StartIngestJobsTask.run.startupErr.dlgErrorList=Errors\:\ +\ +{0} +IngestManager.StartIngestJobsTask.run.startupErr.dlgTitle=Ingest Failure +IngestManager.StartIngestJobsTask.run.progress.msg1=Data source ingest tasks for {0} +IngestManager.StartIngestJobsTask.run.progress.msg2=Data source ingest tasks for {0} +IngestManager.StartIngestJobsTask.run.progress.msg3=Data source ingest tasks for {0} +IngestManager.StartIngestJobsTask.run.progress.msg4=Data source ingest tasks for {0} diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java index 48b75efe83..1fb2ccf989 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJobLauncher.java @@ -132,16 +132,16 @@ public final class IngestJobLauncher { for (String name : settingNames) { // Map some old core module names to the current core module names. switch (name) { - case "Thunderbird Parser": - case "MBox Parser": - moduleNames.add("Email Parser"); + case "Thunderbird Parser": //NON-NLS + case "MBox Parser": //NON-NLS + moduleNames.add("Email Parser"); //NON-NLS break; - case "File Extension Mismatch Detection": - moduleNames.add("Extension Mismatch Detector"); + case "File Extension Mismatch Detection": //NON-NLS + moduleNames.add("Extension Mismatch Detector"); //NON-NLS break; - case "EWF Verify": - case "E01 Verify": - moduleNames.add("E01 Verifier"); + case "EWF Verify": //NON-NLS + case "E01 Verify": //NON-NLS + moduleNames.add("E01 Verifier"); //NON-NLS break; default: moduleNames.add(name); diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index 2398e9c87e..76df43cae3 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -405,13 +405,19 @@ public class IngestManager { moduleStartUpErrors.append("\n"); } StringBuilder notifyMessage = new StringBuilder(); - notifyMessage.append("Unable to start up one or more ingest modules, ingest job cancelled.\n"); - notifyMessage.append("Please disable the failed modules or fix the errors and then restart ingest\n"); - notifyMessage.append("by right clicking on the data source and selecting Run Ingest Modules.\n"); - notifyMessage.append("Errors:\n\n"); - notifyMessage.append(moduleStartUpErrors.toString()); + notifyMessage.append(NbBundle.getMessage(this.getClass(), + "IngestManager.StartIngestJobsTask.run.startupErr.dlgMsg")); + notifyMessage.append("\n"); + notifyMessage.append(NbBundle.getMessage(this.getClass(), + "IngestManager.StartIngestJobsTask.run.startupErr.dlgSolution")); + notifyMessage.append("\n"); + notifyMessage.append(NbBundle.getMessage(this.getClass(), + "IngestManager.StartIngestJobsTask.run.startupErr.dlgErrorList", + moduleStartUpErrors.toString())); notifyMessage.append("\n\n"); - JOptionPane.showMessageDialog(null, notifyMessage.toString(), "Ingest Failure", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(null, notifyMessage.toString(), + NbBundle.getMessage(this.getClass(), + "IngestManager.StartIngestJobsTask.run.startupErr.dlgTitle"), JOptionPane.ERROR_MESSAGE); // Jettison the ingest job and move on to the next one. synchronized (IngestManager.this) { @@ -423,14 +429,22 @@ public class IngestManager { // Queue the data source ingest tasks for the ingest job. final String inputName = dataSource.getName(); - progress.progress("Data source ingest tasks for " + inputName, workUnitsCompleted); + progress.progress( + NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg1", + inputName), workUnitsCompleted); scheduler.getDataSourceIngestScheduler().queueForIngest(ingestJob); - progress.progress("Data source ingest tasks for " + inputName, ++workUnitsCompleted); + progress.progress( + NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg2", + inputName), ++workUnitsCompleted); // Queue the file ingest tasks for the ingest job. - progress.progress("Data source ingest tasks for " + inputName, workUnitsCompleted); + progress.progress( + NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg3", + inputName), workUnitsCompleted); scheduler.getFileIngestScheduler().queueForIngest(ingestJob); - progress.progress("Data source ingest tasks for " + inputName, ++workUnitsCompleted); + progress.progress( + NbBundle.getMessage(this.getClass(), "IngestManager.StartIngestJobsTask.run.progress.msg4", + inputName), ++workUnitsCompleted); if (!Thread.currentThread().isInterrupted()) { startIngestTasks(); From a553e4262cb9f537ca959ee743dd35831f1329d7 Mon Sep 17 00:00:00 2001 From: "Samuel H. Kenyon" Date: Tue, 22 Apr 2014 15:02:15 -0400 Subject: [PATCH 23/42] Adjusted FileExtMismatchIngestModule to use the null check / init idiom --- .../FileExtMismatchIngestModule.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java index 122a35e440..e6a45256a7 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java @@ -56,8 +56,8 @@ public class FileExtMismatchIngestModule extends IngestModuleAdapter implements private static final IngestModuleReferenceCounter refCounter = new IngestModuleReferenceCounter(); private static class IngestJobTotals { - long processTime = 0; - long numFiles = 0; + private long processTime = 0; + private long numFiles = 0; } private static synchronized void initTotals(long ingestJobId) { @@ -71,6 +71,11 @@ public class FileExtMismatchIngestModule extends IngestModuleAdapter implements */ private static synchronized void addToTotals(long ingestJobId, long processTimeInc) { IngestJobTotals ingestJobTotals = totalsForIngestJobs.get(ingestJobId); + if (ingestJobTotals == null) { + ingestJobTotals = new IngestJobTotals(); + totalsForIngestJobs.put(ingestJobId, ingestJobTotals); + } + ingestJobTotals.processTime += processTimeInc; ingestJobTotals.numFiles++; totalsForIngestJobs.put(ingestJobId, ingestJobTotals); @@ -83,9 +88,8 @@ public class FileExtMismatchIngestModule extends IngestModuleAdapter implements @Override public void startUp(IngestJobContext context) throws IngestModuleException { jobId = context.getJobId(); - if (refCounter.incrementAndGet(jobId) == 1) { - initTotals(jobId); - } + refCounter.incrementAndGet(jobId); + FileExtMismatchXML xmlLoader = FileExtMismatchXML.getDefault(); SigTypeToExtMap = xmlLoader.load(); } From 7f87653414555a66bbf633267a4997128dcf4883 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Tue, 22 Apr 2014 15:08:33 -0400 Subject: [PATCH 24/42] KeywordSearch - Added NON-NLS tags to hardcoded strings not needing National Language Support. --- .../keywordsearch/AbstractFileExtract.java | 62 +++---- .../AbstractFileHtmlExtract.java | 27 +-- .../AbstractFileStringContentStream.java | 2 +- .../AbstractFileStringExtract.java | 6 +- .../AbstractFileTikaTextExtract.java | 32 ++-- .../keywordsearch/ByteContentStream.java | 2 +- .../keywordsearch/DropdownSearchPanel.java | 6 +- .../keywordsearch/ExtractedContentPanel.java | 26 +-- .../keywordsearch/ExtractedContentViewer.java | 16 +- .../HighlightedMatchesSource.java | 30 ++-- .../autopsy/keywordsearch/Ingester.java | 34 ++-- .../autopsy/keywordsearch/Installer.java | 50 +++--- .../keywordsearch/JerichoParserWrapper.java | 20 +-- .../autopsy/keywordsearch/KeywordSearch.java | 12 +- .../KeywordSearchEditListPanel.java | 10 +- ...eywordSearchGlobalSearchSettingsPanel.java | 4 +- .../KeywordSearchIngestModule.java | 58 +++---- .../KeywordSearchJobSettingsPanel.java | 6 +- .../KeywordSearchListsAbstract.java | 30 ++-- .../KeywordSearchListsEncase.java | 6 +- .../KeywordSearchListsManagementPanel.java | 6 +- .../KeywordSearchListsViewerPanel.java | 4 +- .../keywordsearch/KeywordSearchListsXML.java | 38 ++--- .../KeywordSearchModuleFactory.java | 2 +- .../KeywordSearchOptionsPanelController.java | 4 +- .../keywordsearch/KeywordSearchPanel.java | 16 +- .../KeywordSearchQueryManager.java | 2 +- .../KeywordSearchResultFactory.java | 10 +- .../keywordsearch/KeywordSearchSettings.java | 50 +++--- .../keywordsearch/KeywordSearchUtil.java | 2 +- .../autopsy/keywordsearch/LuceneQuery.java | 40 ++--- .../autopsy/keywordsearch/SearchRunner.java | 70 ++++---- .../autopsy/keywordsearch/Server.java | 156 +++++++++--------- .../keywordsearch/TermComponentQuery.java | 18 +- 34 files changed, 429 insertions(+), 428 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileExtract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileExtract.java index dcb8b25728..1a8b8ae6aa 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileExtract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileExtract.java @@ -44,37 +44,37 @@ interface AbstractFileExtract { static final List ARCHIVE_MIME_TYPES = Arrays.asList( //ignore unstructured binary and compressed data, for which string extraction or unzipper works better - "application/x-7z-compressed", - "application/x-ace-compressed", - "application/x-alz-compressed", - "application/x-arj", - "application/vnd.ms-cab-compressed", - "application/x-cfs-compressed", - "application/x-dgc-compressed", - "application/x-apple-diskimage", - "application/x-gca-compressed", - "application/x-dar", - "application/x-lzx", - "application/x-lzh", - "application/x-rar-compressed", - "application/x-stuffit", - "application/x-stuffitx", - "application/x-gtar", - "application/x-archive", - "application/x-executable", - "application/x-gzip", - "application/zip", - "application/x-zoo", - "application/x-cpio", - "application/x-shar", - "application/x-tar", - "application/x-bzip", - "application/x-bzip2", - "application/x-lzip", - "application/x-lzma", - "application/x-lzop", - "application/x-z", - "application/x-compress"); + "application/x-7z-compressed", //NON-NLS + "application/x-ace-compressed", //NON-NLS + "application/x-alz-compressed", //NON-NLS + "application/x-arj", //NON-NLS + "application/vnd.ms-cab-compressed", //NON-NLS + "application/x-cfs-compressed", //NON-NLS + "application/x-dgc-compressed", //NON-NLS + "application/x-apple-diskimage", //NON-NLS + "application/x-gca-compressed", //NON-NLS + "application/x-dar", //NON-NLS + "application/x-lzx", //NON-NLS + "application/x-lzh", //NON-NLS + "application/x-rar-compressed", //NON-NLS + "application/x-stuffit", //NON-NLS + "application/x-stuffitx", //NON-NLS + "application/x-gtar", //NON-NLS + "application/x-archive", //NON-NLS + "application/x-executable", //NON-NLS + "application/x-gzip", //NON-NLS + "application/zip", //NON-NLS + "application/x-zoo", //NON-NLS + "application/x-cpio", //NON-NLS + "application/x-shar", //NON-NLS + "application/x-tar", //NON-NLS + "application/x-bzip", //NON-NLS + "application/x-bzip2", //NON-NLS + "application/x-lzip", //NON-NLS + "application/x-lzma", //NON-NLS + "application/x-lzop", //NON-NLS + "application/x-z", //NON-NLS + "application/x-compress"); //NON-NLS /** * Get number of chunks resulted from extracting this AbstractFile diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileHtmlExtract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileHtmlExtract.java index 38a5a51e71..1faf6ada56 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileHtmlExtract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileHtmlExtract.java @@ -53,12 +53,13 @@ import org.sleuthkit.datamodel.ReadContentInputStream; private int numChunks = 0; static final List WEB_MIME_TYPES = Arrays.asList( - "application/javascript", - "application/xhtml+xml", - "application/json", - "text/css", - "text/html", - "text/javascript" //"application/xml", + "application/javascript", //NON-NLS + "application/xhtml+xml", //NON-NLS + "application/json", //NON-NLS + "text/css", //NON-NLS + "text/html", //NON-NLS NON-NLS + "text/javascript" //NON-NLS + //"application/xml", //"application/xml-dtd", ); @@ -114,7 +115,7 @@ import org.sleuthkit.datamodel.ReadContentInputStream; // In case there is an exception or parse() isn't called if (reader == null) { - logger.log(Level.WARNING, "No reader available from HTML parser"); + logger.log(Level.WARNING, "No reader available from HTML parser"); //NON-NLS return false; } @@ -174,29 +175,29 @@ import org.sleuthkit.datamodel.ReadContentInputStream; ++this.numChunks; } catch (Ingester.IngesterException ingEx) { success = false; - logger.log(Level.WARNING, "Ingester had a problem with extracted HTML from file '" - + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); + logger.log(Level.WARNING, "Ingester had a problem with extracted HTML from file '" //NON-NLS + + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); //NON-NLS throw ingEx; //need to rethrow/return to signal error and move on } } } catch (IOException ex) { - logger.log(Level.WARNING, "Unable to read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); + logger.log(Level.WARNING, "Unable to read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); //NON-NLS success = false; } catch (Exception ex) { - logger.log(Level.WARNING, "Unexpected error, can't read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); + logger.log(Level.WARNING, "Unexpected error, can't read content stream from " + sourceFile.getId() + ": " + sourceFile.getName(), ex); //NON-NLS success = false; } finally { try { stream.close(); } catch (IOException ex) { - logger.log(Level.WARNING, "Unable to close content stream from " + sourceFile.getId(), ex); + logger.log(Level.WARNING, "Unable to close content stream from " + sourceFile.getId(), ex); //NON-NLS } try { if (reader != null) { reader.close(); } } catch (IOException ex) { - logger.log(Level.WARNING, "Unable to close content reader from " + sourceFile.getId(), ex); + logger.log(Level.WARNING, "Unable to close content reader from " + sourceFile.getId(), ex); //NON-NLS } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringContentStream.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringContentStream.java index 22c3c5a5fb..78a8f5faf0 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringContentStream.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringContentStream.java @@ -54,7 +54,7 @@ import org.sleuthkit.datamodel.AbstractFile; @Override public String getContentType() { - return "text/plain;charset=" + charset.name(); + return "text/plain;charset=" + charset.name(); //NON-NLS } @Override diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java index 17b419ffab..65ef4c31a1 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileStringExtract.java @@ -141,7 +141,7 @@ class AbstractFileStringExtract implements AbstractFileExtract { ++this.numChunks; } catch (IngesterException ingEx) { success = false; - logger.log(Level.WARNING, "Ingester had a problem with extracted strings from file '" + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); + logger.log(Level.WARNING, "Ingester had a problem with extracted strings from file '" + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); //NON-NLS throw ingEx; //need to rethrow/return to signal error and move on } @@ -153,13 +153,13 @@ class AbstractFileStringExtract implements AbstractFileExtract { ingester.ingest(this); } catch (IOException ex) { - logger.log(Level.WARNING, "Unable to read input stream to divide and send to Solr, file: " + sourceFile.getName(), ex); + logger.log(Level.WARNING, "Unable to read input stream to divide and send to Solr, file: " + sourceFile.getName(), ex); //NON-NLS success = false; } finally { try { stringStream.close(); } catch (IOException ex) { - logger.log(Level.WARNING, "Error closing input stream stream, file: " + sourceFile.getName(), ex); + logger.log(Level.WARNING, "Error closing input stream stream, file: " + sourceFile.getName(), ex); //NON-NLS } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileTikaTextExtract.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileTikaTextExtract.java index 4090d8b570..b04ec4d2d9 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileTikaTextExtract.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/AbstractFileTikaTextExtract.java @@ -80,7 +80,7 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract { for (MediaType mt : mediaTypes) { TIKA_SUPPORTED_TYPES.add(mt.getType() + "/" + mt.getSubtype()); } - logger.log(Level.INFO, "Tika supported media types: {0}", TIKA_SUPPORTED_TYPES); + logger.log(Level.INFO, "Tika supported media types: {0}", TIKA_SUPPORTED_TYPES); //NON-NLS } @Override @@ -149,7 +149,7 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract { reader = parseTask.getReader(); if (reader == null) { //likely due to exception in parse() - logger.log(Level.WARNING, "No reader available from Tika parse"); + logger.log(Level.WARNING, "No reader available from Tika parse"); //NON-NLS return false; } @@ -206,7 +206,7 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract { //sort meta data keys List sortedKeyList = Arrays.asList(meta.names()); Collections.sort(sortedKeyList); - sb.append("\n\n------------------------------METADATA------------------------------\n\n"); + sb.append("\n\n------------------------------METADATA------------------------------\n\n"); //NON-NLS for (String key : sortedKeyList) { String value = meta.get(key); sb.append(key).append(": ").append(value).append("\n"); @@ -224,18 +224,18 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract { ++this.numChunks; } catch (Ingester.IngesterException ingEx) { success = false; - logger.log(Level.WARNING, "Ingester had a problem with extracted strings from file '" - + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); + logger.log(Level.WARNING, "Ingester had a problem with extracted strings from file '" //NON-NLS + + sourceFile.getName() + "' (id: " + sourceFile.getId() + ").", ingEx); //NON-NLS throw ingEx; //need to rethrow/return to signal error and move on } } } catch (IOException ex) { - final String msg = "Exception: Unable to read Tika content stream from " + sourceFile.getId() + ": " + sourceFile.getName(); + final String msg = "Exception: Unable to read Tika content stream from " + sourceFile.getId() + ": " + sourceFile.getName(); //NON-NLS KeywordSearch.getTikaLogger().log(Level.WARNING, msg, ex); logger.log(Level.WARNING, msg); success = false; } catch (Exception ex) { - final String msg = "Exception: Unexpected error, can't read Tika content stream from " + sourceFile.getId() + ": " + sourceFile.getName(); + final String msg = "Exception: Unexpected error, can't read Tika content stream from " + sourceFile.getId() + ": " + sourceFile.getName(); //NON-NLS KeywordSearch.getTikaLogger().log(Level.WARNING, msg, ex); logger.log(Level.WARNING, msg); success = false; @@ -243,14 +243,14 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract { try { stream.close(); } catch (IOException ex) { - logger.log(Level.WARNING, "Unable to close Tika content stream from " + sourceFile.getId(), ex); + logger.log(Level.WARNING, "Unable to close Tika content stream from " + sourceFile.getId(), ex); //NON-NLS } try { if (reader != null) { reader.close(); } } catch (IOException ex) { - logger.log(Level.WARNING, "Unable to close content reader from " + sourceFile.getId(), ex); + logger.log(Level.WARNING, "Unable to close content reader from " + sourceFile.getId(), ex); //NON-NLS } } @@ -269,17 +269,17 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract { public boolean isSupported(AbstractFile file, String detectedFormat) { if (detectedFormat == null) { return false; - } else if (detectedFormat.equals("application/octet-stream") - || detectedFormat.equals("application/x-msdownload")) { + } else if (detectedFormat.equals("application/octet-stream") //NON-NLS + || detectedFormat.equals("application/x-msdownload")) { //NON-NLS //any binary unstructured blobs (string extraction will be used) return false; } else if (AbstractFileExtract.ARCHIVE_MIME_TYPES.contains(detectedFormat)) { return false; } //skip video other than flv (tika supports flv only) - else if (detectedFormat.contains("video/") - && !detectedFormat.equals("video/x-flv")) { + else if (detectedFormat.contains("video/") //NON-NLS + && !detectedFormat.equals("video/x-flv")) { //NON-NLS return false; - } else if (detectedFormat.contains("application/x-font-ttf")) { + } else if (detectedFormat.contains("application/x-font-ttf")) { //NON-NLS // Tika currently has a bug in the ttf parser in fontbox. // It will throw an out of memory exception return false; @@ -319,11 +319,11 @@ class AbstractFileTikaTextExtract implements AbstractFileExtract { try { reader = tika.parse(stream, meta); } catch (IOException ex) { - KeywordSearch.getTikaLogger().log(Level.WARNING, "Exception: Unable to Tika parse the content" + sourceFile.getId() + ": " + sourceFile.getName(), ex); + KeywordSearch.getTikaLogger().log(Level.WARNING, "Exception: Unable to Tika parse the content" + sourceFile.getId() + ": " + sourceFile.getName(), ex); //NON-NLS tika = null; reader = null; } catch (Exception ex) { - KeywordSearch.getTikaLogger().log(Level.WARNING, "Exception: Unable to Tika parse the content" + sourceFile.getId() + ": " + sourceFile.getName(), ex); + KeywordSearch.getTikaLogger().log(Level.WARNING, "Exception: Unable to Tika parse the content" + sourceFile.getId() + ": " + sourceFile.getName(), ex); //NON-NLS tika = null; reader = null; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ByteContentStream.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ByteContentStream.java index 8dc2b4fe80..97157facbb 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ByteContentStream.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ByteContentStream.java @@ -65,7 +65,7 @@ class ByteContentStream implements ContentStream { @Override public String getContentType() { - return "text/plain;charset=" + charset.name(); + return "text/plain;charset=" + charset.name(); //NON-NLS } @Override diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSearchPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSearchPanel.java index 96f48ad393..934953d4d3 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSearchPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/DropdownSearchPanel.java @@ -161,7 +161,7 @@ public class DropdownSearchPanel extends AbstractKeywordSearchPerformer { org.openide.awt.Mnemonics.setLocalizedText(selectAllMenuItem, org.openide.util.NbBundle.getMessage(DropdownSearchPanel.class, "DropdownSearchPanel.selectAllMenuItem.text")); // NOI18N rightClickMenu.add(selectAllMenuItem); - keywordTextField.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N + keywordTextField.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N NON-NLS keywordTextField.setText(org.openide.util.NbBundle.getMessage(DropdownSearchPanel.class, "DropdownSearchPanel.keywordTextField.text")); // NOI18N keywordTextField.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(192, 192, 192), 1, true)); keywordTextField.setMinimumSize(new java.awt.Dimension(2, 25)); @@ -177,7 +177,7 @@ public class DropdownSearchPanel extends AbstractKeywordSearchPerformer { } }); - searchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/search-icon.png"))); // NOI18N + searchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/search-icon.png"))); // NOI18N NON-NLS org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(DropdownSearchPanel.class, "DropdownSearchPanel.searchButton.text")); // NOI18N searchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -239,7 +239,7 @@ public class DropdownSearchPanel extends AbstractKeywordSearchPerformer { try { search(); } catch(Exception e) { - logger.log(Level.SEVERE, "search() threw exception", e); + logger.log(Level.SEVERE, "search() threw exception", e); //NON-NLS } }//GEN-LAST:event_keywordTextFieldActionPerformed diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java index d2010818c3..f5b3f7fedc 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java @@ -122,7 +122,7 @@ class ExtractedContentPanel extends javax.swing.JPanel { // set font size manually in an effort to get fonts in this panel to look // similar to what is in the 'String View' content viewer. StyleSheet ss = editorKit.getStyleSheet(); - ss.addRule("body {font-size: 8.5px;}"); + ss.addRule("body {font-size: 8.5px;}"); //NON-NLS extractedTextPane.setEditorKit(editorKit); @@ -226,43 +226,43 @@ class ExtractedContentPanel extends javax.swing.JPanel { hitButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitButtonsLabel.text")); // NOI18N - hitPreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N + hitPreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N NON-NLS hitPreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitPreviousButton.text")); // NOI18N hitPreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); hitPreviousButton.setBorderPainted(false); hitPreviousButton.setContentAreaFilled(false); - hitPreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N + hitPreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N NON-NLS hitPreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); hitPreviousButton.setPreferredSize(new java.awt.Dimension(23, 23)); - hitPreviousButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_hover.png"))); // NOI18N + hitPreviousButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_hover.png"))); // NOI18N NON-NLS - hitNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N + hitNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N NON-NLS hitNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitNextButton.text")); // NOI18N hitNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); hitNextButton.setBorderPainted(false); hitNextButton.setContentAreaFilled(false); - hitNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N + hitNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N NON-NLS hitNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); hitNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); - hitNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_hover.png"))); // NOI18N + hitNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_hover.png"))); // NOI18N NON-NLS pageButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageButtonsLabel.text")); // NOI18N - pagePreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N + pagePreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N NON-NLS pagePreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.text")); // NOI18N pagePreviousButton.setActionCommand(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.actionCommand")); // NOI18N pagePreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); pagePreviousButton.setBorderPainted(false); pagePreviousButton.setContentAreaFilled(false); - pagePreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N + pagePreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N NON-NLS pagePreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); - pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N + pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N NON-NLS pageNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageNextButton.text")); // NOI18N pageNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); pageNextButton.setBorderPainted(false); pageNextButton.setContentAreaFilled(false); - pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N + pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N NON-NLS pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); pageNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); @@ -416,7 +416,7 @@ class ExtractedContentPanel extends javax.swing.JPanel { //detect text direction using first 1024 chars and set it //get first up to 1024 chars, strip
 tag and unescape html to get the string on which to detect
             final int len = text.length();
-            final int prefixLen = "
".length();
+            final int prefixLen = "
".length(); //NON-NLS
             if (len > prefixLen) {
                 final int maxOrientChars = Math.min(len, 1024);
                 final String orientDetectText = EscapeUtil.unEscapeHtml(text.substring(prefixLen, maxOrientChars));
@@ -708,7 +708,7 @@ class ExtractedContentPanel extends javax.swing.JPanel {
             try {
                 get();
             } catch (InterruptedException | ExecutionException ex) {
-                logger.log(Level.SEVERE, "Error getting marked up text" );
+                logger.log(Level.SEVERE, "Error getting marked up text" ); //NON-NLS
             }
             // catch and ignore if we were cancelled
             catch (java.util.concurrent.CancellationException ex ) { }
diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentViewer.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentViewer.java
index a72b33bd37..d2f3174c82 100644
--- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentViewer.java
+++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentViewer.java
@@ -62,7 +62,7 @@ public class ExtractedContentViewer implements DataContentViewer {
     private int curContentChunk;
 
     public ExtractedContentViewer() {
-        logger.log(Level.INFO, "Created TextView instance: " + this);
+        logger.log(Level.INFO, "Created TextView instance: " + this); //NON-NLS
     }
 
     @Override
@@ -186,7 +186,7 @@ public class ExtractedContentViewer implements DataContentViewer {
                 try {
                     return getSolrContent(selectedNode, currentPage, hasChunks);
                 } catch (SolrServerException ex) {
-                    logger.log(Level.WARNING, "Couldn't get extracted content.", ex);
+                    logger.log(Level.WARNING, "Couldn't get extracted content.", ex); //NON-NLS
                     return "";
                 }
             }
@@ -234,10 +234,10 @@ public class ExtractedContentViewer implements DataContentViewer {
                     }
                     inited = true;
                 } catch (KeywordSearchModuleException ex) {
-                    logger.log(Level.WARNING, "Could not get number of chunks: ", ex);
+                    logger.log(Level.WARNING, "Could not get number of chunks: ", ex); //NON-NLS
 
                 } catch (NoOpenCoreException ex) {
-                    logger.log(Level.WARNING, "Could not get number of chunks: ", ex);
+                    logger.log(Level.WARNING, "Could not get number of chunks: ", ex); //NON-NLS
                 }
                 return numPages;
             }
@@ -395,10 +395,10 @@ public class ExtractedContentViewer implements DataContentViewer {
         try {
             return solrServer.queryIsIndexed(contentID);
         } catch (NoOpenCoreException ex) {
-            logger.log(Level.WARNING, "Couldn't determine whether content is supported.", ex);
+            logger.log(Level.WARNING, "Couldn't determine whether content is supported.", ex); //NON-NLS
             return false;
         } catch (KeywordSearchModuleException ex) {
-            logger.log(Level.WARNING, "Couldn't determine whether content is supported.", ex);
+            logger.log(Level.WARNING, "Couldn't determine whether content is supported.", ex); //NON-NLS
             return false;
         }
     }
@@ -456,12 +456,12 @@ public class ExtractedContentViewer implements DataContentViewer {
         try {
             curContent = EscapeUtil.escapeHtml(solrServer.getSolrContent(contentObj, chunkId)).trim();
             StringBuilder sb = new StringBuilder(curContent.length() + 20);
-            sb.append("
").append(curContent).append("
"); + sb.append("
").append(curContent).append("
"); //NON-NLS curContent = sb.toString(); curContentId = contentId; curContentChunk = chunkId; } catch (NoOpenCoreException ex) { - logger.log(Level.WARNING, "Couldn't get text content.", ex); + logger.log(Level.WARNING, "Couldn't get text content.", ex); //NON-NLS return ""; } return curContent; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/HighlightedMatchesSource.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/HighlightedMatchesSource.java index 79bc54fe73..4dc1beaf15 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/HighlightedMatchesSource.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/HighlightedMatchesSource.java @@ -44,8 +44,8 @@ import org.sleuthkit.datamodel.Content; class HighlightedMatchesSource implements MarkupSource, HighlightLookup { private static final Logger logger = Logger.getLogger(HighlightedMatchesSource.class.getName()); - private static final String HIGHLIGHT_PRE = ""; - private static final String HIGHLIGHT_POST = ""; + private static final String HIGHLIGHT_PRE = ""; //NON-NLS + private static final String HIGHLIGHT_POST = ""; //NON-NLS private static final String ANCHOR_PREFIX = HighlightedMatchesSource.class.getName() + "_"; private Content content; @@ -105,10 +105,10 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup { try { this.numberPages = solrServer.queryNumFileChunks(content.getId()); } catch (KeywordSearchModuleException ex) { - logger.log(Level.WARNING, "Could not get number pages for content: " + content.getId()); + logger.log(Level.WARNING, "Could not get number pages for content: " + content.getId()); //NON-NLS return; } catch (NoOpenCoreException ex) { - logger.log(Level.WARNING, "Could not get number pages for content: " + content.getId()); + logger.log(Level.WARNING, "Could not get number pages for content: " + content.getId()); //NON-NLS return; } @@ -146,7 +146,7 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup { try { hits = chunksQuery.performQuery(); } catch (NoOpenCoreException ex) { - logger.log(Level.INFO, "Could not get chunk info and get highlights", ex); + logger.log(Level.INFO, "Could not get chunk info and get highlights", ex); //NON-NLS return; } } @@ -355,13 +355,13 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup { q.setHighlightFragsize(0); // don't fragment the highlight, works with original highlighter, or needs "single" list builder with FVH //tune the highlighter - q.setParam("hl.useFastVectorHighlighter", "on"); //fast highlighter scales better than standard one - q.setParam("hl.tag.pre", HIGHLIGHT_PRE); //makes sense for FastVectorHighlighter only - q.setParam("hl.tag.post", HIGHLIGHT_POST); //makes sense for FastVectorHighlighter only - q.setParam("hl.fragListBuilder", "single"); //makes sense for FastVectorHighlighter only + q.setParam("hl.useFastVectorHighlighter", "on"); //fast highlighter scales better than standard one NON-NLS + q.setParam("hl.tag.pre", HIGHLIGHT_PRE); //makes sense for FastVectorHighlighter only NON-NLS + q.setParam("hl.tag.post", HIGHLIGHT_POST); //makes sense for FastVectorHighlighter only NON-NLS + q.setParam("hl.fragListBuilder", "single"); //makes sense for FastVectorHighlighter only NON-NLS //docs says makes sense for the original Highlighter only, but not really - q.setParam("hl.maxAnalyzedChars", Server.HL_ANALYZE_CHARS_UNLIMITED); + q.setParam("hl.maxAnalyzedChars", Server.HL_ANALYZE_CHARS_UNLIMITED); //NON-NLS try { QueryResponse response = solrServer.query(q, METHOD.POST); @@ -381,13 +381,13 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup { highlightedContent = insertAnchors(highlightedContent); - return "
" + highlightedContent + "
"; + return "
" + highlightedContent + "
"; //NON-NLS } } catch (NoOpenCoreException ex) { - logger.log(Level.WARNING, "Couldn't query markup for page: " + currentPage, ex); + logger.log(Level.WARNING, "Couldn't query markup for page: " + currentPage, ex); //NON-NLS return ""; } catch (KeywordSearchModuleException ex) { - logger.log(Level.WARNING, "Could not query markup for page: " + currentPage, ex); + logger.log(Level.WARNING, "Could not query markup for page: " + currentPage, ex); //NON-NLS return ""; } } @@ -423,8 +423,8 @@ class HighlightedMatchesSource implements MarkupSource, HighlightLookup { final String searchToken = HIGHLIGHT_PRE; final int indexSearchTokLen = searchToken.length(); - final String insertPre = ""; + final String insertPre = ""; //NON-NLS int count = 0; while ((index = buf.indexOf(searchToken, searchOffset)) >= 0) { String insertString = insertPre + Integer.toString(count + 1) + insertPost; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Ingester.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Ingester.java index b772c9e5bf..7aa2bfede8 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Ingester.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Ingester.java @@ -74,7 +74,7 @@ class Ingester { //for ingesting chunk as SolrInputDocument (non-content-streaming, by-pass tika) //TODO use a streaming way to add content to /update handler private static final int MAX_DOC_CHUNK_SIZE = 1024*1024; - private static final String docContentEncoding = "UTF-8"; + private static final String docContentEncoding = "UTF-8"; //NON-NLS private Ingester() { @@ -94,7 +94,7 @@ class Ingester { // Warn if files might have been left uncommited. if (uncommitedIngests) { - logger.warning("Ingester was used to add files that it never committed."); + logger.warning("Ingester was used to add files that it never committed."); //NON-NLS } } @@ -249,7 +249,7 @@ class Ingester { dataSourceId = curCase.getFileDataSource(af); params.put(Server.Schema.IMAGE_ID.toString(), Long.toString(dataSourceId)); } catch (TskCoreException ex) { - logger.log(Level.SEVERE, "Could not get data source id to properly index the file " + af.getId()); + logger.log(Level.SEVERE, "Could not get data source id to properly index the file " + af.getId()); //NON-NLS params.put(Server.Schema.IMAGE_ID.toString(), Long.toString(-1)); } @@ -309,7 +309,7 @@ class Ingester { try { is.close(); } catch (IOException ex) { - logger.log(Level.WARNING, "Could not close input stream after reading content, " + cs.getName(), ex); + logger.log(Level.WARNING, "Could not close input stream after reading content, " + cs.getName(), ex); //NON-NLS } } @@ -356,34 +356,34 @@ class Ingester { * content, but the Solr server is probably fine. */ private void ingestExtract(ContentStream cs, Map fields, final long size) throws IngesterException { - final ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); + final ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); //NON-NLS up.addContentStream(cs); setFields(up, fields); up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true); final String contentType = cs.getContentType(); if (contentType != null && !contentType.trim().equals("")) { - up.setParam("stream.contentType", contentType); + up.setParam("stream.contentType", contentType); //NON-NLS } //logger.log(Level.INFO, "Ingesting " + fields.get("file_name")); - up.setParam("commit", "false"); + up.setParam("commit", "false"); //NON-NLS final Future f = upRequestExecutor.submit(new UpRequestTask(up)); try { f.get(getTimeout(size), TimeUnit.SECONDS); } catch (TimeoutException te) { - logger.log(Level.WARNING, "Solr timeout encountered, trying to restart Solr"); + logger.log(Level.WARNING, "Solr timeout encountered, trying to restart Solr"); //NON-NLS //restart may be needed to recover from some error conditions hardSolrRestart(); throw new IngesterException( NbBundle.getMessage(this.getClass(), "Ingester.ingestExtract.exception.solrTimeout.msg", - fields.get("id"), fields.get("file_name"))); + fields.get("id"), fields.get("file_name"))); //NON-NLS } catch (Exception e) { throw new IngesterException( NbBundle.getMessage(this.getClass(), "Ingester.ingestExtract.exception.probPostToSolr.msg", - fields.get("id"), fields.get("file_name")), e); + fields.get("id"), fields.get("file_name")), e); //NON-NLS } uncommitedIngests = true; } @@ -395,7 +395,7 @@ class Ingester { try { solrServer.closeCore(); } catch (KeywordSearchModuleException ex) { - logger.log(Level.WARNING, "Cannot close core", ex); + logger.log(Level.WARNING, "Cannot close core", ex); //NON-NLS } solrServer.stop(); @@ -403,15 +403,15 @@ class Ingester { try { solrServer.start(); } catch (KeywordSearchModuleException ex) { - logger.log(Level.WARNING, "Cannot start", ex); + logger.log(Level.WARNING, "Cannot start", ex); //NON-NLS } catch (SolrServerNoPortException ex) { - logger.log(Level.WARNING, "Cannot start server with this port", ex); + logger.log(Level.WARNING, "Cannot start server with this port", ex); //NON-NLS } try { solrServer.openCore(); } catch (KeywordSearchModuleException ex) { - logger.log(Level.WARNING, "Cannot open core", ex); + logger.log(Level.WARNING, "Cannot open core", ex); //NON-NLS } } @@ -491,9 +491,9 @@ class Ingester { solrServer.commit(); uncommitedIngests = false; } catch (NoOpenCoreException ex) { - logger.log(Level.WARNING, "Error commiting index", ex); + logger.log(Level.WARNING, "Error commiting index", ex); //NON-NLS } catch (SolrServerException ex) { - logger.log(Level.WARNING, "Error commiting index", ex); + logger.log(Level.WARNING, "Error commiting index", ex); //NON-NLS } } @@ -505,7 +505,7 @@ class Ingester { */ private static void setFields(ContentStreamUpdateRequest up, Map fields) { for (Entry field : fields.entrySet()) { - up.setParam("literal." + field.getKey(), field.getValue()); + up.setParam("literal." + field.getKey(), field.getValue()); //NON-NLS } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Installer.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Installer.java index f38b9fdd81..99f4f288d4 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Installer.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Installer.java @@ -53,19 +53,19 @@ class Installer extends ModuleInstall { //TODO revise this logic, handle other server types, move some logic to Server class try { //check if running from previous application instance and try to shut down - logger.log(Level.INFO, "Checking if server is running"); + logger.log(Level.INFO, "Checking if server is running"); //NON-NLS if (server.isRunning()) { //TODO this could hang if other type of server is running - logger.log(Level.WARNING, "Already a server running on " + server.getCurrentSolrServerPort() - + " port, maybe leftover from a previous run. Trying to shut it down."); + logger.log(Level.WARNING, "Already a server running on " + server.getCurrentSolrServerPort() //NON-NLS + + " port, maybe leftover from a previous run. Trying to shut it down."); //NON-NLS //stop gracefully server.stop(); - logger.log(Level.INFO, "Re-checking if server is running"); + logger.log(Level.INFO, "Re-checking if server is running"); //NON-NLS if (server.isRunning()) { int serverPort = server.getCurrentSolrServerPort(); int serverStopPort = server.getCurrentSolrStopPort(); - logger.log(Level.SEVERE, "There's already a server running on " - + serverPort + " port that can't be shutdown."); + logger.log(Level.SEVERE, "There's already a server running on " //NON-NLS + + serverPort + " port that can't be shutdown."); //NON-NLS if (!Server.isPortAvailable(serverPort)) { reportPortError(serverPort); } else if (!Server.isPortAvailable(serverStopPort)) { @@ -78,13 +78,13 @@ class Installer extends ModuleInstall { //in this case give up } else { - logger.log(Level.INFO, "Old Solr server shutdown successfully."); + logger.log(Level.INFO, "Old Solr server shutdown successfully."); //NON-NLS //make sure there really isn't a hang Solr process, in case isRunning() reported false server.killSolr(); } } } catch (KeywordSearchModuleException e) { - logger.log(Level.SEVERE, "Starting server failed, will try to kill. ", e); + logger.log(Level.SEVERE, "Starting server failed, will try to kill. ", e); //NON-NLS server.killSolr(); } @@ -94,13 +94,13 @@ class Installer extends ModuleInstall { //Try to bind to the port 4 times at 1 second intervals. //TODO move some of this logic to Server class for (int i = 0; i <= 3; i++) { - logger.log(Level.INFO, "Checking if port available."); + logger.log(Level.INFO, "Checking if port available."); //NON-NLS if (Server.isPortAvailable(server.getCurrentSolrServerPort())) { - logger.log(Level.INFO, "Port available, trying to start server."); + logger.log(Level.INFO, "Port available, trying to start server."); //NON-NLS server.start(); break; } else if (i == 3) { - logger.log(Level.INFO, "No port available, done retrying."); + logger.log(Level.INFO, "No port available, done retrying."); //NON-NLS reportPortError(server.getCurrentSolrServerPort()); retries = 0; break; @@ -108,16 +108,16 @@ class Installer extends ModuleInstall { try { Thread.sleep(1000); } catch (InterruptedException iex) { - logger.log(Level.WARNING, "Timer interrupted"); + logger.log(Level.WARNING, "Timer interrupted"); //NON-NLS } } } } catch (SolrServerNoPortException npe) { - logger.log(Level.SEVERE, "Starting server failed due to no port available. ", npe); + logger.log(Level.SEVERE, "Starting server failed due to no port available. ", npe); //NON-NLS //try to kill it } catch (KeywordSearchModuleException e) { - logger.log(Level.SEVERE, "Starting server failed. ", e); + logger.log(Level.SEVERE, "Starting server failed. ", e); //NON-NLS } @@ -127,25 +127,25 @@ class Installer extends ModuleInstall { try { Thread.sleep(1000); } catch (InterruptedException ex) { - logger.log(Level.WARNING, "Timer interrupted."); + logger.log(Level.WARNING, "Timer interrupted."); //NON-NLS } try { - logger.log(Level.INFO, "Ensuring the server is running, retries remaining: " + retries); + logger.log(Level.INFO, "Ensuring the server is running, retries remaining: " + retries); //NON-NLS if (!server.isRunning()) { - logger.log(Level.WARNING, "Server still not running"); + logger.log(Level.WARNING, "Server still not running"); //NON-NLS try { - logger.log(Level.WARNING, "Trying to start the server. "); + logger.log(Level.WARNING, "Trying to start the server. "); //NON-NLS server.start(); } catch (SolrServerNoPortException npe) { - logger.log(Level.SEVERE, "Starting server failed due to no port available. ", npe); + logger.log(Level.SEVERE, "Starting server failed due to no port available. ", npe); //NON-NLS } } else { - logger.log(Level.INFO, "Server appears now running. "); + logger.log(Level.INFO, "Server appears now running. "); //NON-NLS break; } } catch (KeywordSearchModuleException ex) { - logger.log(Level.SEVERE, "Starting server failed. ", ex); + logger.log(Level.SEVERE, "Starting server failed. ", ex); //NON-NLS //retry if has retries } @@ -156,12 +156,12 @@ class Installer extends ModuleInstall { try { Thread.sleep(1000); } catch (InterruptedException ex) { - logger.log(Level.WARNING, "Timer interrupted."); + logger.log(Level.WARNING, "Timer interrupted."); //NON-NLS } try { - logger.log(Level.INFO, "Last check if server is running. "); + logger.log(Level.INFO, "Last check if server is running. "); //NON-NLS if (!server.isRunning()) { - logger.log(Level.SEVERE, "Server is still not running. "); + logger.log(Level.SEVERE, "Server is still not running. "); //NON-NLS //check if port is taken or some other reason int serverPort = server.getCurrentSolrServerPort(); int serverStopPort = server.getCurrentSolrStopPort(); @@ -175,7 +175,7 @@ class Installer extends ModuleInstall { } } } catch (KeywordSearchModuleException ex) { - logger.log(Level.SEVERE, "Starting server failed. ", ex); + logger.log(Level.SEVERE, "Starting server failed. ", ex); //NON-NLS reportInitError(); } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/JerichoParserWrapper.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/JerichoParserWrapper.java index 7c98ec2d18..70a217bdff 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/JerichoParserWrapper.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/JerichoParserWrapper.java @@ -83,7 +83,7 @@ class JerichoParserWrapper { // Get all the tags in the source List tags = source.getAllStartTags(); for(StartTag tag : tags) { - if(tag.getName().equals("script")) { + if(tag.getName().equals("script")) { //NON-NLS // If the tags scripts.append(tag.getElement().getContent()).append("\n"); numScripts++; - } else if(tag.getName().equals("a")) { + } else if(tag.getName().equals("a")) { //NON-NLS links.append(numLinks).append(") "); links.append(tag.getTagContent()).append("\n"); numLinks++; - } else if(tag.getName().equals("img")) { + } else if(tag.getName().equals("img")) { //NON-NLS images.append(numImages).append(") "); images.append(tag.getTagContent()).append("\n"); numImages++; @@ -118,27 +118,27 @@ class JerichoParserWrapper { out.append(text).append("\n\n"); - out.append("----------NONVISIBLE TEXT----------\n\n"); + out.append("----------NONVISIBLE TEXT----------\n\n"); //NON-NLS if(numScripts>1) { - out.append("---Scripts---\n"); + out.append("---Scripts---\n"); //NON-NLS out.append(scripts.toString()).append("\n"); } if(numLinks>1) { - out.append("---Links---\n"); + out.append("---Links---\n"); //NON-NLS out.append(links.toString()).append("\n"); } if(numImages>1) { - out.append("---Images---\n"); + out.append("---Images---\n"); //NON-NLS out.append(images.toString()).append("\n"); } if(numComments>1) { - out.append("---Comments---\n"); + out.append("---Comments---\n"); //NON-NLS out.append(comments.toString()).append("\n"); } if(numOthers>1) { - out.append("---Others---\n"); + out.append("---Others---\n"); //NON-NLS out.append(others.toString()).append("\n"); } // All done, now make it a reader reader = new StringReader(out.toString()); } catch (IOException ex) { - logger.log(Level.WARNING, "Unable to parse the HTML file", ex); + logger.log(Level.WARNING, "Unable to parse the HTML file", ex); //NON-NLS } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java index 86ec8f4619..b65fc7d46b 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearch.java @@ -42,12 +42,12 @@ public class KeywordSearch { private static Server server; //we want a custom java.util.logging.Logger here for a reason //a separate logger from framework logs - private static final Logger TIKA_LOGGER = Logger.getLogger("Tika"); + private static final Logger TIKA_LOGGER = Logger.getLogger("Tika"); //NON-NLS private static final Logger logger = Logger.getLogger(Case.class.getName()); public enum QueryType { LITERAL, REGEX }; - public static final String NUM_FILES_CHANGE_EVT = "NUM_FILES_CHANGE_EVT"; + public static final String NUM_FILES_CHANGE_EVT = "NUM_FILES_CHANGE_EVT"; //NON-NLS private static PropertyChangeSupport changeSupport = new PropertyChangeSupport(KeywordSearch.class); /** @@ -66,7 +66,7 @@ public class KeywordSearch { static { try { final int MAX_TIKA_LOG_FILES = 3; - FileHandler tikaLogHandler = new FileHandler(PlatformUtil.getUserDirectory().getAbsolutePath() + "/var/log/tika.log", + FileHandler tikaLogHandler = new FileHandler(PlatformUtil.getUserDirectory().getAbsolutePath() + "/var/log/tika.log", //NON-NLS 0, MAX_TIKA_LOG_FILES); tikaLogHandler.setFormatter(new SimpleFormatter()); tikaLogHandler.setEncoding(PlatformUtil.getLogFileEncoding()); @@ -104,7 +104,7 @@ public class KeywordSearch { changeSupport.firePropertyChange(NUM_FILES_CHANGE_EVT, oldNum, newNum); } catch (Exception e) { - logger.log(Level.SEVERE, "KeywordSearch listener threw exception", e); + logger.log(Level.SEVERE, "KeywordSearch listener threw exception", e); //NON-NLS MessageNotifyUtil.Notify.show(NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.moduleErr"), NbBundle.getMessage(KeywordSearch.class, "KeywordSearch.fireNumIdxFileChg.moduleErr.msg"), @@ -133,7 +133,7 @@ public class KeywordSearch { try { server.openCore(); } catch (Exception e) { - logger.log(Level.WARNING, "Could not open core."); + logger.log(Level.WARNING, "Could not open core."); //NON-NLS } } else if (oldValue != null) { // a case was closed @@ -142,7 +142,7 @@ public class KeywordSearch { Thread.sleep(2000); server.closeCore(); } catch (Exception e) { - logger.log(Level.WARNING, "Could not close core."); + logger.log(Level.WARNING, "Could not close core."); //NON-NLS } } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java index 359ee87d4f..90e7f197d1 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchEditListPanel.java @@ -291,13 +291,13 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec listOptionsLabel.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.listOptionsLabel.text")); // NOI18N - deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N + deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N NON-NLS deleteListButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.deleteListButton.text")); // NOI18N - saveListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/save16.png"))); // NOI18N + saveListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/save16.png"))); // NOI18N NON-NLS saveListButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.saveListButton.text")); // NOI18N - exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N + exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N NON-NLS exportButton.setText(org.openide.util.NbBundle.getMessage(KeywordSearchEditListPanel.class, "KeywordSearchEditListPanel.exportButton.text")); // NOI18N exportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -442,7 +442,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec "KeywordSearchEditListPanel.exportButtonAction.featureName.text"); JFileChooser chooser = new JFileChooser(); - final String EXTENSION = "xml"; + final String EXTENSION = "xml"; //NON-NLS FileNameExtensionFilter filter = new FileNameExtensionFilter( NbBundle.getMessage(this.getClass(), "KeywordSearchEditListPanel.exportButtonActionPerformed.fileFilterLabel"), EXTENSION); chooser.setFileFilter(filter); @@ -608,7 +608,7 @@ class KeywordSearchEditListPanel extends javax.swing.JPanel implements ListSelec ret = (Object) !word.isLiteral(); break; default: - logger.log(Level.SEVERE, "Invalid table column index: {0}", columnIndex); + logger.log(Level.SEVERE, "Invalid table column index: {0}", columnIndex); //NON-NLS break; } return ret; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSearchSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSearchSettingsPanel.java index 1bc9cccc73..7f9ce6ed0c 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSearchSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSearchSettingsPanel.java @@ -267,7 +267,7 @@ class KeywordSearchGlobalSearchSettingsPanel extends javax.swing.JPanel implemen filesIndexedValue.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedFiles())); chunksValLabel.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedChunks())); } catch (KeywordSearchModuleException | NoOpenCoreException ex) { - logger.log(Level.WARNING, "Could not get number of indexed files/chunks"); + logger.log(Level.WARNING, "Could not get number of indexed files/chunks"); //NON-NLS } KeywordSearch.addNumIndexedFilesChangeListener( @@ -283,7 +283,7 @@ class KeywordSearchGlobalSearchSettingsPanel extends javax.swing.JPanel implemen try { chunksValLabel.setText(Integer.toString(KeywordSearch.getServer().queryNumIndexedChunks())); } catch (KeywordSearchModuleException | NoOpenCoreException ex) { - logger.log(Level.WARNING, "Could not get number of indexed chunks"); + logger.log(Level.WARNING, "Could not get number of indexed chunks"); //NON-NLS } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java index dbb9c198e5..ffff9219ea 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchIngestModule.java @@ -123,7 +123,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme */ @Override public void startUp(IngestJobContext context) throws IngestModuleException { - logger.log(Level.INFO, "Initializing instance {0}", instanceNum); + logger.log(Level.INFO, "Initializing instance {0}", instanceNum); //NON-NLS initialized = false; jobId = context.getJobId(); caseHandle = Case.getCurrentCase().getSleuthkitCase(); @@ -143,7 +143,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme throw new IngestModuleException(msg); } } catch (KeywordSearchModuleException ex) { - logger.log(Level.WARNING, "Error checking if Solr server is running while initializing ingest", ex); + logger.log(Level.WARNING, "Error checking if Solr server is running while initializing ingest", ex); //NON-NLS //this means Solr is not properly initialized String msg = NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.init.badInitMsg"); String details = NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.init.tryStopSolrMsg", msg); @@ -185,7 +185,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme for (SCRIPT s : KeywordSearchSettings.getStringExtractScripts()) { sbScripts.append(s.name()).append(" "); } - logger.log(Level.INFO, "Using string extract scripts: {0}", sbScripts.toString()); + logger.log(Level.INFO, "Using string extract scripts: {0}", sbScripts.toString()); //NON-NLS textExtractors = new ArrayList<>(); //order matters, more specific extractors first @@ -200,7 +200,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme public ProcessResult process(AbstractFile abstractFile) { if (initialized == false) //error initializing indexing/Solr { - logger.log(Level.WARNING, "Skipping processing, module not initialized, file: {0}", abstractFile.getName()); + logger.log(Level.WARNING, "Skipping processing, module not initialized, file: {0}", abstractFile.getName()); //NON-NLS putIngestStatus(abstractFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); return ProcessResult.OK; } @@ -209,7 +209,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme dataSourceId = caseHandle.getFileDataSource(abstractFile); } catch (TskCoreException ex) { - logger.log(Level.SEVERE, "Error getting image id of file processed by keyword search: " + abstractFile.getName(), ex); + logger.log(Level.SEVERE, "Error getting image id of file processed by keyword search: " + abstractFile.getName(), ex); //NON-NLS } if (abstractFile.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.VIRTUAL_DIR)) { @@ -242,14 +242,14 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme */ @Override public void shutDown(boolean ingestJobCancelled) { - logger.log(Level.INFO, "Instance {0}", instanceNum); + logger.log(Level.INFO, "Instance {0}", instanceNum); //NON-NLS if (initialized == false) { return; } if (ingestJobCancelled) { - logger.log(Level.INFO, "Ingest job cancelled"); + logger.log(Level.INFO, "Ingest job cancelled"); //NON-NLS stop(); return; } @@ -267,10 +267,10 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme try { final int numIndexedFiles = KeywordSearch.getServer().queryNumIndexedFiles(); final int numIndexedChunks = KeywordSearch.getServer().queryNumIndexedChunks(); - logger.log(Level.INFO, "Indexed files count: {0}", numIndexedFiles); - logger.log(Level.INFO, "Indexed file chunks count: {0}", numIndexedChunks); + logger.log(Level.INFO, "Indexed files count: {0}", numIndexedFiles); //NON-NLS + logger.log(Level.INFO, "Indexed file chunks count: {0}", numIndexedChunks); //NON-NLS } catch (NoOpenCoreException | KeywordSearchModuleException ex) { - logger.log(Level.WARNING, "Error executing Solr query to check number of indexed files/chunks: ", ex); + logger.log(Level.WARNING, "Error executing Solr query to check number of indexed files/chunks: ", ex); //NON-NLS } } @@ -278,7 +278,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme * Handle stop event (ingest interrupted) Cleanup resources, threads, timers */ private void stop() { - logger.log(Level.INFO, "stop()"); + logger.log(Level.INFO, "stop()"); //NON-NLS SearchRunner.getInstance().stopJob(jobId); @@ -341,15 +341,15 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme } StringBuilder msg = new StringBuilder(); - msg.append(""); - msg.append(""); - msg.append(""); - msg.append(""); - msg.append(""); - msg.append(""); - msg.append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.knowFileHeaderLbl")).append("").append(text_ingested).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.fileGenStringsHead")).append("").append(strings_ingested).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.mdOnlyLbl")).append("").append(metadata_ingested).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.idxErrLbl")).append("").append(error_index).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.errTxtLbl")).append("").append(error_text).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.errIoLbl")).append("").append(error_io).append("
"); + msg.append(""); //NON-NLS + msg.append(""); //NON-NLS + msg.append(""); //NON-NLS + msg.append(""); //NON-NLS + msg.append(""); //NON-NLS + msg.append(""); //NON-NLS + msg.append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.knowFileHeaderLbl")).append("").append(text_ingested).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.fileGenStringsHead")).append("").append(strings_ingested).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.mdOnlyLbl")).append("").append(metadata_ingested).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.idxErrLbl")).append("").append(error_index).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.errTxtLbl")).append("").append(error_text).append("
").append(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.errIoLbl")).append("").append(error_io).append("
"); //NON-NLS String indexStats = msg.toString(); - logger.log(Level.INFO, "Keyword Indexing Completed: {0}", indexStats); + logger.log(Level.INFO, "Keyword Indexing Completed: {0}", indexStats); //NON-NLS services.postMessage(IngestMessage.createMessage(MessageType.INFO, KeywordSearchModuleFactory.getModuleName(), NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.kwIdxResultsLbl"), indexStats)); if (error_index > 0) { MessageNotifyUtil.Notify.error(NbBundle.getMessage(this.getClass(), "KeywordSearchIngestModule.postIndexSummary.kwIdxErrsTitle"), @@ -391,7 +391,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme } if (fileExtract == null) { - logger.log(Level.INFO, "No text extractor found for file id:{0}, name: {1}, detected format: {2}", new Object[]{aFile.getId(), aFile.getName(), detectedFormat}); + logger.log(Level.INFO, "No text extractor found for file id:{0}, name: {1}, detected format: {2}", new Object[]{aFile.getId(), aFile.getName(), detectedFormat}); //NON-NLS return false; } @@ -414,12 +414,12 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme putIngestStatus(aFile.getId(), IngestStatus.STRINGS_INGESTED); return true; } else { - logger.log(Level.WARNING, "Failed to extract strings and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); + logger.log(Level.WARNING, "Failed to extract strings and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); //NON-NLS putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); return false; } } catch (IngesterException ex) { - logger.log(Level.WARNING, "Failed to extract strings and ingest, file '" + aFile.getName() + "' (id: " + aFile.getId() + ").", ex); + logger.log(Level.WARNING, "Failed to extract strings and ingest, file '" + aFile.getName() + "' (id: " + aFile.getId() + ").", ex); //NON-NLS putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); return false; } @@ -469,7 +469,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme putIngestStatus(aFile.getId(), IngestStatus.METADATA_INGESTED); } catch (IngesterException ex) { putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); - logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); + logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); //NON-NLS } return; } @@ -481,13 +481,13 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme is = new ReadContentInputStream(aFile); detectedFormat = tikaFormatDetector.detect(is, aFile.getName()); } catch (Exception e) { - logger.log(Level.WARNING, "Could not detect format using tika for file: " + aFile, e); + logger.log(Level.WARNING, "Could not detect format using tika for file: " + aFile, e); //NON-NLS } finally { if (is != null) { try { is.close(); } catch (IOException ex) { - logger.log(Level.WARNING, "Could not close stream after detecting format using tika for file: " + logger.log(Level.WARNING, "Could not close stream after detecting format using tika for file: " //NON-NLS + aFile, ex); } } @@ -505,7 +505,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme putIngestStatus(aFile.getId(), IngestStatus.METADATA_INGESTED); } catch (IngesterException ex) { putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); - logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); + logger.log(Level.WARNING, "Unable to index meta-data for file: " + aFile.getId(), ex); //NON-NLS } return; } @@ -516,7 +516,7 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme try { //logger.log(Level.INFO, "indexing: " + aFile.getName()); if (!extractTextAndIndex(aFile, detectedFormat)) { - logger.log(Level.WARNING, "Failed to extract text and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); + logger.log(Level.WARNING, "Failed to extract text and ingest, file ''{0}'' (id: {1}).", new Object[]{aFile.getName(), aFile.getId()}); //NON-NLS putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); } else { putIngestStatus(aFile.getId(), IngestStatus.TEXT_INGESTED); @@ -524,11 +524,11 @@ public final class KeywordSearchIngestModule extends IngestModuleAdapter impleme } } catch (IngesterException e) { - logger.log(Level.INFO, "Could not extract text with Tika, " + aFile.getId() + ", " + logger.log(Level.INFO, "Could not extract text with Tika, " + aFile.getId() + ", " //NON-NLS + aFile.getName(), e); putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_INDEXING); } catch (Exception e) { - logger.log(Level.WARNING, "Error extracting text with Tika, " + aFile.getId() + ", " + logger.log(Level.WARNING, "Error extracting text with Tika, " + aFile.getId() + ", " //NON-NLS + aFile.getName(), e); putIngestStatus(aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT); } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchJobSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchJobSettingsPanel.java index d57f1d0e66..24b5973577 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchJobSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchJobSettingsPanel.java @@ -86,14 +86,14 @@ public final class KeywordSearchJobSettingsPanel extends IngestModuleIngestJobSe private void displayLanguages() { List