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

Classes

class  CaseMetadataException
 

Public Member Functions

 CaseMetadata (Path metadataFilePath) throws CaseMetadataException
 
String getCaseDatabaseName ()
 
String getCaseDatabasePath () throws UnsupportedOperationException
 
CaseDetails getCaseDetails ()
 
String getCaseDirectory ()
 
String getCaseDisplayName ()
 
String getCaseName ()
 
String getCaseNotes ()
 
String getCaseNumber ()
 
Case.CaseType getCaseType ()
 
String getExaminer ()
 
String getExaminerEmail ()
 
String getExaminerPhone ()
 
String getTextIndexName ()
 

Static Public Member Functions

static String getFileExtension ()
 

Private Member Functions

void createChildElement (Document doc, Element parentElement, String elementName, String elementContent)
 
void createXMLDOM (Document doc)
 
String getElementTextContent (Element parentElement, String elementName, boolean contentIsRequired) throws CaseMetadataException
 
void readFromFile () throws CaseMetadataException
 
void writeToFile () throws CaseMetadataException
 

Private Attributes

String caseDatabaseName
 
String caseDatabasePath
 
CaseDetails caseDetails
 
String caseName
 
Case.CaseType caseType
 
String createdByVersion
 
String createdDate
 
final Path metadataFilePath
 
String textIndexName
 

Static Private Attributes

static final String AUTOPSY_CREATED_BY_ELEMENT_NAME = "CreatedByAutopsyVersion"
 
static final String AUTOPSY_SAVED_BY_ELEMENT_NAME = "SavedByAutopsyVersion"
 
static final String AUTOPSY_VERSION_ELEMENT_NAME = "AutopsyCreatedVersion"
 
static final String CASE_DATABASE_NAME_ELEMENT_NAME = "DatabaseName"
 
static final String CASE_DB_ABSOLUTE_PATH_ELEMENT_NAME = "Database"
 
static final String CASE_DB_NAME_RELATIVE_ELEMENT_NAME = "CaseDatabase"
 
static final String CASE_DISPLAY_NAME_ELEMENT_NAME = "DisplayName"
 
static final String CASE_ELEMENT_NAME = "Case"
 
static final String CASE_ELEMENT_NOTES = "CaseNotes"
 
static final String CASE_NAME_ELEMENT_NAME = "Name"
 
static final String CASE_NUMBER_ELEMENT_NAME = "Number"
 
static final String CASE_TYPE_ELEMENT_NAME = "CaseType"
 
static final String CREATED_DATE_ELEMENT_NAME = "CreatedDate"
 
static final String CURRENT_SCHEMA_VERSION = SCHEMA_VERSION_FOUR
 
static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss (z)")
 
static final String EXAMINER_ELEMENT_EMAIL = "ExaminerEmail"
 
static final String EXAMINER_ELEMENT_NAME = "Examiner"
 
static final String EXAMINER_ELEMENT_PHONE = "ExaminerPhone"
 
static final String FILE_EXTENSION = ".aut"
 
static final String MODIFIED_DATE_ELEMENT_NAME = "ModifiedDate"
 
static final String ROOT_ELEMENT_NAME = "AutopsyCase"
 
static final String SCHEMA_VERSION_ELEMENT_NAME = "SchemaVersion"
 
static final String SCHEMA_VERSION_FOUR = "4.0"
 
static final String SCHEMA_VERSION_ONE = "1.0"
 
static final String SCHEMA_VERSION_THREE = "3.0"
 
static final String SCHEMA_VERSION_TWO = "2.0"
 
static final String TEXT_INDEX_ELEMENT = "TextIndex"
 
static final String TEXT_INDEX_NAME_ELEMENT = "TextIndexName"
 

Detailed Description

Provides access to the case metadata stored in the case metadata file.

Definition at line 52 of file CaseMetadata.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.casemodule.CaseMetadata.CaseMetadata ( Path  metadataFilePath) throws CaseMetadataException

Constructs a CaseMetadata object for an existing case. The metadata is read from an existing case metadata file.

Parameters
metadataFilePathThe full path to the case metadata file.
Exceptions
CaseMetadataExceptionIf the new case metadata file cannot be read.

