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 BlackboardAttribute timeAttribute = artifact.getAttribute(getDateTimeAttributeType());
38 if (timeAttribute == null) {
39 logger.log(Level.WARNING,
"Artifact {0} has no date/time attribute, skipping it.", artifact.toString());
43 long time = timeAttribute.getValueLong();
44 return new TimelineEventDescriptionWithTime(time, null, null, description);
47 TimelineEventArtifactTypeSingleDescription(
int typeID, String displayName,
48 TimelineEventType superType, BlackboardArtifact.Type artifactType, BlackboardAttribute.Type timeAttribute, BlackboardAttribute.Type descriptionAttribute) {
49 super(typeID, displayName, superType, artifactType, timeAttribute,
50 new NullExtractor(),
new NullExtractor(),
new AttributeExtractor(descriptionAttribute));
53 TimelineEventDescription parseDescription(String fullDescription, String medDescription, String shortDescription) {
54 return new TimelineEventDescription(fullDescription);
62 final static class NullExtractor
implements TSKCoreCheckedFunction<BlackboardArtifact, String> {
65 public String apply(BlackboardArtifact ignored)
throws TskCoreException {