Sleuth Kit Java Bindings (JNI)  4.11.0
Java bindings for using The Sleuth Kit
org.sleuthkit.datamodel.TaggingManager Class Reference

Classes

class  BlackboardArtifactTagChange
 
class  ContentTagChange
 

Public Member Functions

BlackboardArtifactTagChange addArtifactTag (BlackboardArtifact artifact, TagName tagName, String comment) throws TskCoreException
 
ContentTagChange addContentTag (Content content, TagName tagName, String comment, long beginByteOffset, long endByteOffset) throws TskCoreException
 
TagName addOrUpdateTagName (String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown knownStatus) throws TskCoreException
 
TagSet addTagSet (String name, List< TagName > tagNames) throws TskCoreException
 
void deleteTagSet (TagSet tagSet) throws TskCoreException
 
TagName getTagName (long id) throws TskCoreException
 
TagSet getTagSet (TagName tagName) throws TskCoreException
 
TagSet getTagSet (long id) throws TskCoreException
 
List< TagSetgetTagSets () throws TskCoreException
 

Detailed Description

Provides an API to manage Tags.

Definition at line 41 of file TaggingManager.java.

Member Function Documentation

BlackboardArtifactTagChange org.sleuthkit.datamodel.TaggingManager.addArtifactTag ( BlackboardArtifact  artifact,
TagName  tagName,
String  comment 
) throws TskCoreException
ContentTagChange org.sleuthkit.datamodel.TaggingManager.addContentTag ( Content  content,
TagName  tagName,
String  comment,
long  beginByteOffset,
long  endByteOffset 
) throws TskCoreException

Inserts a row into the content_tags table in the case database.

Parameters
contentThe content to tag.
tagNameThe name to use for the tag.
commentA comment to store with the tag.
beginByteOffsetDesignates the beginning of a tagged section.
endByteOffsetDesignates the end of a tagged section.
Returns
A ContentTag data transfer object (DTO) for the new row.
Exceptions
TskCoreException

Definition at line 442 of file TaggingManager.java.

References org.sleuthkit.datamodel.SleuthkitCase.beginTransaction(), org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.commit(), org.sleuthkit.datamodel.TagName.HTML_COLOR.getColorByName(), org.sleuthkit.datamodel.SleuthkitCase.getCurrentExaminer(), org.sleuthkit.datamodel.SleuthkitCase.getDatabaseType(), org.sleuthkit.datamodel.Tag.getId(), org.sleuthkit.datamodel.SleuthkitCase.getScoringManager(), org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.rollback(), and org.sleuthkit.datamodel.TskData.FileKnown.valueOf().

Referenced by org.sleuthkit.datamodel.SleuthkitCase.addContentTag().

TagName org.sleuthkit.datamodel.TaggingManager.addOrUpdateTagName ( String  displayName,
String  description,
TagName.HTML_COLOR  color,
TskData.FileKnown  knownStatus 
) throws TskCoreException

Inserts row into the tags_names table, or updates the existing row if the displayName already exists in the tag_names table in the case database.

Parameters
displayNameThe display name for the new tag name.
descriptionThe description for the new tag name.
colorThe HTML color to associate with the new tag name.
knownStatusThe TskData.FileKnown value to associate with the new tag name.
Returns
A TagName data transfer object (DTO) for the new row.
Exceptions
TskCoreException

Definition at line 540 of file TaggingManager.java.

References org.sleuthkit.datamodel.SleuthkitCase.acquireSingleUserCaseWriteLock(), and org.sleuthkit.datamodel.SleuthkitCase.releaseSingleUserCaseWriteLock().

Referenced by org.sleuthkit.datamodel.SleuthkitCase.addOrUpdateTagName().

void org.sleuthkit.datamodel.TaggingManager.deleteTagSet ( TagSet  tagSet) throws TskCoreException

Remove a row from the tag set table. If the given TagSet has a valid list of TagNames the TagNames will be removed from the tag_name table if there are not references to the TagNames in the content_tag or blackboard_artifact_tag table.

Parameters
tagSetTagSet to be deleted.
Exceptions
TskCoreException

Definition at line 152 of file TaggingManager.java.

References org.sleuthkit.datamodel.SleuthkitCase.beginTransaction(), org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.commit(), and org.sleuthkit.datamodel.SleuthkitCase.CaseDbTransaction.rollback().

TagName org.sleuthkit.datamodel.TaggingManager.getTagName ( long  id) throws TskCoreException
TagSet org.sleuthkit.datamodel.TaggingManager.getTagSet ( TagName  tagName) throws TskCoreException

Gets the tag set a tag name (tag definition) belongs to, if any.

Parameters
tagNameThe tag name.
Returns
A TagSet object or null.
Exceptions
TskCoreExceptionIf there is an error querying the case database.

Definition at line 192 of file TaggingManager.java.

References org.sleuthkit.datamodel.SleuthkitCase.acquireSingleUserCaseReadLock(), and org.sleuthkit.datamodel.SleuthkitCase.releaseSingleUserCaseReadLock().

TagSet org.sleuthkit.datamodel.TaggingManager.getTagSet ( long  id) throws TskCoreException

Return a TagSet object for the given id.

Parameters
idTagSet id.
Returns
The TagSet represented by the given it, or null if one was not found.
Exceptions
TskCoreException

Definition at line 228 of file TaggingManager.java.

References org.sleuthkit.datamodel.SleuthkitCase.acquireSingleUserCaseReadLock(), and org.sleuthkit.datamodel.SleuthkitCase.releaseSingleUserCaseReadLock().

List<TagSet> org.sleuthkit.datamodel.TaggingManager.getTagSets ( ) throws TskCoreException

Returns a list of all the TagSets that exist in the case.

Returns
A List of TagSet objects or an empty list if none were found.
Exceptions
TskCoreException

Definition at line 61 of file TaggingManager.java.

References org.sleuthkit.datamodel.SleuthkitCase.acquireSingleUserCaseReadLock(), and org.sleuthkit.datamodel.SleuthkitCase.releaseSingleUserCaseReadLock().


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

Copyright © 2011-2021 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.