Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.keywordsearch.Server Class Reference

Classes

class  Core
 
enum  CORE_EVT_STATES
 
class  InputStreamPrinterThread
 
enum  Schema
 
class  ServerAction
 
class  SolrServerNoPortException
 

Public Member Functions

void addServerActionListener (PropertyChangeListener l)
 
void finalize () throws java.lang.Throwable
 
String getSolrContent (final Content content) throws NoOpenCoreException
 
String getSolrContent (final Content content, int chunkID) throws NoOpenCoreException
 
String getSolrContent (final long objectID) throws NoOpenCoreException
 
String getSolrContent (final long objectID, final int chunkID) throws NoOpenCoreException
 
QueryResponse query (SolrQuery sq) throws KeywordSearchModuleException, NoOpenCoreException
 
QueryResponse query (SolrQuery sq, SolrRequest.METHOD method) throws KeywordSearchModuleException, NoOpenCoreException
 
boolean queryIsIndexed (long contentID) throws KeywordSearchModuleException, NoOpenCoreException
 
int queryNumFileChunks (long fileID) throws KeywordSearchModuleException, NoOpenCoreException
 
int queryNumIndexedChunks () throws KeywordSearchModuleException, NoOpenCoreException
 
int queryNumIndexedDocuments () throws KeywordSearchModuleException, NoOpenCoreException
 
int queryNumIndexedFiles () throws KeywordSearchModuleException, NoOpenCoreException
 
TermsResponse queryTerms (SolrQuery sq) throws KeywordSearchModuleException, NoOpenCoreException
 

Static Public Member Functions

static String getChunkIdString (long parentID, int childID)
 
static Ingester getIngester ()
 

Static Public Attributes

static final String CHUNK_ID_SEPARATOR = "_"
 
static final String CORE_EVT = "CORE_EVT"
 
static final Charset DEFAULT_INDEXED_TEXT_CHARSET = Charset.forName("UTF-8")
 default Charset to index text as More...
 
static final String HL_ANALYZE_CHARS_UNLIMITED = "500000"
 
static final char ID_CHUNK_SEP = '_'
 
static final long MAX_CONTENT_SIZE = 1L * 1024 * 1024 * 1024
 

Private Member Functions

boolean coreIndexFolderExists (String coreName) throws SolrServerException, IOException
 
boolean coreIsLoaded (String coreName) throws SolrServerException, IOException
 
void initSettings ()
 
Core openCore (Case theCase) throws KeywordSearchModuleException
 
Core openCore (String coreName, File dataDir, CaseType caseType) throws KeywordSearchModuleException
 

Private Attributes

Core currentCore
 
final ReentrantReadWriteLock currentCoreLock
 
HttpSolrServer currentSolrServer
 
int currentSolrServerPort = 0
 
int currentSolrStopPort = 0
 
Process curSolrProcess = null
 
InputStreamPrinterThread errorRedirectThread
 
String javaPath = "java"
 
final HttpSolrServer localSolrServer
 
final ServerAction serverAction
 
final File solrFolder
 
UNCPathUtilities uncPathUtilities = null
 

Static Private Attributes

static final String CORE_PROPERTIES = "core.properties"
 
static final boolean DEBUG = false
 
static final String DEFAULT_CORE_NAME = "coreCase"
 
static final String KEY = "jjk#09s"
 
static final Logger logger = Logger.getLogger(Server.class.getName())
 
static final int MAX_SOLR_MEM_MB = 512
 
static final String SOLR = "solr"
 

Detailed Description

Handles management of a either a local or centralized Solr server and its cores.

Definition at line 74 of file Server.java.

Member Function Documentation

void org.sleuthkit.autopsy.keywordsearch.Server.addServerActionListener ( PropertyChangeListener  l)

Definition at line 251 of file Server.java.

boolean org.sleuthkit.autopsy.keywordsearch.Server.coreIndexFolderExists ( String  coreName) throws SolrServerException, IOException
private

Determines whether or not the index files folder for a Solr core exists.

Parameters
coreNamethe name of the core.
Returns
true or false
Exceptions
SolrServerException
IOException

