Autopsy  4.1
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
 
String getCaseDirectory ()
 
String getCaseName ()
 
String getCaseNumber ()
 
Case.CaseType getCaseType ()
 
String getExaminer ()
 
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 caseDatabase
 
String caseName
 
String caseNumber
 
Case.CaseType caseType
 
String createdByVersion
 
String createdDate
 
String examiner
 
final Path metadataFilePath
 
String textIndexName
 

Static Private Attributes

static final String AUTOPSY_CREATED_BY_ELEMENT_NAME = "CreatedByAutopsyVersion"
 
static final String AUTOPSY_CREATED_VERSION_ELEMENT_NAME = "AutopsyCreatedVersion"
 
static final String AUTOPSY_SAVED_BY_ELEMENT_NAME = "SavedByAutopsyVersion"
 
static final String CASE_DATABASE_ELEMENT_NAME = "Database"
 
static final String CASE_DATABASE_NAME_ELEMENT_NAME = "DatabaseName"
 
static final String CASE_ELEMENT_NAME = "Case"
 
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 = "2.0"
 
static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss (z)")
 
static final String EXAMINER_ELEMENT_NAME = "Examiner"
 
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_ONE = "1.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 an object that provides access to the case metadata stored in 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 132 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 374 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 ( )
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.

Definition at line 229 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.caseDatabase, org.sleuthkit.autopsy.casemodule.CaseMetadata.caseType, and org.sleuthkit.autopsy.casemodule.Case.CaseType.SINGLE_USER_CASE.

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

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

Gets the case directory.

Returns
The case directory.

Definition at line 151 of file CaseMetadata.java.

Referenced by org.sleuthkit.autopsy.casemodule.Case.getCaseDirectory(), and org.sleuthkit.autopsy.casemodule.Case.open().

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

Gets the case display name.

Returns
The case display name.

Definition at line 169 of file CaseMetadata.java.

References org.sleuthkit.autopsy.casemodule.CaseMetadata.caseName.

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

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

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

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

Gets the text index name.

Returns
The name of the text index for the case.

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

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

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

Member Data Documentation

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

Definition at line 65 of file CaseMetadata.java.

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

Definition at line 57 of file CaseMetadata.java.

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

Definition at line 66 of file CaseMetadata.java.

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

Definition at line 72 of file CaseMetadata.java.

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

Definition at line 58 of file CaseMetadata.java.

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

Definition at line 67 of file CaseMetadata.java.

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

Definition at line 68 of file CaseMetadata.java.

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

Definition at line 69 of file CaseMetadata.java.

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

Definition at line 71 of file CaseMetadata.java.

String org.sleuthkit.autopsy.casemodule.CaseMetadata.caseDatabase
private
String org.sleuthkit.autopsy.casemodule.CaseMetadata.caseName
private
String org.sleuthkit.autopsy.casemodule.CaseMetadata.caseNumber
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 82 of file CaseMetadata.java.

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

Definition at line 81 of file CaseMetadata.java.

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

Definition at line 60 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.

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

Definition at line 70 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 64 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_ONE = "1.0"
staticprivate

Definition at line 56 of file CaseMetadata.java.

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

Definition at line 73 of file CaseMetadata.java.

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

Definition at line 59 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 Jan 2 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.