19 package org.sleuthkit.autopsy.communications.relationships;
 
   21 import java.util.HashSet;
 
   23 import java.util.logging.Level;
 
   59     public SelectionInfo(Set<AccountDeviceInstance> selectedNodes, Set<GraphEdge> selectedEdges,
 
   60             CommunicationsFilter communicationFilter) {
 
   65         accounts = 
new HashSet<>();
 
   66         selectedNodes.forEach((instance) -> {
 
   67             accounts.add(instance.getAccount());
 
  109     Set<Content> getRelationshipSources() throws TskCoreException {
 
  111         CommunicationsManager communicationManager;
 
  115             throw new TskCoreException(
"Failed to get current case", ex);
 
  118         Set<Content> relationshipSources = 
new HashSet<>();
 
  125                 relationshipSources.addAll(communicationManager.getRelationshipSources(edge.getStartNode(),
 
  128         } 
catch (TskCoreException ex) {
 
  129             logger.log(Level.SEVERE, 
"Failed to get relationships from case database.", ex); 
 
  132         return relationshipSources;
 
  136         if (accountArtifacts == null) {
 
  137             accountArtifacts = 
new HashSet<>();
 
  140                 final Set<Content> relationshipSources = getRelationshipSources();
 
  141                 relationshipSources.stream().filter((content) -> (content instanceof BlackboardArtifact)).forEachOrdered((content) -> {
 
  142                     accountArtifacts.add((BlackboardArtifact) content);
 
  144             } 
catch (TskCoreException ex) {
 
  145                 logger.log(Level.SEVERE, 
"Failed to load relationship sources.", ex); 
 
  154         if (summary == null) {
 
  155             summary = 
new SelectionSummary();
 
  161     final class SelectionSummary {
 
  174         private void getCounts() {
 
  176                 BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
 
  177                 if (null != fromID) {
 
  196                     attachmentCnt += artifact.getChildrenCount();
 
  197                     for (Content childContent : artifact.getChildren()) {
 
  198                         if (ImageUtils.thumbnailSupported(childContent)) {
 
  202                 } 
catch (TskCoreException ex) {
 
  203                     logger.log(Level.WARNING, String.format(
"Exception thrown " 
  204                             + 
"from getChildrenCount artifactID: %d",
 
  205                             artifact.getArtifactID()), ex); 
 
  210         public int getAttachmentCnt() {
 
  211             return attachmentCnt;
 
  214         public int getMessagesCnt() {
 
  218         public int getEmailCnt() {
 
  222         public int getCallLogCnt() {
 
  226         public int getContactsCnt() {
 
  230         public int getThumbnailCnt() {
 
  240         AccountDeviceInstance startNode;
 
  241         AccountDeviceInstance endNode;
 
  243         public GraphEdge(AccountDeviceInstance startNode, AccountDeviceInstance endNode) {
 
  244             this.startNode = startNode;
 
  245             this.endNode = endNode;
 
Set< AccountDeviceInstance > getSelectedNodes()
 
final Set< AccountDeviceInstance > selectedNodes
 
AccountDeviceInstance getEndNode()
 
SelectionInfo(Set< AccountDeviceInstance > selectedNodes, Set< GraphEdge > selectedEdges, CommunicationsFilter communicationFilter)
 
Set< BlackboardArtifact > accountArtifacts
 
final Set< Account > accounts
 
GraphEdge(AccountDeviceInstance startNode, AccountDeviceInstance endNode)
 
SelectionSummary getSummary()
 
SleuthkitCase getSleuthkitCase()
 
final Set< GraphEdge > selectedEdges
 
final CommunicationsFilter communicationFilter
 
static final Logger logger
 
synchronized static Logger getLogger(String name)
 
static Case getCurrentCaseThrows()
 
Set< BlackboardArtifact > getArtifacts()
 
AccountDeviceInstance getStartNode()
 
Set< GraphEdge > getSelectedEdges()
 
CommunicationsFilter getCommunicationsFilter()
 
Set< Account > getAccounts()