19 package org.sleuthkit.autopsy.discovery.ui;
 
   21 import java.util.logging.Level;
 
   22 import org.openide.nodes.Node;
 
   34 final class ContentViewerDetailsPanel 
extends AbstractArtifactDetailsPanel {
 
   36     private static final long serialVersionUID = 1L;
 
   37     private final DataContentPanel contentViewer = DataContentPanel.createInstance();
 
   38     private final static Logger logger = Logger.getLogger(ContentViewerDetailsPanel.class.getName());
 
   43     @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
 
   44     ContentViewerDetailsPanel() {
 
   54     @SuppressWarnings(
"unchecked")
 
   56     private 
void initComponents() {
 
   58         setPreferredSize(
new java.awt.Dimension(300, 0));
 
   59         setLayout(
new java.awt.BorderLayout());
 
   62     @ThreadConfined(type = ThreadConfined.ThreadType.AWT)
 
   64     public void setArtifact(BlackboardArtifact artifact) {
 
   65         Node node = Node.EMPTY;
 
   66         if (artifact != null) {
 
   67             boolean useAssociatedFile = artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID()
 
   68                     || artifact.getArtifactTypeID() == BlackboardArtifact.ARTIFACT_TYPE.TSK_WEB_CACHE.getTypeID();
 
   69             BlackboardAttribute pathIdAttr = null;
 
   70             if (useAssociatedFile) {
 
   72                     pathIdAttr = artifact.getAttribute(
new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH_ID));
 
   73                 } 
catch (TskCoreException ex) {
 
   74                     logger.log(Level.WARNING, 
"Error getting Path ID Attribute for artifact with ID: " + artifact.getArtifactID(), ex);
 
   77             if (!useAssociatedFile || pathIdAttr != null) {
 
   78                 node = 
new BlackboardArtifactNode(artifact, useAssociatedFile);
 
   81         contentViewer.setNode(node);