diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java index 635a8b0e37..c7226483ef 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java @@ -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 try { 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(); int assocArtifactIndex = -1; for (BlackboardArtifact art : artifacts) { diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ArtifactStringContent.java b/Core/src/org/sleuthkit/autopsy/datamodel/ArtifactStringContent.java index 502a7828a4..8ca442aef7 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ArtifactStringContent.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ArtifactStringContent.java @@ -72,19 +72,19 @@ public class ArtifactStringContent implements StringContent { // name column buffer.append(""); //NON-NLS - buffer.append(attr.getAttributeTypeDisplayName()); + buffer.append(attr.getAttributeType().getDisplayName()); buffer.append(""); //NON-NLS // value column buffer.append(""); //NON-NLS - if (attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID() - || attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID() - || attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID() - || attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_MODIFIED.getTypeID() - || attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_RCVD.getTypeID() - || attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_SENT.getTypeID() - || attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_START.getTypeID() - || attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_END.getTypeID()) { + if (attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID() + || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID() + || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID() + || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_MODIFIED.getTypeID() + || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_RCVD.getTypeID() + || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_SENT.getTypeID() + || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_START.getTypeID() + || attr.getAttributeType().getTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_END.getTypeID()) { long epoch = attr.getValueLong(); String time = "0000-00-00 00:00:00"; if (epoch != 0) { @@ -93,7 +93,7 @@ public class ArtifactStringContent implements StringContent { } buffer.append(time); } else { - switch (attr.getValueType()) { + switch (attr.getAttributeType().getValueType()) { case STRING: String str = attr.getValueString(); str = str.replaceAll(" ", " "); //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index 198baaf923..25c05ef7fd 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -117,7 +117,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode { if (artifact != null && artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { try { 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()); if (associatedArtifact != null) { displayName = associatedArtifact.getDisplayName() + " Artifact"; // NON-NLS @@ -384,7 +384,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode { String keyword = null; String regexp = null; for (BlackboardAttribute att : attributes) { - final int attributeTypeID = att.getAttributeTypeID(); + final int attributeTypeID = att.getAttributeType().getTypeID(); if (attributeTypeID == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) { keyword = att.getValueString(); } else if (attributeTypeID == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD_REGEXP.getTypeID()) { diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterNode.java b/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterNode.java index e4c34ebce9..52b1954188 100755 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterNode.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DataResultFilterNode.java @@ -271,8 +271,8 @@ public class DataResultFilterNode extends FilterNode { Content c = null; try { for (BlackboardAttribute attr : art.getAttributes()) { - if (attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID()) { - switch (attr.getValueType()) { + if (attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID()) { + switch (attr.getAttributeType().getValueType()) { case INTEGER: int i = attr.getValueInt(); if (i != -1) { diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java index cabc5cc3d4..57de4e760e 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/DirectoryTreeTopComponent.java @@ -865,7 +865,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat String setName = null; List attributes = art.getAttributes(); for (BlackboardAttribute att : attributes) { - int typeId = att.getAttributeTypeID(); + int typeId = att.getAttributeType().getTypeID(); if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) { setName = att.getValueString(); } @@ -882,7 +882,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat String keywordName = null; List attributes = art.getAttributes(); for (BlackboardAttribute att : attributes) { - int typeId = att.getAttributeTypeID(); + int typeId = att.getAttributeType().getTypeID(); if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) { listName = att.getValueString(); } else if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD.getTypeID()) { @@ -909,7 +909,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat String setName = null; List attributes = art.getAttributes(); for (BlackboardAttribute att : attributes) { - int typeId = att.getAttributeTypeID(); + int typeId = att.getAttributeType().getTypeID(); if (typeId == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.getTypeID()) { setName = att.getValueString(); } diff --git a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalAccountObj.java b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalAccountObj.java index eaec84d5d1..d2a6b19551 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalAccountObj.java +++ b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalAccountObj.java @@ -115,15 +115,15 @@ class EvalAccountObj extends EvaluatableObject { boolean foundSIDMatch = false; 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)) { 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)) { 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)) { foundSIDMatch = compareStringObject(winUserObj.getSecurityID(), attr.getValueString()); } diff --git a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalAddressObj.java b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalAddressObj.java index 2df8ffe93e..faaac1dc4e 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalAddressObj.java +++ b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalAddressObj.java @@ -117,7 +117,7 @@ class EvalAddressObj extends EvaluatableObject { for (BlackboardArtifact art : artList) { 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(), obj.getAddressValue().getApplyCondition(), attr.getValueString())) { finalHits.add(art); diff --git a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalDomainObj.java b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalDomainObj.java index 03a8041c1f..2dd6c7f680 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalDomainObj.java +++ b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalDomainObj.java @@ -80,7 +80,7 @@ class EvalDomainObj extends EvaluatableObject { for (BlackboardArtifact art : artList) { 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(); // Check whether the domain name is a substring of the URL (regardless diff --git a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalNetworkShareObj.java b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalNetworkShareObj.java index 98c0d9d95a..843f19c293 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalNetworkShareObj.java +++ b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalNetworkShareObj.java @@ -98,11 +98,11 @@ class EvalNetworkShareObj extends EvaluatableObject { boolean foundLocalPathMatch = false; 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)) { 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)) { foundLocalPathMatch = compareStringObject(obj.getLocalPath(), attr.getValueString()); } diff --git a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalURIObj.java b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalURIObj.java index d7ce6b8c7e..c5e598b034 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalURIObj.java +++ b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalURIObj.java @@ -108,7 +108,7 @@ class EvalURIObj extends EvaluatableObject { for (BlackboardArtifact art : artList) { 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(); if (modifiedAttrString != null) { diff --git a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalURLHistoryObj.java b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalURLHistoryObj.java index 416784dd81..f6a6b67075 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/stix/EvalURLHistoryObj.java +++ b/Core/src/org/sleuthkit/autopsy/modules/stix/EvalURLHistoryObj.java @@ -152,7 +152,7 @@ class EvalURLHistoryObj extends EvaluatableObject { boolean foundBrowserNameMatch = false; 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)) { if (entry.getURL().getValue() instanceof AnyURIObjectPropertyType) { 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 } } - if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID()) + if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DOMAIN.getTypeID()) && (haveHostname)) { foundHostnameMatch = compareStringObject(entry.getHostname().getHostnameValue(), attr.getValueString()); } - if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID()) + if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_REFERRER.getTypeID()) && (haveReferrer)) { if (entry.getReferrerURL().getValue() instanceof AnyURIObjectPropertyType) { 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 } } - if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE.getTypeID()) + if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TITLE.getTypeID()) && (havePageTitle)) { foundPageTitleMatch = compareStringObject(entry.getPageTitle(), attr.getValueString()); } - if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_USER_NAME.getTypeID()) + if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_USER_NAME.getTypeID()) && (haveUserProfile)) { foundUserProfileMatch = compareStringObject(entry.getUserProfileName(), attr.getValueString()); } - if ((attr.getAttributeTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID()) + if ((attr.getAttributeType().getTypeID() == BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PROG_NAME.getTypeID()) && (haveBrowserName)) { foundBrowserNameMatch = compareStringObject(obj.getBrowserInformation().getName(), null, null, attr.getValueString()); @@ -240,7 +240,7 @@ class EvalURLHistoryObj extends EvaluatableObject { boolean foundBrowserNameMatch = false; 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)) { foundBrowserNameMatch = compareStringObject(obj.getBrowserInformation().getName(), null, null, attr.getValueString()); diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java index e771289cfc..edd1ce5570 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java @@ -2146,7 +2146,7 @@ class ReportGenerator { } for (BlackboardAttribute tempatt : attList) { String value = ""; - Integer type = tempatt.getAttributeTypeID(); + Integer type = tempatt.getAttributeType().getTypeID(); if (type.equals(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID()) || type.equals(ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.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. * - * @param columnHeaders The list of column headers that is used to find * the value types of custom artifacts * @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 * 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 row values. Values could be null if attribute is * not defined in artifact * diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportKML.java b/Core/src/org/sleuthkit/autopsy/report/ReportKML.java index 117263bcd0..abdd7dee96 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportKML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportKML.java @@ -113,12 +113,12 @@ class ReportKML implements GeneralReportModule { geoPath = ""; String extractedToPath; 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(); } - 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(); } @@ -150,11 +150,11 @@ class ReportKML implements GeneralReportModule { lat = 0; lon = 0; 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(); } - 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(); } @@ -172,22 +172,22 @@ class ReportKML implements GeneralReportModule { String name = ""; String location = ""; 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(); - } 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(); - } 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(); - } 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(); - } 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(); - } 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(); } diff --git a/Core/src/org/sleuthkit/autopsy/timeline/datamodel/eventtype/ArtifactEventType.java b/Core/src/org/sleuthkit/autopsy/timeline/datamodel/eventtype/ArtifactEventType.java index d0029d305e..8467240937 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/datamodel/eventtype/ArtifactEventType.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/datamodel/eventtype/ArtifactEventType.java @@ -36,7 +36,7 @@ public interface ArtifactEventType extends EventType { /** * @return the Artifact type this event type is derived form, or null if - * there is no artifact type (eg file system events) + * there is no artifact type (eg file system events) */ public BlackboardArtifact.ARTIFACT_TYPE getArtifactType(); @@ -69,19 +69,19 @@ public interface ArtifactEventType extends EventType { /** * @return a function from an artifact and a map of its attributes, to a - * String to use as part of the full event description + * String to use as part of the full event description */ BiFunction, String> getFullExtractor(); /** * @return a function from an artifact and a map of its attributes, to a - * String to use as part of the medium event description + * String to use as part of the medium event description */ BiFunction, String> getMedExtractor(); /** * @return a function from an artifact and a map of its attributes, to a - * String to use as part of the short event description + * String to use as part of the short event description */ BiFunction, String> getShortExtractor(); @@ -135,13 +135,13 @@ public interface ArtifactEventType extends EventType { * {@link BlackboardAttribute}s to the event description. * * @param artf the {@link BlackboardArtifact} to derive the event - * description from + * description from * * @return an {@link AttributeEventDescription} derived from the given - * artifact, if the given artifact has no timestamp + * artifact, if the given artifact has no timestamp * * @throws TskCoreException is there is a problem accessing the blackboard - * data + * data */ static public AttributeEventDescription buildEventDescription(ArtifactEventType type, BlackboardArtifact artf) throws TskCoreException { //if we got passed an artifact that doesn't correspond to the type of the event, @@ -159,8 +159,7 @@ public interface ArtifactEventType extends EventType { List attributes = artf.getAttributes(); Map attrMap = new HashMap<>(); for (BlackboardAttribute attr : attributes) { - attrMap.put(BlackboardAttribute.ATTRIBUTE_TYPE.fromLabel(attr. - getAttributeTypeName()), attr); + attrMap.put(BlackboardAttribute.ATTRIBUTE_TYPE.fromLabel(attr.getAttributeType().getTypeName()), attr); } if (attrMap.get(type.getDateTimeAttrubuteType()) == null) {