Autopsy  4.11.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer Class Reference

Inherits JPanel, and org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer.

Public Member Functions

 AnnotationsContentViewer ()
 
DataContentViewer createInstance ()
 
Component getComponent ()
 
String getTitle ()
 
String getToolTip ()
 
int isPreferred (Node node)
 
boolean isSupported (Node node)
 
void resetComponent ()
 
void setNode (Node node)
 

Private Member Functions

void addCentralRepositoryEntry (StringBuilder html, CorrelationAttributeInstance attributeInstance)
 
void addMessage (StringBuilder html, String message)
 
void addRow (StringBuilder html, String key, String value)
 
void addTagEntry (StringBuilder html, Tag tag)
 
void endSection (StringBuilder html)
 
void endTable (StringBuilder html)
 
String formatHtmlString (String text)
 
void initComponents ()
 
void populateCentralRepositoryData (StringBuilder html, BlackboardArtifact artifact, AbstractFile sourceFile)
 
void populateTagData (StringBuilder html, Content content)
 
void populateTagData (StringBuilder html, BlackboardArtifact artifact, Content sourceFile)
 
void setText (String text)
 
void startSection (StringBuilder html, String sectionName)
 
void startTable (StringBuilder html)
 

Private Attributes

javax.swing.JScrollPane jScrollPane5
 
javax.swing.JTextPane jTextPane1
 

Static Private Attributes

static final Logger logger = Logger.getLogger(AnnotationsContentViewer.class.getName())
 

Detailed Description

Annotations view of file contents.

Definition at line 59 of file AnnotationsContentViewer.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.AnnotationsContentViewer ( )

Member Function Documentation

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.addCentralRepositoryEntry ( StringBuilder  html,
CorrelationAttributeInstance  attributeInstance 
)
private
void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.addMessage ( StringBuilder  html,
String  message 
)
private

Add a message.

Parameters
htmlThe HTML text to add the message to.
messageThe message text.

Definition at line 276 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.addRow ( StringBuilder  html,
String  key,
String  value 
)
private

Add a data row to a table.

Parameters
htmlThe HTML text to add the row to.
keyThe key for the left column of the data row.
valueThe value for the right column of the data row.

Definition at line 340 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.addTagEntry ( StringBuilder  html,
Tag  tag 
)
private

Add a data table containing information about a tag.

Parameters
htmlThe HTML text to add the table to.
tagThe tag whose information will be used to populate the table.

Definition at line 293 of file AnnotationsContentViewer.java.

DataContentViewer org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.createInstance ( )

Create and return a new instance of your viewer. The reason that this is needed is because the specific viewer modules will be found via NetBeans Lookup and the type will only be DataContentViewer. This method is used to get an instance of your specific type.

Returns
A new instance of the viewer

Implements org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer.

Definition at line 426 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.endSection ( StringBuilder  html)
private

End a data section.

Parameters
htmlThe HTML text on which to end a section.

Definition at line 362 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.endTable ( StringBuilder  html)
private

End a data table.

Parameters
htmlThe HTML text on which to end a table.

Definition at line 353 of file AnnotationsContentViewer.java.

String org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.formatHtmlString ( String  text)
private

Apply escape sequence to special characters. Line feed and carriage return character combinations will be converted to HTML line breaks.

Parameters
textThe text to format.
Returns
The formatted text.

Definition at line 374 of file AnnotationsContentViewer.java.

Component org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.getComponent ( )

Return the Swing Component to display. Implementations of this method that extend JPanel and do a 'return this;'. Otherwise return an internal instance of the JPanel.

Returns
the component which is displayed for this viewer

Implements org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer.

Definition at line 459 of file AnnotationsContentViewer.java.

String org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.getTitle ( )

Returns the title of this viewer to display in the tab.

Returns
the title of DataContentViewer

Implements org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer.

Definition at line 416 of file AnnotationsContentViewer.java.

String org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.getToolTip ( )

Returns a short description of this viewer to use as a tool tip for its tab.

Returns
the tooltip for this TextViewer

Implements org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer.

Definition at line 421 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.initComponents ( )
private

This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.

Definition at line 386 of file AnnotationsContentViewer.java.

int org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.isPreferred ( Node  node)

Checks whether the given viewer is preferred for the Node. This is a bit subjective, but the idea is that Autopsy wants to display the most relevant tab. The more generic the viewer, the lower the return value should be. This will only be called on viewers that support the given node (i.e., isSupported() has already returned true).

