20 package org.sleuthkit.autopsy.communications.relationships;
 
   22 import java.util.TimeZone;
 
   23 import java.util.logging.Level;
 
   28 import static org.
sleuthkit.datamodel.BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME;
 
   36 final class RelationshipsNodeUtilities {
 
   38     private static final Logger logger = Logger.getLogger(RelationshipsNodeUtilities.class.getName());
 
   41     private RelationshipsNodeUtilities(){
 
   55     static String getAttributeDisplayString(
final BlackboardArtifact artifact, 
final BlackboardAttribute.ATTRIBUTE_TYPE attributeType) {
 
   57             BlackboardAttribute attribute = artifact.getAttribute(
new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.fromID(attributeType.getTypeID())));
 
   58             if (attribute == null) {
 
   60             } 
else if (attributeType.getValueType() == DATETIME) {
 
   61                 return TimeUtilities.epochToTime(attribute.getValueLong(),
 
   62                         TimeZone.getTimeZone(Utils.getUserPreferredZoneId()));
 
   64                 return attribute.getDisplayString();
 
   66         } 
catch (TskCoreException tskCoreException) {
 
   67             logger.log(Level.WARNING, 
"Error getting attribute value.", tskCoreException);