Definition at line 156 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.metadataFilePath, and org.sleuthkit.autopsy.casemodule.CaseMetadata.readFromFile().

Member Function Documentation

void org.sleuthkit.autopsy.casemodule.CaseMetadata.createChildElement ( Document  doc,
Element  parentElement,
String  elementName,
String  elementContent 
)
private

Creates an XML element for the case metadata XML DOM.

Parameters
docThe document.
parentElementThe parent element of the element to be created.
elementNameThe name of the element to be created.
elementContentThe text content of the element to be created, may be empty.

Definition at line 430 of file CaseMetadata.java.

Referenced by org.sleuthkit.autopsy.casemodule.CaseMetadata.createXMLDOM().

void org.sleuthkit.autopsy.casemodule.CaseMetadata.createXMLDOM ( Document  doc)
private
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseDatabaseName ( )

Gets the name of the case database.

Returns
The case database name, may be empty.

Definition at line 261 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.caseDatabaseName.

Referenced by org.sleuthkit.autopsy.casemodule.Case.deleteCase(), and org.sleuthkit.autopsy.casemodule.Case.openCaseData().

String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseDatabasePath ( ) throws UnsupportedOperationException

Gets the full path to the case database file if the case is a single-user case.

Returns
The full path to the case database file for a single-user case.
Exceptions
UnsupportedOperationExceptionIf called for a multi-user case.
Deprecated:
Do not use.

Definition at line 587 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.caseType, org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseDirectory(), and org.sleuthkit.autopsy.casemodule.Case.CaseType.SINGLE_USER_CASE.

CaseDetails org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseDetails ( )

Get current values for the case details which are user modifiable.

Returns
the case details

Definition at line 202 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.caseDetails.

String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseDirectory ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseDisplayName ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseName ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseNotes ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseNumber ( )
Case.CaseType org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseType ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getElementTextContent ( Element  parentElement,
String  elementName,
boolean  contentIsRequired 
) throws CaseMetadataException
private

Gets the text content of an XML element.

Parameters
parentElementThe parent element.
elementNameThe element name.
contentIsRequiredWhether or not the content is required.
Returns
The text content, may be empty If not required.
Exceptions
CaseMetadataExceptionIf the element is missing or content is required and it is empty.

Definition at line 548 of file CaseMetadata.java.

Referenced by org.sleuthkit.autopsy.casemodule.CaseMetadata.readFromFile().

String org.sleuthkit.autopsy.casemodule.CaseMetadata.getExaminer ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getExaminerEmail ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getExaminerPhone ( )
static String org.sleuthkit.autopsy.casemodule.CaseMetadata.getFileExtension ( )
static

Gets the file extension used for case metadata files.

Returns
The file extension.

Definition at line 118 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.FILE_EXTENSION.

Referenced by org.sleuthkit.autopsy.casemodule.CaseOpenAction.CaseOpenAction().

String org.sleuthkit.autopsy.casemodule.CaseMetadata.getTextIndexName ( )

Gets the text index name. This is a legacy field and will be empty for cases created with Autopsy 4.4.0 and above.

Returns
The name of the text index for the case, may be empty.

Definition at line 289 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.textIndexName.

Referenced by org.sleuthkit.autopsy.casemodule.Case.getTextIndexName().

void org.sleuthkit.autopsy.casemodule.CaseMetadata.readFromFile ( ) throws CaseMetadataException
private
void org.sleuthkit.autopsy.casemodule.CaseMetadata.writeToFile ( ) throws CaseMetadataException
private

Writes the case metadata to the metadata file.

Exceptions
CaseMetadataExceptionIf there is an error writing to the case metadata file.

Definition at line 355 of file CaseMetadata.java.

References org.sleuthkit.autopsy.coreutils.XMLUtil.createDocument(), and org.sleuthkit.autopsy.casemodule.CaseMetadata.createXMLDOM().

Member Data Documentation

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.AUTOPSY_CREATED_BY_ELEMENT_NAME = "CreatedByAutopsyVersion"
staticprivate

Definition at line 77 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.AUTOPSY_SAVED_BY_ELEMENT_NAME = "SavedByAutopsyVersion"
staticprivate

