19 package org.sleuthkit.datamodel;
21 import java.util.logging.Level;
22 import java.util.logging.Logger;
29 class TimelineEventArtifactTypeSingleDescription
extends TimelineEventArtifactTypeImpl {
31 private static final Logger logger = Logger.getLogger(TimelineEventArtifactTypeSingleDescription.class.getName());
34 public TimelineEventDescriptionWithTime makeEventDescription(BlackboardArtifact artifact)
throws TskCoreException {
35 String description = extractFullDescription(artifact);
36 if (description.length() > MAX_FULL_DESCRIPTION_LENGTH) {
37 description = description.substring(0, MAX_FULL_DESCRIPTION_LENGTH);
39 BlackboardAttribute timeAttribute = artifact.getAttribute(getDateTimeAttributeType());
41 if (timeAttribute == null) {
45 long time = timeAttribute.getValueLong();
46 return new TimelineEventDescriptionWithTime(time, timeAttribute.getDisplayString(), null, description);
49 TimelineEventArtifactTypeSingleDescription(
int typeID, String displayName,
50 TimelineEventType superType, BlackboardArtifact.Type artifactType, BlackboardAttribute.Type timeAttribute, BlackboardAttribute.Type descriptionAttribute) {
51 super(typeID, displayName, superType, artifactType, timeAttribute,
52 new NullExtractor(),
new NullExtractor(),
new AttributeExtractor(descriptionAttribute));
55 TimelineEventDescription parseDescription(String fullDescription, String medDescription, String shortDescription) {
56 return new TimelineEventDescription(fullDescription);
64 final static class NullExtractor
implements TSKCoreCheckedFunction<BlackboardArtifact, String> {
67 public String apply(BlackboardArtifact ignored)
throws TskCoreException {