19 package org.sleuthkit.datamodel;
21 import java.text.MessageFormat;
22 import java.util.Collections;
23 import java.util.ResourceBundle;
24 import java.util.logging.Level;
25 import java.util.logging.Logger;
41 private static ResourceBundle bundle = ResourceBundle.getBundle(
"org.sleuthkit.datamodel.Bundle");
42 private boolean hasDerivedMethod =
true;
95 long dataSourceObjectId,
101 long ctime,
long crtime,
long atime,
long mtime,
111 Long osAccountObjId) {
116 metaFlags, size, ctime, crtime, atime, mtime, (
short) 0, 0, 0, md5Hash, sha256Hash, sha1Hash, knownState, parentPath, mimeType, extension, ownerUid, osAccountObjId,
TskData.
CollectedStatus.
UNKNOWN, Collections.emptyList());
117 setLocalFilePath(localPath);
118 setEncodingType(encodingType);
141 if (derivedMethod == null && hasDerivedMethod ==
true) {
144 if (derivedMethod == null) {
145 hasDerivedMethod =
false;
147 }
catch (TskCoreException e) {
148 String msg = MessageFormat.format(bundle.getString(
"DerviedFile.derivedMethod.exception.msg1.text"),
getId());
149 logger.log(Level.WARNING, msg, e);
150 throw new TskCoreException(msg, e);
153 return derivedMethod;
166 return v.
visit(
this);
178 public <T> T accept(ContentVisitor<T> v) {
179 return v.visit(
this);
205 return super.toString(preserveState) +
"DerivedFile{"
206 +
"derivedMethod=" + derivedMethod
207 +
", hasDerivedMethod=" + hasDerivedMethod
216 private final int derivedId;
217 private String toolName;
218 private String toolVersion;
219 private String other;
220 private String rederiveDetails;
223 this.derivedId = derivedId;
224 this.rederiveDetails = rederiveDetails;
225 if (this.rederiveDetails == null) {
226 this.rederiveDetails =
"";
229 this.toolVersion =
"";
233 void setToolName(String toolName) {
234 this.toolName = toolName;
237 void setToolVersion(String toolVersion) {
238 this.toolVersion = toolVersion;
241 void setOther(String other) {
262 return rederiveDetails;
267 return "DerivedMethod{" +
"derived_id=" + derivedId +
", toolName=" + toolName +
", toolVersion=" + toolVersion +
", other=" + other +
", rederiveDetails=" + rederiveDetails +
'}';
final TSK_FS_NAME_TYPE_ENUM dirType
DerivedMethod(int derivedId, String rederiveDetails)
String getRederiveDetails()
final Long fileSystemObjectId
TSK_FS_NAME_FLAG_ENUM dirFlag
String toString(boolean preserveState)
Set< TSK_FS_META_FLAG_ENUM > metaFlags
TskData.FileKnown knownState
SleuthkitCase getSleuthkitCase()
DERIVED
File derived from a parent file (i.e. from ZIP)
synchronized DerivedMethod getDerivedMethod()
final TSK_FS_META_TYPE_ENUM metaType