mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Modified based on review comments
This commit is contained in:
parent
5a857c6957
commit
94a701e131
@ -72,6 +72,8 @@ final class RelationshipsNodeUtilities {
|
|||||||
/**
|
/**
|
||||||
* Normalize the phone number by removing all non numeric characters, except
|
* Normalize the phone number by removing all non numeric characters, except
|
||||||
* for leading +.
|
* for leading +.
|
||||||
|
*
|
||||||
|
* This function copied from CommunicationManager.
|
||||||
*
|
*
|
||||||
* @param phoneNum The phone number to normalize
|
* @param phoneNum The phone number to normalize
|
||||||
*
|
*
|
||||||
@ -94,6 +96,8 @@ final class RelationshipsNodeUtilities {
|
|||||||
/**
|
/**
|
||||||
* Normalize the given email address by converting it to lowercase.
|
* Normalize the given email address by converting it to lowercase.
|
||||||
*
|
*
|
||||||
|
* This function copied from CommunicationManager.
|
||||||
|
*
|
||||||
* @param emailAddress The email address tot normalize
|
* @param emailAddress The email address tot normalize
|
||||||
*
|
*
|
||||||
* @return The normalized email address.
|
* @return The normalized email address.
|
||||||
|
@ -1,7 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* To change this license header, choose License Headers in Project Properties.
|
* Autopsy Forensic Browser
|
||||||
* To change this template file, choose Tools | Templates
|
*
|
||||||
* and open the template in the editor.
|
* Copyright 2019 Basis Technology Corp.
|
||||||
|
* Contact: carrier <at> sleuthkit <dot> org
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.communications.relationships;
|
package org.sleuthkit.autopsy.communications.relationships;
|
||||||
|
|
||||||
@ -15,6 +28,10 @@ import org.sleuthkit.datamodel.BlackboardAttribute;
|
|||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.sleuthkit.datamodel.TskCoreException;
|
import org.sleuthkit.datamodel.TskCoreException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Class representing the Summary data for a given account.
|
||||||
|
*/
|
||||||
class SelectionSummary {
|
class SelectionSummary {
|
||||||
|
|
||||||
private int attachmentCnt;
|
private int attachmentCnt;
|
||||||
@ -30,12 +47,21 @@ class SelectionSummary {
|
|||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(SelectionSummary.class.getName());
|
private static final Logger logger = Logger.getLogger(SelectionSummary.class.getName());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Summary constructor.
|
||||||
|
*
|
||||||
|
* @param selectedAccount Selected account object
|
||||||
|
* @param artifacts List of relationship source artifacts
|
||||||
|
*/
|
||||||
SelectionSummary(Account selectedAccount, Set<BlackboardArtifact> artifacts) {
|
SelectionSummary(Account selectedAccount, Set<BlackboardArtifact> artifacts) {
|
||||||
this.selectedAccount = selectedAccount;
|
this.selectedAccount = selectedAccount;
|
||||||
this.artifacts = artifacts;
|
this.artifacts = artifacts;
|
||||||
initCounts();
|
initCounts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the counts based on the selected account and the given artifacts.
|
||||||
|
*/
|
||||||
private void initCounts() {
|
private void initCounts() {
|
||||||
for (BlackboardArtifact artifact : artifacts) {
|
for (BlackboardArtifact artifact : artifacts) {
|
||||||
BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
|
BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
|
||||||
@ -89,30 +115,65 @@ class SelectionSummary {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total number of attachments that this account is referenced.
|
||||||
|
*
|
||||||
|
* @return Attachment count
|
||||||
|
*/
|
||||||
public int getAttachmentCnt() {
|
public int getAttachmentCnt() {
|
||||||
return attachmentCnt;
|
return attachmentCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total number of messages that this account is referenced.
|
||||||
|
*
|
||||||
|
* @return Message count
|
||||||
|
*/
|
||||||
public int getMessagesCnt() {
|
public int getMessagesCnt() {
|
||||||
return messagesCnt;
|
return messagesCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total number of Emails that this account is referenced.
|
||||||
|
*
|
||||||
|
* @return Email count
|
||||||
|
*/
|
||||||
public int getEmailCnt() {
|
public int getEmailCnt() {
|
||||||
return emailCnt;
|
return emailCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total number of call logs that this account is referenced.
|
||||||
|
*
|
||||||
|
* @return call log count
|
||||||
|
*/
|
||||||
public int getCallLogCnt() {
|
public int getCallLogCnt() {
|
||||||
return callLogCnt;
|
return callLogCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total number of contacts in this accounts contact book.
|
||||||
|
*
|
||||||
|
* @return contact count
|
||||||
|
*/
|
||||||
public int getContactsCnt() {
|
public int getContactsCnt() {
|
||||||
return contactsCnt;
|
return contactsCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total number of thumbnail\media attachments that this account is referenced.
|
||||||
|
*
|
||||||
|
* @return Thumbnail count
|
||||||
|
*/
|
||||||
public int getThumbnailCnt() {
|
public int getThumbnailCnt() {
|
||||||
return mediaCnt;
|
return mediaCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Total number of contacts that this account is referenced.
|
||||||
|
*
|
||||||
|
* @return Contact count
|
||||||
|
*/
|
||||||
public int getReferenceCnt() {
|
public int getReferenceCnt() {
|
||||||
return referenceCnt;
|
return referenceCnt;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user