Updated for deprecation

This commit is contained in:
Oliver Spohngellert 2016-02-11 12:44:26 -05:00
parent 1f309781a9
commit 178c31c5d2
14 changed files with 52 additions and 57 deletions

View File

@ -488,7 +488,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
// if the artifact has an ASSOCIATED ARTIFACT, then we display the associated artifact instead // if the artifact has an ASSOCIATED ARTIFACT, then we display the associated artifact instead
try { try {
for (BlackboardAttribute attr : artifact.getAttributes()) { for (BlackboardAttribute attr : artifact.getAttributes()) {
if (attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID()) { if (attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID()) {
long assocArtifactId = attr.getValueLong(); long assocArtifactId = attr.getValueLong();
int assocArtifactIndex = -1; int assocArtifactIndex = -1;
for (BlackboardArtifact art : artifacts) { for (BlackboardArtifact art : artifacts) {

View File

@ -72,19 +72,19 @@ public class ArtifactStringContent implements StringContent {
// name column // name column
buffer.append("<tr><td>"); //NON-NLS buffer.append("<tr><td>"); //NON-NLS
buffer.append(attr.getAttributeTypeDisplayName()); buffer.append(attr.getAttributeType().getDisplayName());
buffer.append("</td>"); //NON-NLS buffer.append("</td>"); //NON-NLS
// value column // value column
buffer.append("<td>"); //NON-NLS buffer.append("<td>"); //NON-NLS
if (attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID() if (attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID()
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID() || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID()
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID() || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID()
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_MODIFIED.getTypeID() || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_MODIFIED.getTypeID()
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_RCVD.getTypeID() || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_RCVD.getTypeID()
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_SENT.getTypeID() || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_SENT.getTypeID()
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_START.getTypeID() || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_START.getTypeID()
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_END.getTypeID()) { || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_END.getTypeID()) {
long epoch = attr.getValueLong(); long epoch = attr.getValueLong();
String time = "0000-00-00 00:00:00"; String time = "0000-00-00 00:00:00";
if (epoch != 0) { if (epoch != 0) {
@ -93,7 +93,7 @@ public class ArtifactStringContent implements StringContent {
} }
buffer.append(time); buffer.append(time);
} else { } else {
switch (attr.getValueType()) { switch (attr.getAttributeType().getValueType()) {
case STRING: case STRING:
String str = attr.getValueString(); String str = attr.getValueString();
str = str.replaceAll(" ", "&nbsp;"); //NON-NLS str = str.replaceAll(" ", "&nbsp;"); //NON-NLS

View File

@ -117,7 +117,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
if (artifact != null && artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { if (artifact != null && artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) {
try { try {
for (BlackboardAttribute attribute : artifact.getAttributes()) { for (BlackboardAttribute attribute : artifact.getAttributes()) {
if (attribute.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID()) { if (attribute.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT.getTypeID()) {
BlackboardArtifact associatedArtifact = Case.getCurrentCase().getSleuthkitCase().getBlackboardArtifact(attribute.getValueLong()); BlackboardArtifact associatedArtifact = Case.getCurrentCase().getSleuthkitCase().getBlackboardArtifact(attribute.getValueLong());
if (associatedArtifact != null) { if (associatedArtifact != null) {
displayName = associatedArtifact.getDisplayName() + " Artifact"; // NON-NLS displayName = associatedArtifact.getDisplayName() + " Artifact"; // NON-NLS
@ -384,7 +384,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
String keyword = null; String keyword = null;
String regexp = null; String regexp = null;
for (BlackboardAttribute att : attributes) { for (BlackboardAttribute att : attributes) {
final int attributeTypeID = att.getAttributeTypeID(); final int attributeTypeID = att.getAttributeType().getTypeID();
if (attributeTypeID == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) { if (attributeTypeID == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) {
keyword = att.getValueString(); keyword = att.getValueString();
} else if (attributeTypeID == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD_REGEXP.getTypeID()) { } else if (attributeTypeID == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD_REGEXP.getTypeID()) {

View File

@ -271,8 +271,8 @@ public class DataResultFilterNode extends FilterNode {
Content c = null; Content c = null;
try { try {
for (BlackboardAttribute attr : art.getAttributes()) { for (BlackboardAttribute attr : art.getAttributes()) {
if (attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID()) { if (attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID()) {
switch (attr.getValueType()) { switch (attr.getAttributeType().getValueType()) {
case INTEGER: case INTEGER:
int i = attr.getValueInt(); int i = attr.getValueInt();
if (i != -1) { if (i != -1) {

View File

@ -865,7 +865,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
String setName = null; String setName = null;
List<BlackboardAttribute> attributes = art.getAttributes(); List<BlackboardAttribute> attributes = art.getAttributes();
for (BlackboardAttribute att : attributes) { for (BlackboardAttribute att : attributes) {
int typeId = att.getAttributeTypeID(); int typeId = att.getAttributeType().getTypeID();
if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) { if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) {
setName = att.getValueString(); setName = att.getValueString();
} }
@ -882,7 +882,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
String keywordName = null; String keywordName = null;
List<BlackboardAttribute> attributes = art.getAttributes(); List<BlackboardAttribute> attributes = art.getAttributes();
for (BlackboardAttribute att : attributes) { for (BlackboardAttribute att : attributes) {
int typeId = att.getAttributeTypeID(); int typeId = att.getAttributeType().getTypeID();
if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) { if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) {
listName = att.getValueString(); listName = att.getValueString();
} else if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) { } else if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) {
@ -909,7 +909,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
String setName = null; String setName = null;
List<BlackboardAttribute> attributes = art.getAttributes(); List<BlackboardAttribute> attributes = art.getAttributes();
for (BlackboardAttribute att : attributes) { for (BlackboardAttribute att : attributes) {
int typeId = att.getAttributeTypeID(); int typeId = att.getAttributeType().getTypeID();
if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) { if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) {
setName = att.getValueString(); setName = att.getValueString();
} }

View File

@ -115,15 +115,15 @@ class EvalAccountObj extends EvaluatableObject {
boolean foundSIDMatch = false; boolean foundSIDMatch = false;
for (BlackboardAttribute attr : art.getAttributes()) { for (BlackboardAttribute attr : art.getAttributes()) {
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH.getTypeID())
&& (haveHomeDir)) { && (haveHomeDir)) {
foundHomeDirMatch = compareStringObject(userAccountObj.getHomeDirectory(), attr.getValueString()); foundHomeDirMatch = compareStringObject(userAccountObj.getHomeDirectory(), attr.getValueString());
} }
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_USER_NAME.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_USER_NAME.getTypeID())
&& (haveUsername)) { && (haveUsername)) {
foundUsernameMatch = compareStringObject(userAccountObj.getUsername(), attr.getValueString()); foundUsernameMatch = compareStringObject(userAccountObj.getUsername(), attr.getValueString());
} }
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_USER_ID.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_USER_ID.getTypeID())
&& (haveSID) && (winUserObj != null)) { && (haveSID) && (winUserObj != null)) {
foundSIDMatch = compareStringObject(winUserObj.getSecurityID(), attr.getValueString()); foundSIDMatch = compareStringObject(winUserObj.getSecurityID(), attr.getValueString());
} }

View File

@ -117,7 +117,7 @@ class EvalAddressObj extends EvaluatableObject {
for (BlackboardArtifact art : artList) { for (BlackboardArtifact art : artList) {
for (BlackboardAttribute attr : art.getAttributes()) { for (BlackboardAttribute attr : art.getAttributes()) {
if (attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) { if (attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) {
if (compareStringObject(addressStr, obj.getAddressValue().getCondition(), if (compareStringObject(addressStr, obj.getAddressValue().getCondition(),
obj.getAddressValue().getApplyCondition(), attr.getValueString())) { obj.getAddressValue().getApplyCondition(), attr.getValueString())) {
finalHits.add(art); finalHits.add(art);

View File

@ -80,7 +80,7 @@ class EvalDomainObj extends EvaluatableObject {
for (BlackboardArtifact art : artList) { for (BlackboardArtifact art : artList) {
for (BlackboardAttribute attr : art.getAttributes()) { for (BlackboardAttribute attr : art.getAttributes()) {
if (attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) { if (attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) {
String url = attr.getValueString(); String url = attr.getValueString();
// Check whether the domain name is a substring of the URL (regardless // Check whether the domain name is a substring of the URL (regardless

View File

@ -98,11 +98,11 @@ class EvalNetworkShareObj extends EvaluatableObject {
boolean foundLocalPathMatch = false; boolean foundLocalPathMatch = false;
for (BlackboardAttribute attr : art.getAttributes()) { for (BlackboardAttribute attr : art.getAttributes()) {
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_REMOTE_PATH.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_REMOTE_PATH.getTypeID())
&& (obj.getNetname() != null)) { && (obj.getNetname() != null)) {
foundRemotePathMatch = compareStringObject(obj.getNetname(), attr.getValueString()); foundRemotePathMatch = compareStringObject(obj.getNetname(), attr.getValueString());
} }
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_LOCAL_PATH.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_LOCAL_PATH.getTypeID())
&& (obj.getLocalPath() != null)) { && (obj.getLocalPath() != null)) {
foundLocalPathMatch = compareStringObject(obj.getLocalPath(), attr.getValueString()); foundLocalPathMatch = compareStringObject(obj.getLocalPath(), attr.getValueString());
} }

View File

@ -108,7 +108,7 @@ class EvalURIObj extends EvaluatableObject {
for (BlackboardArtifact art : artList) { for (BlackboardArtifact art : artList) {
for (BlackboardAttribute attr : art.getAttributes()) { for (BlackboardAttribute attr : art.getAttributes()) {
if (attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) { if (attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) {
String modifiedAttrString = attr.getValueString(); String modifiedAttrString = attr.getValueString();
if (modifiedAttrString != null) { if (modifiedAttrString != null) {

View File

@ -152,7 +152,7 @@ class EvalURLHistoryObj extends EvaluatableObject {
boolean foundBrowserNameMatch = false; boolean foundBrowserNameMatch = false;
for (BlackboardAttribute attr : art.getAttributes()) { for (BlackboardAttribute attr : art.getAttributes()) {
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_URL.getTypeID())
&& (haveURL)) { && (haveURL)) {
if (entry.getURL().getValue() instanceof AnyURIObjectPropertyType) { if (entry.getURL().getValue() instanceof AnyURIObjectPropertyType) {
foundURLMatch = compareStringObject(entry.getURL().getValue().getValue().toString(), foundURLMatch = compareStringObject(entry.getURL().getValue().getValue().toString(),
@ -163,12 +163,12 @@ class EvalURLHistoryObj extends EvaluatableObject {
addWarning("Non-AnyURIObjectPropertyType found in URL value field"); //NON-NLS addWarning("Non-AnyURIObjectPropertyType found in URL value field"); //NON-NLS
} }
} }
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID())
&& (haveHostname)) { && (haveHostname)) {
foundHostnameMatch = compareStringObject(entry.getHostname().getHostnameValue(), foundHostnameMatch = compareStringObject(entry.getHostname().getHostnameValue(),
attr.getValueString()); attr.getValueString());
} }
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID())
&& (haveReferrer)) { && (haveReferrer)) {
if (entry.getReferrerURL().getValue() instanceof AnyURIObjectPropertyType) { if (entry.getReferrerURL().getValue() instanceof AnyURIObjectPropertyType) {
foundReferrerMatch = compareStringObject(entry.getReferrerURL().getValue().getValue().toString(), foundReferrerMatch = compareStringObject(entry.getReferrerURL().getValue().getValue().toString(),
@ -179,17 +179,17 @@ class EvalURLHistoryObj extends EvaluatableObject {
addWarning("Non-AnyURIObjectPropertyType found in URL value field"); //NON-NLS addWarning("Non-AnyURIObjectPropertyType found in URL value field"); //NON-NLS
} }
} }
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE.getTypeID())
&& (havePageTitle)) { && (havePageTitle)) {
foundPageTitleMatch = compareStringObject(entry.getPageTitle(), foundPageTitleMatch = compareStringObject(entry.getPageTitle(),
attr.getValueString()); attr.getValueString());
} }
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_USER_NAME.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_USER_NAME.getTypeID())
&& (haveUserProfile)) { && (haveUserProfile)) {
foundUserProfileMatch = compareStringObject(entry.getUserProfileName(), foundUserProfileMatch = compareStringObject(entry.getUserProfileName(),
attr.getValueString()); attr.getValueString());
} }
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID())
&& (haveBrowserName)) { && (haveBrowserName)) {
foundBrowserNameMatch = compareStringObject(obj.getBrowserInformation().getName(), foundBrowserNameMatch = compareStringObject(obj.getBrowserInformation().getName(),
null, null, attr.getValueString()); null, null, attr.getValueString());
@ -240,7 +240,7 @@ class EvalURLHistoryObj extends EvaluatableObject {
boolean foundBrowserNameMatch = false; boolean foundBrowserNameMatch = false;
for (BlackboardAttribute attr : art.getAttributes()) { for (BlackboardAttribute attr : art.getAttributes()) {
if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID()) if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID())
&& (haveBrowserName)) { && (haveBrowserName)) {
foundBrowserNameMatch = compareStringObject(obj.getBrowserInformation().getName(), foundBrowserNameMatch = compareStringObject(obj.getBrowserInformation().getName(),
null, null, attr.getValueString()); null, null, attr.getValueString());

View File

@ -2146,7 +2146,7 @@ class ReportGenerator {
} }
for (BlackboardAttribute tempatt : attList) { for (BlackboardAttribute tempatt : attList) {
String value = ""; String value = "";
Integer type = tempatt.getAttributeTypeID(); Integer type = tempatt.getAttributeType().getTypeID();
if (type.equals(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID()) if (type.equals(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID())
|| type.equals(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID()) || type.equals(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID())
|| type.equals(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID()) || type.equals(ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID())
@ -2284,7 +2284,6 @@ class ReportGenerator {
/** /**
* Get the values for each row in the table report. * Get the values for each row in the table report.
* *
* @param columnHeaders The list of column headers that is used to find
* the value types of custom artifacts * the value types of custom artifacts
* @return A list of string representing the data for this artifact. * @return A list of string representing the data for this artifact.
*/ */
@ -2312,9 +2311,6 @@ class ReportGenerator {
* Get a list of Strings with all the row values for the Artifact in the * Get a list of Strings with all the row values for the Artifact in the
* correct order to be written to the report. * correct order to be written to the report.
* *
* @param columnHeaders The list of column headers that is used to find
* the value types of custom artifacts
*
* @return List<String> row values. Values could be null if attribute is * @return List<String> row values. Values could be null if attribute is
* not defined in artifact * not defined in artifact
* *

View File

@ -113,12 +113,12 @@ class ReportKML implements GeneralReportModule {
geoPath = ""; geoPath = "";
String extractedToPath; String extractedToPath;
for (BlackboardAttribute attribute : artifact.getAttributes()) { for (BlackboardAttribute attribute : artifact.getAttributes()) {
if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID()) //latitude if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID()) //latitude
{ {
lat = attribute.getValueDouble(); lat = attribute.getValueDouble();
} }
if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE.getTypeID()) //longitude if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE.getTypeID()) //longitude
{ {
lon = attribute.getValueDouble(); lon = attribute.getValueDouble();
} }
@ -150,11 +150,11 @@ class ReportKML implements GeneralReportModule {
lat = 0; lat = 0;
lon = 0; lon = 0;
for (BlackboardAttribute attribute : artifact.getAttributes()) { for (BlackboardAttribute attribute : artifact.getAttributes()) {
if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID()) //latitude if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE.getTypeID()) //latitude
{ {
lat = attribute.getValueDouble(); lat = attribute.getValueDouble();
} }
if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE.getTypeID()) //longitude if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE.getTypeID()) //longitude
{ {
lon = attribute.getValueDouble(); lon = attribute.getValueDouble();
} }
@ -172,22 +172,22 @@ class ReportKML implements GeneralReportModule {
String name = ""; String name = "";
String location = ""; String location = "";
for (BlackboardAttribute attribute : artifact.getAttributes()) { for (BlackboardAttribute attribute : artifact.getAttributes()) {
if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_START.getTypeID()) //latitude if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_START.getTypeID()) //latitude
{ {
lat = attribute.getValueDouble(); lat = attribute.getValueDouble();
} else if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_END.getTypeID()) //longitude } else if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LATITUDE_END.getTypeID()) //longitude
{ {
destlat = attribute.getValueDouble(); destlat = attribute.getValueDouble();
} else if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_START.getTypeID()) //longitude } else if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_START.getTypeID()) //longitude
{ {
lon = attribute.getValueDouble(); lon = attribute.getValueDouble();
} else if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_END.getTypeID()) //longitude } else if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_GEO_LONGITUDE_END.getTypeID()) //longitude
{ {
destlon = attribute.getValueDouble(); destlon = attribute.getValueDouble();
} else if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID()) //longitude } else if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_NAME.getTypeID()) //longitude
{ {
name = attribute.getValueString(); name = attribute.getValueString();
} else if (attribute.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_LOCATION.getTypeID()) //longitude } else if (attribute.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_LOCATION.getTypeID()) //longitude
{ {
location = attribute.getValueString(); location = attribute.getValueString();
} }

View File

@ -159,8 +159,7 @@ public interface ArtifactEventType extends EventType {
List<BlackboardAttribute> attributes = artf.getAttributes(); List<BlackboardAttribute> attributes = artf.getAttributes();
Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attrMap = new HashMap<>(); Map<BlackboardAttribute.ATTRIBUTE_TYPE, BlackboardAttribute> attrMap = new HashMap<>();
for (BlackboardAttribute attr : attributes) { for (BlackboardAttribute attr : attributes) {
attrMap.put(BlackboardAttribute.ATTRIBUTE_TYPE.fromLabel(attr. attrMap.put(BlackboardAttribute.ATTRIBUTE_TYPE.fromLabel(attr.getAttributeType().getTypeName()), attr);
getAttributeTypeName()), attr);
} }
if (attrMap.get(type.getDateTimeAttrubuteType()) == null) { if (attrMap.get(type.getDateTimeAttrubuteType()) == null) {