Sleuth Kit Java Bindings (JNI)  4.9.0
Java bindings for using The Sleuth Kit
BlackboardAttribute.java
Go to the documentation of this file.
1 /*
2  * Sleuth Kit Data Model
3  *
4  * Copyright 2011-2020 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.datamodel;
20 
21 import java.io.Serializable;
22 import java.util.Arrays;
23 import java.util.Collections;
24 import java.util.List;
25 import java.util.Objects;
26 import java.util.ResourceBundle;
27 import java.util.TimeZone;
28 import java.util.logging.Level;
29 import java.util.logging.Logger;
30 
45 public class BlackboardAttribute {
46 
47  private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray();
48  private static final Logger LOGGER = Logger.getLogger(BlackboardAttribute.class.getName());
49 
50  private static final ResourceBundle bundle = ResourceBundle.getBundle("org.sleuthkit.datamodel.Bundle");
51  private BlackboardAttribute.Type attributeType;
52  private final int valueInt;
53  private final long valueLong;
54  private final double valueDouble;
55  private final String valueString;
56  private final byte[] valueBytes;
57  private String context;
58  private long artifactID;
59  private SleuthkitCase sleuthkitCase;
60  private String sources;
61 
74  public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, int valueInt) throws IllegalArgumentException {
76  throw new IllegalArgumentException("Value types do not match");
77  }
78  this.artifactID = 0;
79  this.attributeType = new BlackboardAttribute.Type(attributeType);
80  this.sources = replaceNulls(source);
81  this.valueInt = valueInt;
82  this.valueLong = 0;
83  this.valueDouble = 0;
84  this.valueString = "";
85  this.valueBytes = new byte[0];
86  this.context = "";
87  }
88 
101  public BlackboardAttribute(Type attributeType, String source, int valueInt) throws IllegalArgumentException {
103  throw new IllegalArgumentException("Type mismatched with value type");
104  }
105  this.artifactID = 0;
106  this.attributeType = attributeType;
107  this.sources = replaceNulls(source);
108  this.valueInt = valueInt;
109  this.valueLong = 0;
110  this.valueDouble = 0;
111  this.valueString = "";
112  this.valueBytes = new byte[0];
113  this.context = "";
114  }
115 
131  public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, long valueLong) throws IllegalArgumentException {
134  throw new IllegalArgumentException("Value types do not match");
135  }
136  this.artifactID = 0;
137  this.attributeType = new BlackboardAttribute.Type(attributeType);
138  this.sources = replaceNulls(source);
139  this.valueInt = 0;
140  this.valueLong = valueLong;
141  this.valueDouble = 0;
142  this.valueString = "";
143  this.valueBytes = new byte[0];
144  this.context = "";
145  }
146 
161  public BlackboardAttribute(Type attributeType, String source, long valueLong) throws IllegalArgumentException {
164  throw new IllegalArgumentException("Type mismatched with value type");
165  }
166  this.artifactID = 0;
167  this.attributeType = attributeType;
168  this.sources = replaceNulls(source);
169  this.valueInt = 0;
170  this.valueLong = valueLong;
171  this.valueDouble = 0;
172  this.valueString = "";
173  this.valueBytes = new byte[0];
174  this.context = "";
175  }
176 
189  public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, double valueDouble) throws IllegalArgumentException {
191  throw new IllegalArgumentException("Value types do not match");
192  }
193  this.artifactID = 0;
194  this.attributeType = new BlackboardAttribute.Type(attributeType);
195  this.sources = replaceNulls(source);
196  this.valueInt = 0;
197  this.valueLong = 0;
198  this.valueDouble = valueDouble;
199  this.valueString = "";
200  this.valueBytes = new byte[0];
201  this.context = "";
202 
203  }
204 
217  public BlackboardAttribute(Type attributeType, String source, double valueDouble) throws IllegalArgumentException {
219  throw new IllegalArgumentException("Type mismatched with value type");
220  }
221  this.artifactID = 0;
222  this.attributeType = attributeType;
223  this.sources = replaceNulls(source);
224  this.valueInt = 0;
225  this.valueLong = 0;
226  this.valueDouble = valueDouble;
227  this.valueString = "";
228  this.valueBytes = new byte[0];
229  this.context = "";
230  }
231 
246  public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, String valueString) throws IllegalArgumentException {
248  && attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.JSON) {
249  throw new IllegalArgumentException("Value types do not match");
250  }
251  this.artifactID = 0;
252  this.attributeType = new BlackboardAttribute.Type(attributeType);
253  this.sources = replaceNulls(source);
254  this.valueInt = 0;
255  this.valueLong = 0;
256  this.valueDouble = 0;
257  if (valueString == null) {
258  this.valueString = "";
259  } else {
260  this.valueString = replaceNulls(valueString).trim();
261  }
262  this.valueBytes = new byte[0];
263  this.context = "";
264  }
265 
278  public BlackboardAttribute(Type attributeType, String source, String valueString) throws IllegalArgumentException {
280  && attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.JSON) {
281  throw new IllegalArgumentException("Type mismatched with value type");
282  }
283  this.artifactID = 0;
284  this.attributeType = attributeType;
285  this.sources = replaceNulls(source);
286  this.valueInt = 0;
287  this.valueLong = 0;
288  this.valueDouble = 0;
289  if (valueString == null) {
290  this.valueString = "";
291  } else {
292  this.valueString = replaceNulls(valueString).trim();
293  }
294  this.valueBytes = new byte[0];
295  this.context = "";
296  }
297 
310  public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, byte[] valueBytes) throws IllegalArgumentException {
311  if (attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE) {
312  throw new IllegalArgumentException("Value types do not match");
313  }
314  this.artifactID = 0;
315  this.attributeType = new BlackboardAttribute.Type(attributeType);
316  this.sources = replaceNulls(source);
317  this.context = "";
318  this.valueInt = 0;
319  this.valueLong = 0;
320  this.valueDouble = 0;
321  this.valueString = "";
322  if (valueBytes == null) {
323  this.valueBytes = new byte[0];
324  } else {
325  this.valueBytes = valueBytes;
326  }
327  }
328 
341  public BlackboardAttribute(Type attributeType, String source, byte[] valueBytes) throws IllegalArgumentException {
342  if (attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE) {
343  throw new IllegalArgumentException("Type mismatched with value type");
344  }
345  this.artifactID = 0;
346  this.attributeType = attributeType;
347  this.sources = replaceNulls(source);
348  this.context = "";
349  this.valueInt = 0;
350  this.valueLong = 0;
351  this.valueDouble = 0;
352  this.valueString = "";
353  if (valueBytes == null) {
354  this.valueBytes = new byte[0];
355  } else {
356  this.valueBytes = valueBytes;
357  }
358  }
359 
367  public long getArtifactID() {
368  return artifactID;
369  }
370 
377  return this.attributeType;
378  }
379 
386  return attributeType.getValueType();
387  }
388 
395  public int getValueInt() {
396  return valueInt;
397  }
398 
405  public long getValueLong() {
406  return valueLong;
407  }
408 
415  public double getValueDouble() {
416  return valueDouble;
417  }
418 
426  public String getValueString() {
427  return valueString;
428  }
429 
436  public byte[] getValueBytes() {
437  return Arrays.copyOf(valueBytes, valueBytes.length);
438  }
439 
445  public List<String> getSources() {
446  if (null != sources && !this.sources.isEmpty()) {
447  List<String> modules = Arrays.asList(sources.split(","));
448  return modules;
449  } else {
450  return Collections.emptyList();
451  }
452  }
453 
461  public void addSource(String source) throws TskCoreException {
462  this.sources = sleuthkitCase.addSourceToArtifactAttribute(this, source);
463  }
464 
477  return sleuthkitCase.getBlackboardArtifact(artifactID);
478  }
479 
480  @Override
481  public int hashCode() {
482  int hash = 5;
483  hash = 97 * hash + (int) (this.artifactID ^ (this.artifactID >>> 32));
484  return hash;
485  }
486 
487  @Override
488  public boolean equals(Object obj) {
489  if (obj == null) {
490  return false;
491  }
492  if (getClass() != obj.getClass()) {
493  return false;
494  }
495  final BlackboardAttribute other = (BlackboardAttribute) obj;
496  return this.artifactID == other.getArtifactID();
497  }
498 
499  @Override
500  public String toString() {
501  return "BlackboardAttribute{" + "artifactID=" + artifactID + ", attributeType=" + attributeType.toString() + ", moduleName=" + sources + ", context=" + context + ", valueInt=" + valueInt + ", valueLong=" + valueLong + ", valueDouble=" + valueDouble + ", valueString=" + valueString + ", valueBytes=" + Arrays.toString(valueBytes) + ", Case=" + sleuthkitCase + '}'; //NON-NLS
502  }
503 
509  public String getDisplayString() {
510  switch (attributeType.getValueType()) {
511  case STRING:
512  return getValueString();
513  case INTEGER:
514  if (attributeType.getTypeID() == ATTRIBUTE_TYPE.TSK_READ_STATUS.getTypeID()) {
515  if (getValueInt() == 0) {
516  return "Unread";
517  } else {
518  return "Read";
519  }
520  }
521  return Integer.toString(getValueInt());
522  case LONG:
523  // SHOULD at some point figure out how to convert times in here
524  // based on preferred formats and such. Perhaps provide another
525  // method that takes a formatter argument.
526  return Long.toString(getValueLong());
527  case DOUBLE:
528  return Double.toString(getValueDouble());
529  case BYTE:
530  return bytesToHexString(getValueBytes());
531 
532  case DATETIME: {
533  try {
534  final Content dataSource = getParentArtifact().getDataSource();
535  if ((dataSource != null) && (dataSource instanceof Image)) {
536  // return the date/time string in the timezone associated with the datasource,
537  Image image = (Image) dataSource;
538  TimeZone tzone = TimeZone.getTimeZone(image.getTimeZone());
539  return TimeUtilities.epochToTime(getValueLong(), tzone);
540  }
541  } catch (TskException ex) {
542  LOGGER.log(Level.WARNING, "Could not get timezone for image", ex); //NON-NLS
543  // return time string in default timezone
545  }
546  }
547  break;
548  case JSON: {
549  return getValueString();
550  }
551  }
552  return "";
553  }
554 
573  BlackboardAttribute(long artifactID, BlackboardAttribute.Type attributeType, String source, String context,
574  int valueInt, long valueLong, double valueDouble, String valueString, byte[] valueBytes,
575  SleuthkitCase sleuthkitCase) {
576 
577  this.artifactID = artifactID;
578  this.attributeType = attributeType;
579  this.sources = replaceNulls(source);
580  this.context = replaceNulls(context);
581  this.valueInt = valueInt;
582  this.valueLong = valueLong;
583  this.valueDouble = valueDouble;
584  if (valueString == null) {
585  this.valueString = "";
586  } else {
587  this.valueString = replaceNulls(valueString).trim();
588  }
589  if (valueBytes == null) {
590  this.valueBytes = new byte[0];
591  } else {
592  this.valueBytes = valueBytes;
593  }
594  this.sleuthkitCase = sleuthkitCase;
595  }
596 
603  void setCaseDatabase(SleuthkitCase sleuthkitCase) {
604  this.sleuthkitCase = sleuthkitCase;
605  }
606 
612  void setArtifactId(long artifactID) {
613  this.artifactID = artifactID;
614  }
615 
624  String getSourcesCSV() {
625  return sources;
626  }
627 
635  static String bytesToHexString(byte[] bytes) {
636  // from http://stackoverflow.com/questions/9655181/convert-from-byte-array-to-hex-string-in-java
637  char[] hexChars = new char[bytes.length * 2];
638  for (int j = 0; j < bytes.length; j++) {
639  int v = bytes[j] & 0xFF;
640  hexChars[j * 2] = HEX_ARRAY[v >>> 4];
641  hexChars[j * 2 + 1] = HEX_ARRAY[v & 0x0F];
642  }
643  return new String(hexChars);
644  }
645 
653  private String replaceNulls(String text) {
654  return text.replace((char) 0x00, (char) 0x1A);
655  }
656 
660  public static final class Type implements Serializable {
661 
662  private static final long serialVersionUID = 1L;
663  private final String typeName;
664  private final int typeID;
665  private final String displayName;
666  private final TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType;
667 
676  public Type(int typeID, String typeName, String displayName, TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType) {
677  this.typeID = typeID;
678  this.typeName = typeName;
679  this.displayName = displayName;
680  this.valueType = valueType;
681  }
682 
690  this.typeID = type.getTypeID();
691  this.typeName = type.getLabel();
692  this.displayName = type.getDisplayName();
693  this.valueType = type.getValueType();
694  }
695 
702  return this.valueType;
703  }
704 
710  public String getTypeName() {
711  return this.typeName;
712  }
713 
719  public int getTypeID() {
720  return this.typeID;
721  }
722 
728  public String getDisplayName() {
729  return this.displayName;
730  }
731 
732  @Override
733  public boolean equals(Object that) {
734  if (this == that) {
735  return true;
736  } else if (!(that instanceof BlackboardAttribute.Type)) {
737  return false;
738  } else {
739  return ((BlackboardAttribute.Type) that).sameType(this);
740  }
741  }
742 
751  private boolean sameType(BlackboardAttribute.Type that) {
752  return this.typeName.equals(that.getTypeName())
753  && this.displayName.equals(that.getDisplayName())
754  && this.typeID == that.getTypeID()
755  && this.valueType == that.getValueType();
756  }
757 
758  @Override
759  public int hashCode() {
760  int hash = 7;
761  hash = 63 * hash + Objects.hashCode(this.typeID);
762  hash = 63 * hash + Objects.hashCode(this.displayName);
763  hash = 63 * hash + Objects.hashCode(this.typeName);
764  hash = 63 * hash + Objects.hashCode(this.valueType);
765  return hash;
766  }
767 
768  @Override
769  public String toString() {
770  return "(typeID= " + this.typeID
771  + ", displayName=" + this.displayName
772  + ", typeName=" + this.typeName
773  + ", valueType=" + this.valueType + ")";
774  }
775  }
776 
782 
786  STRING(0, "String"), //NON-NLS
790  INTEGER(1, "Integer"), //NON-NLS
794  LONG(2, "Long"), //NON-NLS
798  DOUBLE(3, "Double"), //NON-NLS
802  BYTE(4, "Byte"), //NON-NLS
807  DATETIME(5, "DateTime"),
811  JSON(6, "Json" );
812 
813  private final long typeId;
814  private final String typeName;
815 
816  /*
817  * TODO (AUT-2070): Add a localized displayName field and a
818  * getDisplayName method for API consistency.
819  */
826  private TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE(long type, String typeName) {
827  this.typeId = type;
828  this.typeName = typeName;
829  }
830 
839  public long getType() {
840  return typeId;
841  }
842 
851  public String getLabel() {
852  return this.typeName;
853  }
854 
869  static public TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE fromType(long typeId) {
871  if (valueType.getType() == typeId) {
872  return valueType;
873  }
874  }
875  throw new IllegalArgumentException("No TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE matching type: " + typeId);
876  }
877 
892  static public TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE fromLabel(String typeName) {
894  if (valueType.getLabel().equals(typeName)) {
895  return valueType;
896  }
897  }
898  throw new IllegalArgumentException("No TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE matching type: " + typeName);
899  }
900 
901  }
902 
909  public enum ATTRIBUTE_TYPE {
910 
911  TSK_URL(1, "TSK_URL", //NON-NLS
912  bundle.getString("BlackboardAttribute.tskUrl.text"),
914  TSK_DATETIME(2, "TSK_DATETIME", //NON-NLS
915  bundle.getString("BlackboardAttribute.tskDatetime.text"),
917  TSK_NAME(3, "TSK_NAME", //NON-NLS
918  bundle.getString("BlackboardAttribute.tskName.text"),
920  TSK_PROG_NAME(4, "TSK_PROG_NAME", //NON-NLS
921  bundle.getString("BlackboardAttribute.tskProgName.text"),
923  TSK_VALUE(6, "TSK_VALUE", //NON-NLS
924  bundle.getString("BlackboardAttribute.tskValue.text"),
926  TSK_FLAG(7, "TSK_FLAG", //NON-NLS
927  bundle.getString("BlackboardAttribute.tskFlag.text"),
929  TSK_PATH(8, "TSK_PATH", //NON-NLS
930  bundle.getString("BlackboardAttribute.tskPath.text"),
932  TSK_KEYWORD(10, "TSK_KEYWORD", //NON-NLS
933  bundle.getString("BlackboardAttribute.tskKeyword.text"),
935  TSK_KEYWORD_REGEXP(11, "TSK_KEYWORD_REGEXP", //NON-NLS
936  bundle.getString("BlackboardAttribute.tskKeywordRegexp.text"),
938  TSK_KEYWORD_PREVIEW(12, "TSK_KEYWORD_PREVIEW", //NON-NLS
939  bundle.getString("BlackboardAttribute.tskKeywordPreview.text"),
944  @Deprecated
945  TSK_KEYWORD_SET(13, "TSK_KEYWORD_SET", //NON-NLS
946  bundle.getString("BlackboardAttribute.tskKeywordSet.text"),
948  TSK_USER_NAME(14, "TSK_USER_NAME", //NON-NLS
949  bundle.getString("BlackboardAttribute.tskUserName.text"),
951  TSK_DOMAIN(15, "TSK_DOMAIN", //NON-NLS
952  bundle.getString("BlackboardAttribute.tskDomain.text"),
954  TSK_PASSWORD(16, "TSK_PASSWORD", //NON-NLS
955  bundle.getString("BlackboardAttribute.tskPassword.text"),
957  TSK_NAME_PERSON(17, "TSK_NAME_PERSON", //NON-NLS
958  bundle.getString("BlackboardAttribute.tskNamePerson.text"),
960  TSK_DEVICE_MODEL(18, "TSK_DEVICE_MODEL", //NON-NLS
961  bundle.getString("BlackboardAttribute.tskDeviceModel.text"),
963  TSK_DEVICE_MAKE(19, "TSK_DEVICE_MAKE", //NON-NLS
964  bundle.getString("BlackboardAttribute.tskDeviceMake.text"),
966  TSK_DEVICE_ID(20, "TSK_DEVICE_ID", //NON-NLS
967  bundle.getString("BlackboardAttribute.tskDeviceId.text"),
969  TSK_EMAIL(21, "TSK_EMAIL", //NON-NLS
970  bundle.getString("BlackboardAttribute.tskEmail.text"),
972  TSK_HASH_MD5(22, "TSK_HASH_MD5", //NON-NLS
973  bundle.getString("BlackboardAttribute.tskHashMd5.text"),
975  TSK_HASH_SHA1(23, "TSK_HASH_SHA1", //NON-NLS
976  bundle.getString("BlackboardAttribute.tskHashSha1.text"),
978  TSK_HASH_SHA2_256(24, "TSK_HASH_SHA2_256", //NON-NLS
979  bundle.getString("BlackboardAttribute.tskHashSha225.text"),
981  TSK_HASH_SHA2_512(25, "TSK_HASH_SHA2_512", //NON-NLS
982  bundle.getString("BlackboardAttribute.tskHashSha2512.text"),
984  TSK_TEXT(26, "TSK_TEXT", //NON-NLS
985  bundle.getString("BlackboardAttribute.tskText.text"),
987  TSK_TEXT_FILE(27, "TSK_TEXT_FILE", //NON-NLS
988  bundle.getString("BlackboardAttribute.tskTextFile.text"),
990  TSK_TEXT_LANGUAGE(28, "TSK_TEXT_LANGUAGE", //NON-NLS
991  bundle.getString("BlackboardAttribute.tskTextLanguage.text"),
993  TSK_ENTROPY(29, "TSK_ENTROPY", //NON-NLS
994  bundle.getString("BlackboardAttribute.tskEntropy.text"),
999  @Deprecated
1000  TSK_HASHSET_NAME(30, "TSK_HASHSET_NAME", //NON-NLS
1001  bundle.getString("BlackboardAttribute.tskHashsetName.text"),
1006  @Deprecated
1007  TSK_INTERESTING_FILE(31, "TSK_INTERESTING_FILE", //NON-NLS
1008  bundle.getString("BlackboardAttribute.tskInterestingFile.text"),
1010  TSK_REFERRER(32, "TSK_REFERRER", //NON-NLS
1011  bundle.getString("BlackboardAttribute.tskReferrer.text"),
1013  TSK_DATETIME_ACCESSED(33, "TSK_DATETIME_ACCESSED", //NON-NLS
1014  bundle.getString("BlackboardAttribute.tskDateTimeAccessed.text"),
1016  TSK_IP_ADDRESS(34, "TSK_IP_ADDRESS", //NON-NLS
1017  bundle.getString("BlackboardAttribute.tskIpAddress.text"),
1019  TSK_PHONE_NUMBER(35, "TSK_PHONE_NUMBER", //NON-NLS
1020  bundle.getString("BlackboardAttribute.tskPhoneNumber.text"),
1022  TSK_PATH_ID(36, "TSK_PATH_ID", //NON-NLS
1023  bundle.getString("BlackboardAttribute.tskPathId.text"),
1025  TSK_SET_NAME(37, "TSK_SET_NAME", //NON-NLS
1026  bundle.getString("BlackboardAttribute.tskSetName.text"),
1031  @Deprecated
1032  TSK_ENCRYPTION_DETECTED(38, "TSK_ENCRYPTION_DETECTED", //NON-NLS
1033  bundle.getString("BlackboardAttribute.tskEncryptionDetected.text"),
1035  TSK_MALWARE_DETECTED(39, "TSK_MALWARE_DETECTED", //NON-NLS
1036  bundle.getString("BlackboardAttribute.tskMalwareDetected.text"),
1038  TSK_STEG_DETECTED(40, "TSK_STEG_DETECTED", //NON-NLS
1039  bundle.getString("BlackboardAttribute.tskStegDetected.text"),
1041  TSK_EMAIL_TO(41, "TSK_EMAIL_TO", //NON-NLS
1042  bundle.getString("BlackboardAttribute.tskEmailTo.text"),
1044  TSK_EMAIL_CC(42, "TSK_EMAIL_CC", //NON-NLS
1045  bundle.getString("BlackboardAttribute.tskEmailCc.text"),
1047  TSK_EMAIL_BCC(43, "TSK_EMAIL_BCC", //NON-NLS
1048  bundle.getString("BlackboardAttribute.tskEmailBcc.text"),
1050  TSK_EMAIL_FROM(44, "TSK_EMAIL_FROM", //NON-NLS
1051  bundle.getString("BlackboardAttribute.tskEmailFrom.text"),
1053  TSK_EMAIL_CONTENT_PLAIN(45, "TSK_EMAIL_CONTENT_PLAIN", //NON-NLS
1054  bundle.getString("BlackboardAttribute.tskEmailContentPlain.text"),
1056  TSK_EMAIL_CONTENT_HTML(46, "TSK_EMAIL_CONTENT_HTML", //NON-NLS
1057  bundle.getString("BlackboardAttribute.tskEmailContentHtml.text"),
1059  TSK_EMAIL_CONTENT_RTF(47, "TSK_EMAIL_CONTENT_RTF", //NON-NLS
1060  bundle.getString("BlackboardAttribute.tskEmailContentRtf.text"),
1062  TSK_MSG_ID(48, "TSK_MSG_ID", //NON-NLS
1063  bundle.getString("BlackboardAttribute.tskMsgId.text"),
1065  TSK_MSG_REPLY_ID(49, "TSK_MSG_REPLY_ID", //NON-NLS
1066  bundle.getString("BlackboardAttribute.tskMsgReplyId.text"),
1068  TSK_DATETIME_RCVD(50, "TSK_DATETIME_RCVD", //NON-NLS
1069  bundle.getString("BlackboardAttribute.tskDateTimeRcvd.text"),
1071  TSK_DATETIME_SENT(51, "TSK_DATETIME_SENT", //NON-NLS
1072  bundle.getString("BlackboardAttribute.tskDateTimeSent.text"),
1074  TSK_SUBJECT(52, "TSK_SUBJECT", //NON-NLS
1075  bundle.getString("BlackboardAttribute.tskSubject.text"),
1077  TSK_TITLE(53, "TSK_TITLE", //NON-NLS
1078  bundle.getString("BlackboardAttribute.tskTitle.text"),
1080  TSK_GEO_LATITUDE(54, "TSK_GEO_LATITUDE", //NON-NLS
1081  bundle.getString("BlackboardAttribute.tskGeoLatitude.text"),
1083  TSK_GEO_LONGITUDE(55, "TSK_GEO_LONGITUDE", //NON-NLS
1084  bundle.getString("BlackboardAttribute.tskGeoLongitude.text"),
1086  TSK_GEO_VELOCITY(56, "TSK_GEO_VELOCITY", //NON-NLS
1087  bundle.getString("BlackboardAttribute.tskGeoVelocity.text"),
1089  TSK_GEO_ALTITUDE(57, "TSK_GEO_ALTITUDE", //NON-NLS
1090  bundle.getString("BlackboardAttribute.tskGeoAltitude.text"),
1092  TSK_GEO_BEARING(58, "TSK_GEO_BEARING", //NON-NLS
1093  bundle.getString("BlackboardAttribute.tskGeoBearing.text"),
1095  TSK_GEO_HPRECISION(59, "TSK_GEO_HPRECISION", //NON-NLS
1096  bundle.getString("BlackboardAttribute.tskGeoHPrecision.text"),
1098  TSK_GEO_VPRECISION(60, "TSK_GEO_VPRECISION", //NON-NLS
1099  bundle.getString("BlackboardAttribute.tskGeoVPrecision.text"),
1101  TSK_GEO_MAPDATUM(61, "TSK_GEO_MAPDATUM", //NON-NLS
1102  bundle.getString("BlackboardAttribute.tskGeoMapDatum.text"),
1108  @Deprecated
1109  TSK_FILE_TYPE_SIG(62, "TSK_FILE_TYPE_SIG", //NON-NLS
1110  bundle.getString("BlackboardAttribute.tskFileTypeSig.text"),
1112  TSK_FILE_TYPE_EXT(63, "TSK_FILE_TYPE_EXT", //NON-NLS
1113  bundle.getString("BlackboardAttribute.tskFileTypeExt.text"),
1119  @Deprecated
1120  TSK_TAGGED_ARTIFACT(64, "TSK_TAGGED_ARTIFACT", //NON-NLS
1121  bundle.getString("BlackboardAttribute.tskTaggedArtifact.text"),
1127  @Deprecated
1128  TSK_TAG_NAME(65, "TSK_TAG_NAME", //NON-NLS
1129  bundle.getString("BlackboardAttribute.tskTagName.text"),
1131  TSK_COMMENT(66, "TSK_COMMENT", //NON-NLS
1132  bundle.getString("BlackboardAttribute.tskComment.text"),
1134  TSK_URL_DECODED(67, "TSK_URL_DECODED", //NON-NLS
1135  bundle.getString("BlackboardAttribute.tskUrlDecoded.text"),
1137  TSK_DATETIME_CREATED(68, "TSK_DATETIME_CREATED", //NON-NLS
1138  bundle.getString("BlackboardAttribute.tskDateTimeCreated.text"),
1140  TSK_DATETIME_MODIFIED(69, "TSK_DATETIME_MODIFIED", //NON-NLS
1141  bundle.getString("BlackboardAttribute.tskDateTimeModified.text"),
1143  TSK_PROCESSOR_ARCHITECTURE(70, "TSK_PROCESSOR_ARCHITECTURE", //NON-NLS
1144  bundle.getString("BlackboardAttribute.tskProcessorArchitecture.text"),
1146  TSK_VERSION(71, "TSK_VERSION", //NON-NLS
1147  bundle.getString("BlackboardAttribute.tskVersion.text"),
1149  TSK_USER_ID(72, "TSK_USER_ID", //NON-NLS
1150  bundle.getString("BlackboardAttribute.tskUserId.text"),
1152  TSK_DESCRIPTION(73, "TSK_DESCRIPTION", //NON-NLS
1153  bundle.getString("BlackboardAttribute.tskDescription.text"),
1155  TSK_MESSAGE_TYPE(74, "TSK_MESSAGE_TYPE", //NON-NLS
1156  bundle.getString("BlackboardAttribute.tskMessageType.text"),
1157  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // SMS or MMS or IM ...
1158  TSK_PHONE_NUMBER_HOME(75, "TSK_PHONE_NUMBER_HOME", //NON-NLS
1159  bundle.getString("BlackboardAttribute.tskPhoneNumberHome.text"),
1161  TSK_PHONE_NUMBER_OFFICE(76, "TSK_PHONE_NUMBER_OFFICE", //NON-NLS
1162  bundle.getString("BlackboardAttribute.tskPhoneNumberOffice.text"),
1164  TSK_PHONE_NUMBER_MOBILE(77, "TSK_PHONE_NUMBER_MOBILE", //NON-NLS
1165  bundle.getString("BlackboardAttribute.tskPhoneNumberMobile.text"),
1167  TSK_PHONE_NUMBER_FROM(78, "TSK_PHONE_NUMBER_FROM", //NON-NLS
1168  bundle.getString("BlackboardAttribute.tskPhoneNumberFrom.text"),
1170  TSK_PHONE_NUMBER_TO(79, "TSK_PHONE_NUMBER_TO", //NON-NLS
1171  bundle.getString("BlackboardAttribute.tskPhoneNumberTo.text"),
1173  TSK_DIRECTION(80, "TSK_DIRECTION", //NON-NLS
1174  bundle.getString("BlackboardAttribute.tskDirection.text"),
1175  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // Msg/Call direction: incoming, outgoing
1176  TSK_EMAIL_HOME(81, "TSK_EMAIL_HOME", //NON-NLS
1177  bundle.getString("BlackboardAttribute.tskEmailHome.text"),
1179  TSK_EMAIL_OFFICE(82, "TSK_EMAIL_OFFICE", //NON-NLS
1180  bundle.getString("BlackboardAttribute.tskEmailOffice.text"),
1182  TSK_DATETIME_START(83, "TSK_DATETIME_START", //NON-NLS
1183  bundle.getString("BlackboardAttribute.tskDateTimeStart.text"),
1184  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME), // start time of an event - call log, Calendar entry
1185  TSK_DATETIME_END(84, "TSK_DATETIME_END", //NON-NLS
1186  bundle.getString("BlackboardAttribute.tskDateTimeEnd.text"),
1187  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME), // end time of an event - call log, Calendar entry
1188  TSK_CALENDAR_ENTRY_TYPE(85, "TSK_CALENDAR_ENTRY_TYPE", //NON-NLS
1189  bundle.getString("BlackboardAttribute.tskCalendarEntryType.text"),
1190  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // meeting, task,
1191  TSK_LOCATION(86, "TSK_LOCATION", //NON-NLS
1192  bundle.getString("BlackboardAttribute.tskLocation.text"),
1193  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // Location string associated with an event - Conf Room Name, Address ....
1194  TSK_SHORTCUT(87, "TSK_SHORTCUT", //NON-NLS
1195  bundle.getString("BlackboardAttribute.tskShortcut.text"),
1196  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // Short Cut string - short code or dial string for Speed dial, a URL short cut - e.g. bitly string, Windows Desktop Short cut name etc.
1197  TSK_DEVICE_NAME(88, "TSK_DEVICE_NAME", //NON-NLS
1198  bundle.getString("BlackboardAttribute.tskDeviceName.text"),
1199  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // device name - a user assigned (usually) device name - such as "Joe's computer", "bob_win8", "BT Headset"
1200  TSK_CATEGORY(89, "TSK_CATEGORY", //NON-NLS
1201  bundle.getString("BlackboardAttribute.tskCategory.text"),
1202  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // category/type, possible value set varies by the artifact
1203  TSK_EMAIL_REPLYTO(90, "TSK_EMAIL_REPLYTO", //NON-NLS
1204  bundle.getString("BlackboardAttribute.tskEmailReplyTo.text"),
1205  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // ReplyTo address
1206  TSK_SERVER_NAME(91, "TSK_SERVER_NAME", //NON-NLS
1207  bundle.getString("BlackboardAttribute.tskServerName.text"),
1208  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // server name, e.g. a mail server name - "smtp.google.com", a DNS server name...
1209  TSK_COUNT(92, "TSK_COUNT", //NON-NLS
1210  bundle.getString("BlackboardAttribute.tskCount.text"),
1211  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER), // Count related to the artifact
1212  TSK_MIN_COUNT(93, "TSK_MIN_COUNT", //NON-NLS
1213  bundle.getString("BlackboardAttribute.tskMinCount.text"),
1214  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER), // Minimum number/count
1215  TSK_PATH_SOURCE(94, "TSK_PATH_SOURCE", //NON-NLS
1216  bundle.getString("BlackboardAttribute.tskPathSource.text"),
1217  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // Path to a source file related to the artifact
1218  TSK_PERMISSIONS(95, "TSK_PERMISSIONS", //NON-NLS
1219  bundle.getString("BlackboardAttribute.tskPermissions.text"),
1221  TSK_ASSOCIATED_ARTIFACT(96, "TSK_ASSOCIATED_ARTIFACT", //NON-NLS
1222  bundle.getString("BlackboardAttribute.tskAssociatedArtifact.text"),
1223  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG), // Artifact ID of a related artifact
1224  TSK_ISDELETED(97, "TSK_ISDELETED", //NON-NLS
1225  bundle.getString("BlackboardAttribute.tskIsDeleted.text"),
1226  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // boolean to indicate that the artifact is recovered fom deleted content
1227  TSK_GEO_LATITUDE_START(98, "TSK_GEO_LATITUDE_START", //NON-NLS
1228  bundle.getString("BlackboardAttribute.tskGeoLatitudeStart.text"),
1229  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE), // Starting location lattitude
1230  TSK_GEO_LATITUDE_END(99, "TSK_GEO_LATITUDE_END", //NON-NLS
1231  bundle.getString("BlackboardAttribute.tskGeoLatitudeEnd.text"),
1232  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE), // Ending location lattitude
1233  TSK_GEO_LONGITUDE_START(100, "TSK_GEO_LONGITUDE_START", //NON-NLS
1234  bundle.getString("BlackboardAttribute.tskGeoLongitudeStart.text"),
1235  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE), // Starting location longitude
1236  TSK_GEO_LONGITUDE_END(101, "TSK_GEO_LONGITUDE_END", //NON-NLS
1237  bundle.getString("BlackboardAttribute.tskGeoLongitudeEnd.text"),
1238  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE), //Ending Location longitude
1239  TSK_READ_STATUS(102, "TSK_READ_STATUS", //NON-NLS
1240  bundle.getString("BlackboardAttribute.tskReadStatus.text"),
1241  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER), // Message read status: 1 if read, 0 if unread
1242  TSK_LOCAL_PATH(103, "TSK_LOCAL_PATH", //NON-NLS
1243  bundle.getString("BlackboardAttribute.tskLocalPath.text"),
1244  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // Local path to a network drive
1245  TSK_REMOTE_PATH(104, "TSK_REMOTE_PATH", //NON-NLS
1246  bundle.getString("BlackboardAttribute.tskRemotePath.text"),
1247  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // Remote path of a network drive
1248  TSK_TEMP_DIR(105, "TSK_TEMP_DIR", //NON-NLS
1249  bundle.getString("BlackboardAttribute.tskTempDir.text"),
1250  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // Default temporary files directory
1251  TSK_PRODUCT_ID(106, "TSK_PRODUCT_ID", //NON-NLS
1252  bundle.getString("BlackboardAttribute.tskProductId.text"),
1254  TSK_OWNER(107, "TSK_OWNER", //NON-NLS
1255  bundle.getString("BlackboardAttribute.tskOwner.text"),
1256  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // Registered owner of a piece of software
1257  TSK_ORGANIZATION(108, "TSK_ORGANIZATION", //NON-NLS
1258  bundle.getString("BlackboardAttribute.tskOrganization.text"),
1259  TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING), // Registered Organization for a piece of software
1260  TSK_CARD_NUMBER(109, "TSK_CARD_NUMBER", //NON-NLS
1261  bundle.getString("BlackboardAttribute.tskCardNumber.text"),
1263  TSK_CARD_EXPIRATION(110, "TSK_CARD_EXPIRATION", //for card as 4 digits MMYY //NON-NLS
1264  bundle.getString("BlackboardAttribute.tskCardExpiration.text"),
1266  TSK_CARD_SERVICE_CODE(111, "TSK_CARD_SERVICE_CODE", // 3 digits //NON-NLS
1267  bundle.getString("BlackboardAttribute.tskCardServiceCode.text"),
1269  TSK_CARD_DISCRETIONARY(112, "TSK_CARD_DISCRETIONARY", //data used at the discretion of the issuer //NON-NLS
1270  bundle.getString("BlackboardAttribute.tskCardDiscretionary.text"),
1272  TSK_CARD_LRC(113, "TSK_CARD_LRC", //NON-NLS //Longitudunal Redundancy Check character //NON-NLS
1273  bundle.getString("BlackboardAttribute.tskCardLRC.text"),
1275  TSK_KEYWORD_SEARCH_DOCUMENT_ID(114, "TSK_KEYWORD_SEARCH_DOCUMENT_ID", //NON-NLS
1276  bundle.getString("BlackboardAttribute.tskKeywordSearchDocumentID.text"),
1278  TSK_CARD_SCHEME(115, "TSK_CARD_SCHEME", //amex, visa, mastercard, discover, etc //NON-NLS
1279  bundle.getString("BlackboardAttribute.tskCardScheme.text"),
1281  TSK_CARD_TYPE(116, "TSK_CARD_TYPE", // debit vs credit //NON-NLS
1282  bundle.getString("BlackboardAttribute.tskCardType.text"),
1284  TSK_BRAND_NAME(117, "TSK_BRAND_NAME",
1285  bundle.getString("BlackboardAttribute.tskBrandName.text"),
1287  TSK_BANK_NAME(118, "TSK_BANK_NAME",
1288  bundle.getString("BlackboardAttribute.tskBankName.text"),
1290  TSK_COUNTRY(119, "TSK_COUNTRY",
1291  bundle.getString("BlackboardAttribute.tskCountry.text"),
1293  TSK_CITY(120, "TSK_CITY",
1294  bundle.getString("BlackboardAttribute.tskCity.text"),
1296  TSK_ACCOUNT_TYPE(121, "TSK_ACCOUNT_TYPE",
1297  bundle.getString("BlackboardAttribute.tskAccountType.text"),
1302  TSK_KEYWORD_SEARCH_TYPE(122, "TSK_KEYWORD_SEARCH_TYPE", //NON-NLS
1303  bundle.getString("BlackboardAttribute.tskKeywordSearchType.text"),
1305  TSK_HEADERS(123, "TSK_HEADERS", //NON-NLS
1306  bundle.getString("BlackboardAttribute.tskHeaders.text"),
1308  TSK_ID(124, "TSK_ID", //NON-NLS
1309  bundle.getString("BlackboardAttribute.tskId.text"),
1311  TSK_SSID(125, "TSK_SSID", //NON-NLS
1312  bundle.getString("BlackboardAttribute.tskSsid.text"),
1314  TSK_BSSID(126, "TSK_BSSID", //NON-NLS
1315  bundle.getString("BlackboardAttribute.tskBssid.text"),
1317  TSK_MAC_ADDRESS(127, "TSK_MAC_ADDRESS", //NON-NLS
1318  bundle.getString("BlackboardAttribute.tskMacAddress.text"),
1320  TSK_IMEI(128, "TSK_IMEI", //NON-NLS
1321  bundle.getString("BlackboardAttribute.tskImei.text"),
1323  TSK_IMSI(129, "TSK_IMSI", //NON-NLS
1324  bundle.getString("BlackboardAttribute.tskImsi.text"),
1326  TSK_ICCID(130, "TSK_ICCID", //NON-NLS
1327  bundle.getString("BlackboardAttribute.tskIccid.text"),
1329  TSK_THREAD_ID(131, "TSK_THREAD_ID",
1330  bundle.getString("BlackboardAttribute.tskthreadid.text"),
1336  TSK_TL_EVENT_TYPE(132, "TSK_TL_EVENT_TYPE", //NON-NLS
1337  bundle.getString("BlackboardAttribute.tskTLEventType.text"),
1339 
1340  TSK_DATETIME_DELETED(133, "TSK_DATETIME_DELETED", //NON-NLS
1341  bundle.getString("BlackboardAttribute.tskdatetimedeleted.text"),
1343 
1344  TSK_DATETIME_PASSWORD_RESET(134, "TSK_DATETIME_PASSWORD_RESET",
1345  bundle.getString("BlackboardAttribute.tskdatetimepwdreset.text"),
1347 
1348  TSK_DATETIME_PASSWORD_FAIL(135, "TSK_DATETIME_PWD_FAIL",
1349  bundle.getString("BlackboardAttribute.tskdatetimepwdfail.text"),
1351 
1352  TSK_DISPLAY_NAME(136, "TSK_DISPLAY_NAME",
1353  bundle.getString("BlackboardAttribute.tskdisplayname.text"),
1355 
1356  TSK_PASSWORD_SETTINGS(137, "TSK_PASSWORD_SETTINGS",
1357  bundle.getString("BlackboardAttribute.tskpasswordsettings.text"),
1359 
1360  TSK_ACCOUNT_SETTINGS(138, "TSK_ACCOUNT_SETTINGS",
1361  bundle.getString("BlackboardAttribute.tskaccountsettings.text"),
1363 
1364  TSK_PASSWORD_HINT(139, "TSK_PASSWORD_HINT",
1365  bundle.getString("BlackboardAttribute.tskpasswordhint.text"),
1367 
1368  TSK_GROUPS (140, "TSK_GROUPS",
1369  bundle.getString("BlackboardAttribute.tskgroups.text"),
1371 
1372  /*
1373  * Use org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments to create and
1374  * process TSK_ATTACHMENTS attributes.
1375  */
1376  TSK_ATTACHMENTS (141, "TSK_ATTACHMENTS",
1377  bundle.getString("BlackboardAttribute.tskattachments.text"),
1379 
1380  /*
1381  * Use org.sleuthkit.datamodel.blackboardutils.attributes.GeoTrackPoints to create and
1382  * process TSK_GEO_TRACKPOINTS attributes.
1383  */
1384  TSK_GEO_TRACKPOINTS(142, "TSK_GEO_TRACKPOINTS",
1385  bundle.getString("BlackboardAttribute.tskgeopath.text"),
1387 
1388  /*
1389  * Use org.sleuthkit.datamodel.blackboardutils.attributes.GeoWaypoints to create and
1390  * process TSK_GEO_WAYPOINTS attributes.
1391  */
1392  TSK_GEO_WAYPOINTS(143, "TSK_GEO_WAYPOINTS",
1393  bundle.getString("BlackboardAttribute.tskgeowaypoints.text"),
1395 
1396  TSK_DISTANCE_TRAVELED(144, "TSK_DISTANCE_TRAVELED",
1397  bundle.getString("BlackboardAttribute.tskdistancetraveled.text"),
1399 
1400  TSK_DISTANCE_FROM_HOMEPOINT(145, "TSK_DISTANCE_FROM_HOMEPOINT",
1401  bundle.getString("BlackboardAttribute.tskdistancefromhome.text"),
1403 
1404  TSK_HASH_PHOTODNA(146, "TSK_HASH_PHOTODNA",
1405  bundle.getString("BlackboardAttribute.tskhashphotodna.text"),
1407 
1408  TSK_BYTES_SENT(147, "TSK_BYTES_SENT",
1409  bundle.getString("BlackboardAttribute.tskbytessent.text"),
1411 
1412  TSK_BYTES_RECEIVED(148, "TSK_BYTES_RECEIVED",
1413  bundle.getString("BlackboardAttribute.tskbytesreceived.text"),
1415 
1416  TSK_LAST_PRINTED_DATETIME(149, "TSK_LAST_PRINTED_DATETIME",
1417  bundle.getString("BlackboardAttribute.tsklastprinteddatetime.text"),
1419 
1420 
1421  ;
1422 
1423  private final int typeID;
1424  private final String typeName;
1425  private final String displayName;
1426  private final TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType;
1427 
1436  private ATTRIBUTE_TYPE(int typeID, String typeName, String displayName, TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType) {
1437  this.typeID = typeID;
1438  this.typeName = typeName;
1439  this.displayName = displayName;
1440  this.valueType = valueType;
1441  }
1442 
1448  public int getTypeID() {
1449  return this.typeID;
1450  }
1451 
1460  public String getLabel() {
1461  return this.typeName;
1462  }
1463 
1469  public String getDisplayName() {
1470  return this.displayName;
1471  }
1472 
1479  return this.valueType;
1480  }
1481 
1495  static public ATTRIBUTE_TYPE fromID(int typeID) {
1496  for (ATTRIBUTE_TYPE attrType : ATTRIBUTE_TYPE.values()) {
1497  if (attrType.getTypeID() == typeID) {
1498  return attrType;
1499  }
1500  }
1501  throw new IllegalArgumentException("No ATTRIBUTE_TYPE matching type: " + typeID);
1502  }
1503 
1517  static public ATTRIBUTE_TYPE fromLabel(String typeName) {
1518  for (ATTRIBUTE_TYPE attrType : ATTRIBUTE_TYPE.values()) {
1519  if (attrType.getLabel().equals(typeName)) {
1520  return attrType;
1521  }
1522  }
1523  throw new IllegalArgumentException("No ATTRIBUTE_TYPE matching type: " + typeName);
1524  }
1525 
1526  }
1527 
1544  @Deprecated
1545  public BlackboardAttribute(int attributeTypeID, String moduleName, int valueInt) throws IllegalArgumentException {
1546  this(ATTRIBUTE_TYPE.fromID(attributeTypeID), moduleName, valueInt);
1547  }
1548 
1566  @Deprecated
1567  public BlackboardAttribute(int attributeTypeID, String moduleName, String context,
1568  int valueInt) {
1569  this(attributeTypeID, moduleName, valueInt);
1570  this.context = replaceNulls(context);
1571  }
1572 
1591  @Deprecated
1592  public BlackboardAttribute(int attributeTypeID, String moduleName,
1593  long valueLong) throws IllegalArgumentException {
1594  this(ATTRIBUTE_TYPE.fromID(attributeTypeID), moduleName, valueLong);
1595  }
1596 
1616  @Deprecated
1617  public BlackboardAttribute(int attributeTypeID, String moduleName, String context,
1618  long valueLong) {
1619  this(attributeTypeID, moduleName, valueLong);
1620  this.context = replaceNulls(context);
1621  }
1622 
1639  @Deprecated
1640  public BlackboardAttribute(int attributeTypeID, String moduleName,
1641  double valueDouble) throws IllegalArgumentException {
1642  this(ATTRIBUTE_TYPE.fromID(attributeTypeID), moduleName, valueDouble);
1643  }
1644 
1662  @Deprecated
1663  public BlackboardAttribute(int attributeTypeID, String moduleName, String context,
1664  double valueDouble) {
1665  this(attributeTypeID, moduleName, valueDouble);
1666  this.context = replaceNulls(context);
1667  }
1668 
1685  @Deprecated
1686  public BlackboardAttribute(int attributeTypeID, String moduleName, String valueString) throws IllegalArgumentException {
1687  this(ATTRIBUTE_TYPE.fromID(attributeTypeID), moduleName, valueString);
1688  }
1689 
1707  @Deprecated
1708  public BlackboardAttribute(int attributeTypeID, String moduleName, String context,
1709  String valueString) {
1710  this(attributeTypeID, moduleName, valueString);
1711  this.context = replaceNulls(context);
1712  }
1713 
1730  @Deprecated
1731  public BlackboardAttribute(int attributeTypeID, String moduleName, byte[] valueBytes) throws IllegalArgumentException {
1732  this(ATTRIBUTE_TYPE.fromID(attributeTypeID), moduleName, valueBytes);
1733  }
1734 
1752  @Deprecated
1753  public BlackboardAttribute(int attributeTypeID, String moduleName, String context,
1754  byte[] valueBytes) {
1755  this(attributeTypeID, moduleName, valueBytes);
1756  this.context = replaceNulls(context);
1757  }
1758 
1769  @Deprecated
1770  protected void setArtifactID(long artifactID) {
1771  setArtifactId(artifactID);
1772  }
1773 
1785  @Deprecated
1786  protected void setCase(SleuthkitCase sleuthkitCase) {
1787  setCaseDatabase(sleuthkitCase);
1788  }
1789 
1797  @Deprecated
1798  public String getContext() {
1799  return context;
1800  }
1801 
1809  @Deprecated
1810  String getContextString() {
1811  return context;
1812  }
1813 
1821  @Deprecated
1822  public int getAttributeTypeID() {
1823  return attributeType.getTypeID();
1824  }
1825 
1835  @Deprecated
1836  public String getAttributeTypeName() throws TskCoreException {
1837  return attributeType.getTypeName();
1838  }
1839 
1850  @Deprecated
1852  return attributeType.getDisplayName();
1853  }
1854 
1863  @Deprecated
1864  public String getModuleName() {
1865  return sources;
1866  }
1867 
1868 }
BlackboardAttribute(int attributeTypeID, String moduleName, String context, byte[] valueBytes)
Type(int typeID, String typeName, String displayName, TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType)
static String epochToTime(long epoch)
TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE getValueType()
BlackboardAttribute(Type attributeType, String source, long valueLong)
BlackboardAttribute(Type attributeType, String source, int valueInt)
BlackboardAttribute(int attributeTypeID, String moduleName, String context, int valueInt)
BlackboardArtifact getBlackboardArtifact(long artifactID)
static TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE fromLabel(String typeName)
TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE getValueType()
BlackboardAttribute(int attributeTypeID, String moduleName, int valueInt)
BlackboardAttribute(int attributeTypeID, String moduleName, String valueString)
BlackboardAttribute(int attributeTypeID, String moduleName, double valueDouble)
BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, String valueString)
BlackboardAttribute(Type attributeType, String source, byte[] valueBytes)
BlackboardAttribute(int attributeTypeID, String moduleName, String context, double valueDouble)
BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, long valueLong)
BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, int valueInt)
BlackboardAttribute(Type attributeType, String source, double valueDouble)
BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, double valueDouble)
BlackboardAttribute(int attributeTypeID, String moduleName, String context, long valueLong)
BlackboardAttribute(int attributeTypeID, String moduleName, String context, String valueString)
BlackboardAttribute(int attributeTypeID, String moduleName, long valueLong)
Type(BlackboardAttribute.ATTRIBUTE_TYPE type)
BlackboardAttribute(int attributeTypeID, String moduleName, byte[] valueBytes)
BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String source, byte[] valueBytes)
BlackboardAttribute(Type attributeType, String source, String valueString)

Copyright © 2011-2020 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.