Definition at line 1170 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.Server.openCore().

boolean org.sleuthkit.autopsy.keywordsearch.Server.coreIsLoaded ( String  coreName) throws SolrServerException, IOException
private

Determines whether or not a particular Solr core exists and is loaded.

Parameters
coreNameThe name of the core.
Returns
True if the core exists and is loaded, false if the core does not exist or is not loaded
Exceptions
SolrServerExceptionIf there is a problem communicating with the Solr server.
IOExceptionIf there is a problem communicating with the Solr server.

Definition at line 1155 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.Server.openCore().

void org.sleuthkit.autopsy.keywordsearch.Server.finalize ( ) throws java.lang.Throwable

Definition at line 246 of file Server.java.

static String org.sleuthkit.autopsy.keywordsearch.Server.getChunkIdString ( long  parentID,
int  childID 
)
static

Given file parent id and child chunk ID, return the ID string of the chunk as stored in Solr, e.g. FILEID_CHUNKID

Parameters
parentIDthe parent file id (id of the source content)
childIDthe child chunk id
Returns
formatted string id

Definition at line 1061 of file Server.java.

References org.sleuthkit.autopsy.keywordsearch.Server.CHUNK_ID_SEPARATOR.

static Ingester org.sleuthkit.autopsy.keywordsearch.Server.getIngester ( )
static

Method to return ingester instance

Returns
ingester instance

Definition at line 1048 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.KeywordSearchIngestModule.startUp().

String org.sleuthkit.autopsy.keywordsearch.Server.getSolrContent ( final Content  content) throws NoOpenCoreException

Get the text contents of the given file as stored in SOLR.

Parameters
contentto get the text for
Returns
content text string or null on error
Exceptions
NoOpenCoreException

Definition at line 964 of file Server.java.

String org.sleuthkit.autopsy.keywordsearch.Server.getSolrContent ( final Content  content,
int  chunkID 
) throws NoOpenCoreException

Get the text contents of a single chunk for the given file as stored in SOLR.

Parameters
contentto get the text for
chunkIDchunk number to query (starting at 1), or 0 if there is no chunks for that content
Returns
content text string or null if error quering
Exceptions
NoOpenCoreException

Definition at line 988 of file Server.java.

String org.sleuthkit.autopsy.keywordsearch.Server.getSolrContent ( final long  objectID) throws NoOpenCoreException

Get the text contents for the given object id.

Parameters
objectID
Returns
Exceptions
NoOpenCoreException

Definition at line 1009 of file Server.java.

String org.sleuthkit.autopsy.keywordsearch.Server.getSolrContent ( final long  objectID,
final int  chunkID 
) throws NoOpenCoreException

Get the text contents for the given object id and chunk id.

Parameters
objectID
chunkID
Returns
Exceptions
NoOpenCoreException

Definition at line 1031 of file Server.java.

void org.sleuthkit.autopsy.keywordsearch.Server.initSettings ( )
private
Core org.sleuthkit.autopsy.keywordsearch.Server.openCore ( Case  theCase) throws KeywordSearchModuleException
private

** end single-case specific methods *** Creates/opens a Solr core (index) for a case.

Parameters
theCaseThe case for which the core is to be created/opened.
Returns
An object representing the created/opened core.
Exceptions
KeywordSearchModuleExceptionIf an error occurs while creating/opening the core.

Definition at line 697 of file Server.java.

References org.sleuthkit.autopsy.core.UserPreferences.getIndexingServerHost(), org.sleuthkit.autopsy.core.UserPreferences.getIndexingServerPort(), org.sleuthkit.autopsy.keywordsearch.Server.localSolrServer, and org.sleuthkit.autopsy.casemodule.Case.CaseType.SINGLE_USER_CASE.

Core org.sleuthkit.autopsy.keywordsearch.Server.openCore ( String  coreName,
File  dataDir,
CaseType  caseType 
) throws KeywordSearchModuleException
private

Creates/opens a Solr core (index) for a case.

