19 package org.sleuthkit.autopsy.datasourcesummary.datamodel;
21 import java.sql.SQLException;
22 import java.util.ArrayList;
23 import java.util.Arrays;
24 import java.util.Collections;
25 import java.util.HashSet;
26 import java.util.List;
72 if (currentDataSource == null) {
76 final String valueParam =
"value";
77 final String countParam =
"count";
78 String query =
"SELECT SUM(size) AS " + valueParam +
", COUNT(*) AS " + countParam
81 +
" AND type<>" + TskData.TSK_DB_FILES_TYPE_ENUM.SLACK.getFileType()
82 +
" AND type<>" + TskData.TSK_DB_FILES_TYPE_ENUM.VIRTUAL_DIR.getFileType()
83 +
" AND dir_type<>" + TskData.TSK_FS_NAME_TYPE_ENUM.VIRT_DIR.getValue()
85 +
" AND data_source_obj_id=" + currentDataSource.getId();
88 if (resultSet.next()) {
90 long resultCount = resultSet.getLong(valueParam);
91 return (resultCount > 0) ? resultSet.getLong(valueParam) : null;
116 if (dataSource == null) {
121 BlackboardArtifact.ARTIFACT_TYPE.TSK_OS_INFO.getTypeID(),
122 BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID());
141 if (dataSource == null) {
146 BlackboardArtifact.ARTIFACT_TYPE.TSK_DATA_SOURCE_USAGE.getTypeID(),
147 BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DESCRIPTION.getTypeID());
170 boolean first =
true;
171 while (resultSet.next()) {
177 toRet += resultSet.getString(valueParam);
204 final String valueParam =
"concatted_attribute_value";
205 String query =
"SELECT attr.value_text AS " + valueParam
206 +
" FROM blackboard_artifacts bba "
207 +
" INNER JOIN blackboard_attributes attr ON bba.artifact_id = attr.artifact_id "
208 +
" WHERE bba.data_source_obj_id = " + dataSourceId
209 +
" AND bba.artifact_type_id = " + artifactTypeId
210 +
" AND attr.attribute_type_id = " + attributeTypeId;
212 String separator =
", ";
246 ImageDetails(
long unallocatedSize,
long size,
long sectorSize,
247 String timeZone, String imageType, List<String> paths, String md5Hash,
248 String sha1Hash, String sha256Hash) {
254 this.paths = paths == null ? Collections.emptyList() :
new ArrayList<>(
paths);
299 return Collections.unmodifiableList(paths);
347 ContainerDetails(String displayName, String originalName, String deviceIdValue,
410 ds.getAcquisitionDetails(),
428 String imageType = image.getType().getName();
429 Long size = image.getSize();
430 Long sectorSize = image.getSsize();
431 String timeZone = image.getTimeZone();
432 List<String> paths = image.getPaths() == null ? Collections.emptyList() : Arrays.asList(image.getPaths());
433 String md5 = image.getMd5();
434 String sha1 = image.getSha1();
435 String sha256 = image.getSha256();
437 return new ImageDetails(unallocSize, size, sectorSize, timeZone, imageType, paths, md5, sha1, sha256);
final SleuthkitCaseProvider provider
Long getSizeOfUnallocatedFiles(DataSource currentDataSource)
final String originalName
SleuthkitCaseProvider DEFAULT
ImageDetails getImageDetails()
String getAcquisitionDetails()
ContainerDetails getContainerDetails(DataSource ds)
ContainerSummary(SleuthkitCaseProvider provider)
String getConcattedAttrValue(long dataSourceId, int artifactTypeId, int attributeTypeId)
static String getMetaFlagsContainsStatement(TSK_FS_META_FLAG_ENUM flag)
final String acquisitionDetails
long getUnallocatedSize()
final ImageDetails imageDetails
final String deviceIdValue
String getOperatingSystems(DataSource dataSource)
String getDataSourceType(DataSource dataSource)
final long unallocatedSize
final List< String > paths
ImageDetails getImageDetails(Image image)
String getConcattedStringsResult(String query, String valueParam, String separator)
List< String > getPaths()