19 package org.sleuthkit.autopsy.timeline.datamodel.eventtype;
21 import java.text.MessageFormat;
22 import java.util.Optional;
23 import java.util.function.Function;
24 import java.util.logging.Level;
25 import org.apache.commons.lang3.StringUtils;
80 String medDescription = shortDescription +
" : " +
getMedExtractor().apply(artf);
81 String fullDescription = medDescription +
" : " +
getFullExtractor().apply(artf);
135 String medDescription,
136 String fullDescription) {
162 if (type.getArtifactTypeID() != artf.getArtifactTypeID()) {
163 throw new IllegalArgumentException();
165 if (artf.getAttribute(type.getDateTimeAttributeType()) == null) {
166 LOGGER.log(Level.WARNING,
"Artifact {0} has no date/time attribute, skipping it.", artf.getArtifactID());
170 return type.parseAttributesHelper(artf);
178 .map(StringUtils::defaultString)
202 LOGGER.log(Level.SEVERE, MessageFormat.format(
"Error getting attribute from artifact {0}.", artf.
getArtifactID()), ex);
Function< BlackboardArtifact, String > getShortExtractor()
final String shortDescription
Function< BlackboardArtifact, String > getMedExtractor()
final String fullDescription
default AttributeEventDescription parseAttributesHelper(BlackboardArtifact artf)
String getDisplayString()
String getFullDescription()
BlackboardAttribute getAttribute(BlackboardAttribute.Type attributeType)
Function< BlackboardArtifact, String > getFullExtractor()
final String medDescription
default int getArtifactTypeID()
AttributeEventDescription(long time, String shortDescription, String medDescription, String fullDescription)
synchronized static Logger getLogger(String name)
BlackboardArtifact.Type getArtifactType()
String getMedDescription()
static BlackboardAttribute getAttributeSafe(BlackboardArtifact artf, BlackboardAttribute.Type attrType)
static final Logger LOGGER
static AttributeEventDescription buildEventDescription(ArtifactEventType type, BlackboardArtifact artf)
BlackboardAttribute.Type getDateTimeAttributeType()
String getShortDescription()