Parameters
coreNameThe core name.
dataDirThe data directory for the core.
caseTypeThe type of the case (single-user or multi-user) for which the core is being created/opened.
Returns
An object representing the created/opened core.
Exceptions
KeywordSearchModuleExceptionIf an error occurs while creating/opening the core.

Definition at line 1078 of file Server.java.

References org.sleuthkit.autopsy.keywordsearch.Server.CORE_PROPERTIES, org.sleuthkit.autopsy.keywordsearch.Server.coreIndexFolderExists(), org.sleuthkit.autopsy.keywordsearch.Server.coreIsLoaded(), org.sleuthkit.autopsy.casemodule.Case.CaseType.SINGLE_USER_CASE, and org.sleuthkit.autopsy.keywordsearch.Server.SOLR.

QueryResponse org.sleuthkit.autopsy.keywordsearch.Server.query ( SolrQuery  sq) throws KeywordSearchModuleException, NoOpenCoreException

Execute solr query

Parameters
sqquery
Returns
query response
Exceptions
KeywordSearchModuleException
NoOpenCoreException

Definition at line 886 of file Server.java.

QueryResponse org.sleuthkit.autopsy.keywordsearch.Server.query ( SolrQuery  sq,
SolrRequest.METHOD  method 
) throws KeywordSearchModuleException, NoOpenCoreException

Execute solr query

Parameters
sqthe query
methodhttp method to use
Returns
query response
Exceptions
KeywordSearchModuleException
NoOpenCoreException

Definition at line 913 of file Server.java.

boolean org.sleuthkit.autopsy.keywordsearch.Server.queryIsIndexed ( long  contentID) throws KeywordSearchModuleException, NoOpenCoreException

Return true if the file is indexed (either as a whole as a chunk)

Parameters
contentID
Returns
true if it is indexed
Exceptions
KeywordSearchModuleException
NoOpenCoreException

Definition at line 832 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.ExtractedContentViewer.solrHasContent().

int org.sleuthkit.autopsy.keywordsearch.Server.queryNumFileChunks ( long  fileID) throws KeywordSearchModuleException, NoOpenCoreException

Execute query that gets number of indexed file chunks for a file

Parameters
fileIDfile id of the original file broken into chunks and indexed
Returns
int representing number of indexed file chunks, 0 if there is no chunks
Exceptions
KeywordSearchModuleException
NoOpenCoreException

Definition at line 860 of file Server.java.

int org.sleuthkit.autopsy.keywordsearch.Server.queryNumIndexedChunks ( ) throws KeywordSearchModuleException, NoOpenCoreException

Execute query that gets only number of all Solr file chunks (not logical files) indexed without actually returning the content.

Returns
int representing number of indexed chunks
Exceptions
KeywordSearchModuleException
NoOpenCoreException

Definition at line 781 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.KeywordSearchIngestModule.shutDown().

int org.sleuthkit.autopsy.keywordsearch.Server.queryNumIndexedDocuments ( ) throws KeywordSearchModuleException, NoOpenCoreException

Execute query that gets only number of all Solr documents indexed (files and chunks) without actually returning the documents

Returns
int representing number of indexed files (files and chunks)
Exceptions
KeywordSearchModuleException
NoOpenCoreException

Definition at line 806 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.KeywordSearchIngestModule.startUp().

int org.sleuthkit.autopsy.keywordsearch.Server.queryNumIndexedFiles ( ) throws KeywordSearchModuleException, NoOpenCoreException

Execute query that gets only number of all Solr files indexed without actually returning the files. The result does not include chunks, only number of actual files.

Returns
int representing number of indexed files
Exceptions
KeywordSearchModuleException
NoOpenCoreException

Definition at line 756 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.SearchRunner.commit(), org.sleuthkit.autopsy.keywordsearch.DropdownToolbar.SearchSettingsChangeListener.propertyChange(), and org.sleuthkit.autopsy.keywordsearch.KeywordSearchIngestModule.shutDown().

TermsResponse org.sleuthkit.autopsy.keywordsearch.Server.queryTerms ( SolrQuery  sq) throws KeywordSearchModuleException, NoOpenCoreException

Execute Solr terms query

Parameters
sqthe query
Returns
terms response
Exceptions
KeywordSearchModuleException
NoOpenCoreException

