Autopsy  4.19.3
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 getCreatedDate ()
 
String getExaminer ()
 
String getExaminerEmail ()
 
String getExaminerPhone ()
 
Path getFilePath ()
 
String getTextIndexName ()
 

Static Public Member Functions

static Path getCaseMetadataFilePath (Path directoryPath)
 
static DateFormat getDateFormat ()
 
static String getFileExtension ()
 

Private Member Functions

void createCaseElements (Document doc, Element caseElement, CaseMetadata metadataToWrite)
 
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
 

Private Attributes

String caseDatabaseName
 
String caseDatabasePath
 
CaseDetails caseDetails
 
String caseName
 
Case.CaseType caseType
 
String createdByVersion
 
String createdDate
 
final Path metadataFilePath
 
CaseMetadata originalMetadata = null
 
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_FIVE
 
static final DateFormat DATE_FORMAT = new SimpleDateFormat(DATE_FORMAT_STRING, Locale.US)
 
static final String DATE_FORMAT_STRING = "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 ORIGINAL_CASE_ELEMENT_NAME = "OriginalCase"
 
static final String ROOT_ELEMENT_NAME = "AutopsyCase"
 
static final String SCHEMA_VERSION_ELEMENT_NAME = "SchemaVersion"
 
static final String SCHEMA_VERSION_FIVE = "5.0"
 
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 55 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 190 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.createCaseElements ( Document  doc,
Element  caseElement,
CaseMetadata  metadataToWrite 
)
private
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 511 of file CaseMetadata.java.

Referenced by org.sleuthkit.autopsy.casemodule.CaseMetadata.createCaseElements(), and 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 316 of file CaseMetadata.java.

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

Referenced by org.sleuthkit.autopsy.casemodule.Case.deleteMultiUserCaseDatabase(), and org.sleuthkit.autopsy.casemodule.Case.openCaseDataBase().

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 669 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 257 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 ( )
static Path org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseMetadataFilePath ( Path  directoryPath)
static

Locate the case meta data file in the supplied directory. If the file does not exist, null is returned.

Parameters
directoryPathDirectory path to search.
Returns
Case metadata file path or null.

Definition at line 203 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.getFileExtension().

Referenced by org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.getCaseMetadata().

String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseName ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseNotes ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseNumber ( )

Gets the case number.

Returns
The case number, may be empty.

Definition at line 286 of file CaseMetadata.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.getNumber(), and org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importCase().

Case.CaseType org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseType ( )
String org.sleuthkit.autopsy.casemodule.CaseMetadata.getCreatedDate ( )

Gets the date the case was created.

Returns
The date this case was created, as a string.

Definition at line 353 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.createdDate.

Referenced by org.sleuthkit.autopsy.casemodule.Case.getCreatedDate(), and org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importCase().

static DateFormat org.sleuthkit.autopsy.casemodule.CaseMetadata.getDateFormat ( )
static

Gets the date format used for dates in case metadata.

Returns
The date format.

Definition at line 139 of file CaseMetadata.java.

Referenced by org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData.CaseNodeData().

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 630 of file CaseMetadata.java.

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

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

Gets the examiner.

Returns
The examiner, may be empty.

Definition at line 295 of file CaseMetadata.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.getExaminer(), and org.sleuthkit.autopsy.casemodule.SingleUserCaseConverter.importCase().

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 130 of file CaseMetadata.java.

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

Referenced by org.sleuthkit.autopsy.casemodule.CaseOpenAction.CaseOpenAction(), and org.sleuthkit.autopsy.casemodule.CaseMetadata.getCaseMetadataFilePath().

Path org.sleuthkit.autopsy.casemodule.CaseMetadata.getFilePath ( )
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 344 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

Member Data Documentation

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

Definition at line 81 of file CaseMetadata.java.

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

Definition at line 110 of file CaseMetadata.java.

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

Definition at line 68 of file CaseMetadata.java.

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

Definition at line 74 of file CaseMetadata.java.

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

Definition at line 82 of file CaseMetadata.java.

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

Definition at line 90 of file CaseMetadata.java.

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

Definition at line 89 of file CaseMetadata.java.

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

Definition at line 69 of file CaseMetadata.java.

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

Definition at line 98 of file CaseMetadata.java.

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

Definition at line 70 of file CaseMetadata.java.

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

Definition at line 71 of file CaseMetadata.java.

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

Definition at line 73 of file CaseMetadata.java.

String org.sleuthkit.autopsy.casemodule.CaseMetadata.caseDatabaseName
private
String org.sleuthkit.autopsy.casemodule.CaseMetadata.caseDatabasePath
private
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 67 of file CaseMetadata.java.

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

Definition at line 122 of file CaseMetadata.java.

String org.sleuthkit.autopsy.casemodule.CaseMetadata.createdDate
private
final String org.sleuthkit.autopsy.casemodule.CaseMetadata.CURRENT_SCHEMA_VERSION = SCHEMA_VERSION_FIVE
staticprivate

Definition at line 112 of file CaseMetadata.java.

final DateFormat org.sleuthkit.autopsy.casemodule.CaseMetadata.DATE_FORMAT = new SimpleDateFormat(DATE_FORMAT_STRING, Locale.US)
staticprivate

Definition at line 59 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.DATE_FORMAT_STRING = "yyyy/MM/dd HH:mm:ss (z)"
staticprivate

Definition at line 58 of file CaseMetadata.java.

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

Definition at line 97 of file CaseMetadata.java.

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

Definition at line 72 of file CaseMetadata.java.

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

Definition at line 96 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 109 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.ORIGINAL_CASE_ELEMENT_NAME = "OriginalCase"
staticprivate

Definition at line 104 of file CaseMetadata.java.

CaseMetadata org.sleuthkit.autopsy.casemodule.CaseMetadata.originalMetadata = null
private

Definition at line 123 of file CaseMetadata.java.

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

Definition at line 65 of file CaseMetadata.java.

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

Definition at line 66 of file CaseMetadata.java.

final String org.sleuthkit.autopsy.casemodule.CaseMetadata.SCHEMA_VERSION_FIVE = "5.0"
staticprivate

Definition at line 103 of file CaseMetadata.java.

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

Definition at line 95 of file CaseMetadata.java.

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

Definition at line 64 of file CaseMetadata.java.

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

Definition at line 88 of file CaseMetadata.java.

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

Definition at line 80 of file CaseMetadata.java.

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

Definition at line 83 of file CaseMetadata.java.

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

Definition at line 75 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-2022 Basis Technology. Generated on: Wed Oct 5 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.