The following are some examples of the current levels in use. If the selected node is an artifact, the level may be determined by both the artifact and its associated file.

Level 7 - Based on the artifact, if any, in the selected node and specific to an artifact type or types. Current content viewers that can return level 7 are the Messages tab (only supported for email and SMS) and the Text tab when the selected node is a Keyword Search hit.

Level 6 - Based on the artifact, if any, in the selected node but not restricted to particular types. The current content viewer that can return level 6 is the Results tab. It returns this level for most artifact types, unless the associated file is assumed to be of greater interest (for example, a Hash Set Hit will not be level 6 because the file itself is of greater interest).

Level 5 - Based on the file in the selected node and very specific to the file type. The current content viewer that will return level 5 is the Application tab, which supports media files (such as images) and certain types of databases.

Level 4 - Based on the file in the selected node but fairly general. Currently this is the level returned by the Text tab if Keyword Search has been run (unless the node is a Keyword Search hit or a Credit Card account). This is the default tab for most files.

Level 3 - Based on the artifact, if any, in the selected node where the artifact is thought to be of less interest than the associated file. This level is returned by the Results tab for artifacts like Hash Set Hits.

Level 1 - Very general and should always be available. The Hex, Text, and Metadata tabs are all this level

Level 0 - For cases where the content viewer should never be displayed by default.

Parameters
nodeNode to check for preference
Returns
an int (0-10) higher return means the viewer has higher priority

Implements org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer.

Definition at line 454 of file AnnotationsContentViewer.java.

boolean org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.isSupported ( Node  node)

Checks whether the given node is supported by the viewer. This will be used to enable or disable the tab for the viewer.

Parameters
nodeNode to check for support
Returns
True if the node can be displayed / processed, else false

Implements org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer.

Definition at line 431 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.populateCentralRepositoryData ( StringBuilder  html,
BlackboardArtifact  artifact,
AbstractFile  sourceFile 
)
private
void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.populateTagData ( StringBuilder  html,
Content  content 
)
private

Populate the "Selected Item" sections with tag data for the supplied content.

Parameters
htmlThe HTML text to update.
contentSelected content.

Definition at line 125 of file AnnotationsContentViewer.java.

References org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), and org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase().

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.populateTagData ( StringBuilder  html,
BlackboardArtifact  artifact,
Content  sourceFile 
)
private

Populate the "Selected Item" and "Source File" sections with tag data for a supplied artifact.

Parameters
htmlThe HTML text to update.
artifactA selected artifact.
sourceFileThe source content of the selected artifact.

Definition at line 154 of file AnnotationsContentViewer.java.

References org.sleuthkit.autopsy.casemodule.Case.getCurrentCaseThrows(), and org.sleuthkit.autopsy.casemodule.Case.getSleuthkitCase().

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.resetComponent ( )

Resets the contents of the viewer / component.

Implements org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer.

Definition at line 464 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.setNode ( Node  selectedNode)

Autopsy will call this when this panel is focused with the file that should be analyzed. When called with null, must clear all references to previous nodes.

Parameters
selectedNodethe node which is used to determine what is displayed in this viewer

Implements org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer.

Definition at line 72 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.setText ( String  text)
private

Set the text of the text panel.

Parameters
textThe text to set to the text panel.

Definition at line 254 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.startSection ( StringBuilder  html,
String  sectionName 
)
private

Start a new data section.

Parameters
htmlThe HTML text to add the section to.
sectionNameThe name of the section.

Definition at line 264 of file AnnotationsContentViewer.java.

void org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.startTable ( StringBuilder  html)
private

Start a data table.

Parameters
htmlThe HTML text to add the table to.

Definition at line 329 of file AnnotationsContentViewer.java.

Member Data Documentation

javax.swing.JScrollPane org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.jScrollPane5
private

Definition at line 411 of file AnnotationsContentViewer.java.

javax.swing.JTextPane org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.jTextPane1
private

Definition at line 412 of file AnnotationsContentViewer.java.

final Logger org.sleuthkit.autopsy.contentviewers.AnnotationsContentViewer.logger = Logger.getLogger(AnnotationsContentViewer.class.getName())
staticprivate

Definition at line 61 of file AnnotationsContentViewer.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2018 Basis Technology. Generated on: Fri Jun 21 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.