19 package org.sleuthkit.autopsy.communications.relationships;
 
   21 import java.util.List;
 
   23 import java.util.logging.Level;
 
   24 import org.openide.nodes.ChildFactory;
 
   25 import org.openide.nodes.Node;
 
   30 import static org.
sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_CONTACT;
 
   38 final class ContactsChildNodeFactory 
extends ChildFactory<BlackboardArtifact>{
 
   39     private static final Logger logger = Logger.getLogger(ContactsChildNodeFactory.class.getName());
 
   41     private SelectionInfo selectionInfo;
 
   49     ContactsChildNodeFactory(SelectionInfo selectionInfo) {
 
   50         this.selectionInfo = selectionInfo;    
 
   58     public void refresh(SelectionInfo selectionInfo) {
 
   59         this.selectionInfo = selectionInfo;
 
   70     protected boolean createKeys(List<BlackboardArtifact> list) {
 
   72         if(selectionInfo == null) {
 
   76         final Set<Content> relationshipSources;
 
   78             relationshipSources = selectionInfo.getRelationshipSources();
 
   79         } 
catch (TskCoreException ex) {
 
   80             logger.log(Level.SEVERE, 
"Failed to load relationship sources.", ex); 
 
   84         relationshipSources.stream().filter((content) -> (content instanceof BlackboardArtifact)).forEachOrdered((content) -> {
 
   86             BlackboardArtifact bba = (BlackboardArtifact) content;
 
   87             BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(bba.getArtifactTypeID());
 
   89             if (fromID == TSK_CONTACT) {
 
   98     protected Node createNodeForKey(BlackboardArtifact key) {
 
   99         return new ContactNode(key);