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.List;
70 if (currentDataSource == null) {
74 final String valueParam =
"value";
75 final String countParam =
"count";
76 String query =
"SELECT SUM(size) AS " + valueParam +
", COUNT(*) AS " + countParam
79 +
" AND type<>" + TskData.TSK_DB_FILES_TYPE_ENUM.SLACK.getFileType()
80 +
" AND type<>" + TskData.TSK_DB_FILES_TYPE_ENUM.VIRTUAL_DIR.getFileType()
81 +
" AND dir_type<>" + TskData.TSK_FS_NAME_TYPE_ENUM.VIRT_DIR.getValue()
83 +
" AND data_source_obj_id=" + currentDataSource.getId();
86 if (resultSet.next()) {
88 long resultCount = resultSet.getLong(valueParam);
89 return (resultCount > 0) ? resultSet.getLong(valueParam) : null;
114 if (dataSource == null) {
119 BlackboardArtifact.ARTIFACT_TYPE.TSK_OS_INFO.getTypeID(),
120 BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID());
139 if (dataSource == null) {
144 BlackboardArtifact.ARTIFACT_TYPE.TSK_DATA_SOURCE_USAGE.getTypeID(),
145 BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DESCRIPTION.getTypeID());
168 boolean first =
true;
169 while (resultSet.next()) {
175 toRet += resultSet.getString(valueParam);
202 final String valueParam =
"concatted_attribute_value";
203 String query =
"SELECT attr.value_text AS " + valueParam
204 +
" FROM blackboard_artifacts bba "
205 +
" INNER JOIN blackboard_attributes attr ON bba.artifact_id = attr.artifact_id "
206 +
" WHERE bba.data_source_obj_id = " + dataSourceId
207 +
" AND bba.artifact_type_id = " + artifactTypeId
208 +
" AND attr.attribute_type_id = " + attributeTypeId;
210 String separator =
", ";
245 ImageDetails(Long unallocatedSize,
long size,
long sectorSize,
246 String timeZone, String imageType, List<String> paths, String md5Hash,
247 String sha1Hash, String sha256Hash) {
253 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)
Long getUnallocatedSize()
final String acquisitionDetails
final Long unallocatedSize
final ImageDetails imageDetails
final String deviceIdValue
String getOperatingSystems(DataSource dataSource)
String getDataSourceType(DataSource dataSource)
final List< String > paths
ImageDetails getImageDetails(Image image)
String getConcattedStringsResult(String query, String valueParam, String separator)
List< String > getPaths()