Definition at line 939 of file Server.java.

Member Data Documentation

final String org.sleuthkit.autopsy.keywordsearch.Server.CHUNK_ID_SEPARATOR = "_"
static
final String org.sleuthkit.autopsy.keywordsearch.Server.CORE_EVT = "CORE_EVT"
static
final String org.sleuthkit.autopsy.keywordsearch.Server.CORE_PROPERTIES = "core.properties"
staticprivate

Definition at line 179 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.Server.openCore().

Core org.sleuthkit.autopsy.keywordsearch.Server.currentCore
private

Definition at line 193 of file Server.java.

final ReentrantReadWriteLock org.sleuthkit.autopsy.keywordsearch.Server.currentCoreLock
private

Definition at line 194 of file Server.java.

HttpSolrServer org.sleuthkit.autopsy.keywordsearch.Server.currentSolrServer
private

Definition at line 191 of file Server.java.

int org.sleuthkit.autopsy.keywordsearch.Server.currentSolrServerPort = 0
private

Definition at line 174 of file Server.java.

int org.sleuthkit.autopsy.keywordsearch.Server.currentSolrStopPort = 0
private

Definition at line 175 of file Server.java.

Process org.sleuthkit.autopsy.keywordsearch.Server.curSolrProcess = null
private

Definition at line 166 of file Server.java.

final boolean org.sleuthkit.autopsy.keywordsearch.Server.DEBUG = false
staticprivate

Definition at line 176 of file Server.java.

final String org.sleuthkit.autopsy.keywordsearch.Server.DEFAULT_CORE_NAME = "coreCase"
staticprivate

Definition at line 158 of file Server.java.

final Charset org.sleuthkit.autopsy.keywordsearch.Server.DEFAULT_INDEXED_TEXT_CHARSET = Charset.forName("UTF-8")
static

default Charset to index text as

Definition at line 164 of file Server.java.

InputStreamPrinterThread org.sleuthkit.autopsy.keywordsearch.Server.errorRedirectThread
private

Definition at line 198 of file Server.java.

final String org.sleuthkit.autopsy.keywordsearch.Server.HL_ANALYZE_CHARS_UNLIMITED = "500000"
static

Definition at line 154 of file Server.java.

final char org.sleuthkit.autopsy.keywordsearch.Server.ID_CHUNK_SEP = '_'
static

Definition at line 161 of file Server.java.

String org.sleuthkit.autopsy.keywordsearch.Server.javaPath = "java"
private

Definition at line 163 of file Server.java.

final String org.sleuthkit.autopsy.keywordsearch.Server.KEY = "jjk#09s"
staticprivate

Definition at line 170 of file Server.java.

final HttpSolrServer org.sleuthkit.autopsy.keywordsearch.Server.localSolrServer
private

Definition at line 184 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.Server.openCore().

final Logger org.sleuthkit.autopsy.keywordsearch.Server.logger = Logger.getLogger(Server.class.getName())
staticprivate

Definition at line 157 of file Server.java.

final long org.sleuthkit.autopsy.keywordsearch.Server.MAX_CONTENT_SIZE = 1L * 1024 * 1024 * 1024
static

Definition at line 156 of file Server.java.

final int org.sleuthkit.autopsy.keywordsearch.Server.MAX_SOLR_MEM_MB = 512
staticprivate

Definition at line 165 of file Server.java.

final ServerAction org.sleuthkit.autopsy.keywordsearch.Server.serverAction
private

Definition at line 197 of file Server.java.

final String org.sleuthkit.autopsy.keywordsearch.Server.SOLR = "solr"
staticprivate

Definition at line 178 of file Server.java.

Referenced by org.sleuthkit.autopsy.keywordsearch.Server.openCore().

final File org.sleuthkit.autopsy.keywordsearch.Server.solrFolder
private

Definition at line 196 of file Server.java.

UNCPathUtilities org.sleuthkit.autopsy.keywordsearch.Server.uncPathUtilities = null
private

Definition at line 177 of file Server.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2016 Basis Technology. Generated on: Mon Jan 2 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.