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;
92 long dataSourceObjectId,
97 long ctime,
long crtime,
long atime,
long mtime,
106 Long osAccountObjId) {
111 metaFlags, size, ctime, crtime, atime, mtime, (
short) 0, 0, 0, md5Hash, sha256Hash, knownState, parentPath, mimeType, extension, ownerUid, osAccountObjId, Collections.emptyList());
112 setLocalFilePath(localPath);
113 setEncodingType(encodingType);
136 if (derivedMethod == null && hasDerivedMethod ==
true) {
139 if (derivedMethod == null) {
140 hasDerivedMethod =
false;
142 }
catch (TskCoreException e) {
143 String msg = MessageFormat.format(bundle.getString(
"DerviedFile.derivedMethod.exception.msg1.text"),
getId());
144 logger.log(Level.WARNING, msg, e);
145 throw new TskCoreException(msg, e);
148 return derivedMethod;
161 return v.
visit(
this);
173 public <T> T accept(ContentVisitor<T> v) {
174 return v.visit(
this);
200 return super.toString(preserveState) +
"DerivedFile{"
201 +
"derivedMethod=" + derivedMethod
202 +
", hasDerivedMethod=" + hasDerivedMethod
211 private final int derivedId;
212 private String toolName;
213 private String toolVersion;
214 private String other;
215 private String rederiveDetails;
218 this.derivedId = derivedId;
219 this.rederiveDetails = rederiveDetails;
220 if (this.rederiveDetails == null) {
221 this.rederiveDetails =
"";
224 this.toolVersion =
"";
228 void setToolName(String toolName) {
229 this.toolName = toolName;
232 void setToolVersion(String toolVersion) {
233 this.toolVersion = toolVersion;
236 void setOther(String other) {
257 return rederiveDetails;
262 return "DerivedMethod{" +
"derived_id=" + derivedId +
", toolName=" + toolName +
", toolVersion=" + toolVersion +
", other=" + other +
", rederiveDetails=" + rederiveDetails +
'}';
300 @SuppressWarnings(
"deprecation")
307 long ctime,
long crtime,
long atime,
long mtime,
313 ctime, crtime, atime, mtime,
final TSK_FS_NAME_TYPE_ENUM dirType
DerivedMethod(int derivedId, String rederiveDetails)
String getRederiveDetails()
TSK_FS_NAME_FLAG_ENUM dirFlag
LOCAL
Local file that was added (not from a disk image)
String toString(boolean preserveState)
Set< TSK_FS_META_FLAG_ENUM > metaFlags
TskData.FileKnown knownState
SleuthkitCase getSleuthkitCase()
synchronized DerivedMethod getDerivedMethod()
final TSK_FS_META_TYPE_ENUM metaType