Definition at line 99 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.AUTOPSY_VERSION_ELEMENT_NAME = "AutopsyCreatedVersion"
staticprivate

Definition at line 64 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CASE_DATABASE_NAME_ELEMENT_NAME = "DatabaseName"
staticprivate

Definition at line 70 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CASE_DB_ABSOLUTE_PATH_ELEMENT_NAME = "Database"
staticprivate

Definition at line 78 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CASE_DB_NAME_RELATIVE_ELEMENT_NAME = "CaseDatabase"
staticprivate

Definition at line 86 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CASE_DISPLAY_NAME_ELEMENT_NAME = "DisplayName"
staticprivate

Definition at line 85 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CASE_ELEMENT_NAME = "Case"
staticprivate

Definition at line 65 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CASE_ELEMENT_NOTES = "CaseNotes"
staticprivate

Definition at line 94 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CASE_NAME_ELEMENT_NAME = "Name"
staticprivate

Definition at line 66 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CASE_NUMBER_ELEMENT_NAME = "Number"
staticprivate

Definition at line 67 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CASE_TYPE_ELEMENT_NAME = "CaseType"
staticprivate

Definition at line 69 of file CaseMetadata.java.

String org.sleuthkit.autopsy.casemodule.CaseMetadata.caseDatabaseName
private
String org.sleuthkit.autopsy.casemodule.CaseMetadata.caseDatabasePath
private

Definition at line 108 of file CaseMetadata.java.

CaseDetails org.sleuthkit.autopsy.casemodule.CaseMetadata.caseDetails
private
String org.sleuthkit.autopsy.casemodule.CaseMetadata.caseName
private
Case.CaseType org.sleuthkit.autopsy.casemodule.CaseMetadata.caseType
private
final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CREATED_DATE_ELEMENT_NAME = "CreatedDate"
staticprivate

Definition at line 63 of file CaseMetadata.java.

String org.sleuthkit.autopsy.casemodule.CaseMetadata.createdByVersion
private

Definition at line 111 of file CaseMetadata.java.

String org.sleuthkit.autopsy.casemodule.CaseMetadata.createdDate
private

Definition at line 110 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CURRENT_SCHEMA_VERSION = SCHEMA_VERSION_FOUR
staticprivate

Definition at line 101 of file CaseMetadata.java.

final DateFormat org.sleuthkit.autopsy.casemodule.CaseMetadata.DATE_FORMAT = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss (z)")
staticprivate

Definition at line 55 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.EXAMINER_ELEMENT_EMAIL = "ExaminerEmail"
staticprivate

Definition at line 93 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.EXAMINER_ELEMENT_NAME = "Examiner"
staticprivate

Definition at line 68 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.EXAMINER_ELEMENT_PHONE = "ExaminerPhone"
staticprivate

Definition at line 92 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.FILE_EXTENSION = ".aut"
staticprivate
final Path org.sleuthkit.autopsy.casemodule.CaseMetadata.metadataFilePath
private
final String org.sleuthkit.autopsy.casemodule.CaseMetadata.MODIFIED_DATE_ELEMENT_NAME = "ModifiedDate"
staticprivate

Definition at line 98 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.ROOT_ELEMENT_NAME = "AutopsyCase"
staticprivate

Definition at line 61 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.SCHEMA_VERSION_ELEMENT_NAME = "SchemaVersion"
staticprivate

Definition at line 62 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.SCHEMA_VERSION_FOUR = "4.0"
staticprivate

Definition at line 91 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.SCHEMA_VERSION_ONE = "1.0"
staticprivate

Definition at line 60 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.SCHEMA_VERSION_THREE = "3.0"
staticprivate

Definition at line 84 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.SCHEMA_VERSION_TWO = "2.0"
staticprivate

Definition at line 76 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.TEXT_INDEX_ELEMENT = "TextIndex"
staticprivate

Definition at line 79 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.TEXT_INDEX_NAME_ELEMENT = "TextIndexName"
staticprivate

Definition at line 71 of file CaseMetadata.java.

String org.sleuthkit.autopsy.casemodule.CaseMetadata.textIndexName
private

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

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