19 package org.sleuthkit.autopsy.centralrepository.datamodel;
 
   21 import java.io.Serializable;
 
   63             Long dataSourceObjectId,
 
   86             Long dataSourceObjectId,
 
   91         this.dataSourceID = dataSourceId;
 
   92         this.deviceID = deviceId;
 
   94         this.dataSourceObjectID = dataSourceObjectId;
 
  127         if (correlationDataSource == null) {
 
  131             String sha256 = null;
 
  133                 deviceId = curCase.
getSleuthkitCase().getDataSource(dataSource.getId()).getDeviceId();
 
  135                 if (dataSource instanceof Image) {
 
  136                     Image image = (Image) dataSource;
 
  137                     md5 = image.getMd5();
 
  138                     sha1 = image.getSha1();
 
  139                     sha256 = image.getSha256();
 
  141             } 
catch (TskDataException | TskCoreException ex) {
 
  142                 throw new EamDbException(
"Error getting data source info: " + ex.getMessage());
 
  145             correlationDataSource = 
new CorrelationDataSource(correlationCase, deviceId, dataSource.getName(), dataSource.getId(), md5, sha1, sha256);
 
  151         return correlationDataSource;
 
  156         StringBuilder str = 
new StringBuilder();
 
  158         str.append(
"ID=").append(Integer.toString(
getID()));
 
  159         str.append(
",caseID=").append(Integer.toString(
getCaseID()));
 
  161         str.append(
",name=").append(
getName());
 
  163         return str.toString();
 
  213         return (md5Hash == null ? 
"" : md5Hash);
 
  227         if (dataSourceObjectID != -1) {
 
  236         return (sha1Hash == null ? 
"" : sha1Hash);
 
  248         if (dataSourceObjectID != -1) {
 
  257         return (sha256Hash == null ? 
"" : sha256Hash);
 
  269         if (dataSourceObjectID != -1) {
 
static final long serialVersionUID
void setMd5(String md5Hash)
CorrelationDataSource newDataSource(CorrelationDataSource eamDataSource)
final Long dataSourceObjectID
void updateDataSourceSha1Hash(CorrelationDataSource eamDataSource)
static CorrelationDataSource fromTSKDataSource(CorrelationCase correlationCase, Content dataSource)
void updateDataSourceSha256Hash(CorrelationDataSource eamDataSource)
CorrelationDataSource(CorrelationCase correlationCase, String deviceId, String name, Long dataSourceObjectId, String md5Hash, String sha1Hash, String sha256Hash)
static EamDb getInstance()
CorrelationDataSource getDataSource(CorrelationCase correlationCase, Long caseDbDataSourceId)
void setSha256(String sha256Hash)
static boolean isEnabled()
SleuthkitCase getSleuthkitCase()
void setSha1(String sha1Hash)
Long getDataSourceObjectID()
static Case getCurrentCaseThrows()
void updateDataSourceMd5Hash(CorrelationDataSource eamDataSource)