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

Inherits org.sleuthkit.datamodel.SleuthkitVisitableItem.

Inherited by org.sleuthkit.datamodel.AbstractContent, org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.DataSource, and org.sleuthkit.datamodel.Report.

Public Member Functions

public< T > T accept (ContentVisitor< T > v)
 
void close ()
 
Score getAggregateScore () throws TskCoreException
 
List< AnalysisResultgetAllAnalysisResults () throws TskCoreException
 
ArrayList< BlackboardArtifactgetAllArtifacts () throws TskCoreException
 
long getAllArtifactsCount () throws TskCoreException
 
List< DataArtifactgetAllDataArtifacts () throws TskCoreException
 
List< AnalysisResultgetAnalysisResults (BlackboardArtifact.Type artifactType) throws TskCoreException
 
ArrayList< BlackboardArtifactgetArtifacts (String artifactTypeName) throws TskCoreException
 
ArrayList< BlackboardArtifactgetArtifacts (int artifactTypeID) throws TskCoreException
 
ArrayList< BlackboardArtifactgetArtifacts (BlackboardArtifact.ARTIFACT_TYPE type) throws TskCoreException
 
long getArtifactsCount (String artifactTypeName) throws TskCoreException
 
long getArtifactsCount (int artifactTypeID) throws TskCoreException
 
long getArtifactsCount (BlackboardArtifact.ARTIFACT_TYPE type) throws TskCoreException
 
List< ContentgetChildren () throws TskCoreException
 
int getChildrenCount () throws TskCoreException
 
List< Long > getChildrenIds () throws TskCoreException
 
Content getDataSource () throws TskCoreException
 
BlackboardArtifact getGenInfoArtifact () throws TskCoreException
 
BlackboardArtifact getGenInfoArtifact (boolean create) throws TskCoreException
 
ArrayList< BlackboardAttributegetGenInfoAttributes (BlackboardAttribute.ATTRIBUTE_TYPE attr_type) throws TskCoreException
 
Set< String > getHashSetNames () throws TskCoreException
 
long getId ()
 
String getName ()
 
Content getParent () throws TskCoreException
 
long getSize ()
 
String getUniquePath () throws TskCoreException
 
boolean hasChildren () throws TskCoreException
 
AnalysisResultAdded newAnalysisResult (BlackboardArtifact.Type artifactType, Score score, String conclusion, String configuration, String justification, Collection< BlackboardAttribute > attributesList) throws TskCoreException
 
AnalysisResultAdded newAnalysisResult (BlackboardArtifact.Type artifactType, Score score, String conclusion, String configuration, String justification, Collection< BlackboardAttribute > attributesList, long dataSourceId) throws TskCoreException
 
BlackboardArtifact newArtifact (int artifactTypeID) throws TskCoreException
 
BlackboardArtifact newArtifact (BlackboardArtifact.ARTIFACT_TYPE type) throws TskCoreException
 
DataArtifact newDataArtifact (BlackboardArtifact.Type artifactType, Collection< BlackboardAttribute > attributesList) throws TskCoreException
 
DataArtifact newDataArtifact (BlackboardArtifact.Type artifactType, Collection< BlackboardAttribute > attributesList, Long osAccountId) throws TskCoreException
 
DataArtifact newDataArtifact (BlackboardArtifact.Type artifactType, Collection< BlackboardAttribute > attributesList, Long osAccountId, long dataSourceId) throws TskCoreException
 
int read (byte[] buf, long offset, long len) throws TskCoreException
 
- Public Member Functions inherited from org.sleuthkit.datamodel.SleuthkitVisitableItem
public< T > T accept (SleuthkitItemVisitor< T > v)
 

Detailed Description

Interface for all datatypes that can be found in the database. Content objects make up a tree and each object can have a parent and children. For example, the child of an Image object is a Volume or File System. This interface defines the basic methods for reading the content associated with this object, the parent and children, and adding artifacts.

Definition at line 33 of file Content.java.

Member Function Documentation

public<T> T org.sleuthkit.datamodel.Content.accept ( ContentVisitor< T >  v)

Visitor pattern support

Parameters
vvisitor supplying an algorithm to run on the content object
Returns
visitor return value resulting from running the algorithm
Score org.sleuthkit.datamodel.Content.getAggregateScore ( ) throws TskCoreException

Returns the final score for the content object.

Returns
Score.
Exceptions
TskCoreExceptionif critical error occurred within tsk core.

Implemented in org.sleuthkit.datamodel.AbstractContent, org.sleuthkit.datamodel.BlackboardArtifact, and org.sleuthkit.datamodel.Report.

List<AnalysisResult> org.sleuthkit.datamodel.Content.getAllAnalysisResults ( ) throws TskCoreException

Get all analysis results associated with this content.

Returns
A list of analysis results.
Exceptions
TskCoreExceptionIf critical error occurred within tsk core.

Implemented in org.sleuthkit.datamodel.AbstractContent, org.sleuthkit.datamodel.BlackboardArtifact, and org.sleuthkit.datamodel.Report.

ArrayList<BlackboardArtifact> org.sleuthkit.datamodel.Content.getAllArtifacts ( ) throws TskCoreException

Get all artifacts associated with this content

Returns
a list of blackboard artifacts
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.AbstractContent, org.sleuthkit.datamodel.BlackboardArtifact, and org.sleuthkit.datamodel.Report.

long org.sleuthkit.datamodel.Content.getAllArtifactsCount ( ) throws TskCoreException

Get count of all artifacts associated with this content

Returns
count of all blackboard artifacts for this content
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

List<DataArtifact> org.sleuthkit.datamodel.Content.getAllDataArtifacts ( ) throws TskCoreException

Get all data artifacts associated with this content.

Returns
A list of data artifacts.
Exceptions
TskCoreExceptionIf critical error occurred within tsk core.

Implemented in org.sleuthkit.datamodel.AbstractContent, org.sleuthkit.datamodel.BlackboardArtifact, and org.sleuthkit.datamodel.Report.

List<AnalysisResult> org.sleuthkit.datamodel.Content.getAnalysisResults ( BlackboardArtifact.Type  artifactType) throws TskCoreException

Get all analysis results associated with this content, that have the given type.

Parameters
artifactTypeType to look up.
Returns
A list of analysis result artifacts matching the type.
Exceptions
TskCoreExceptionIf critical error occurred within tsk core.

Implemented in org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

ArrayList<BlackboardArtifact> org.sleuthkit.datamodel.Content.getArtifacts ( String  artifactTypeName) throws TskCoreException

Get all artifacts associated with this content that have the given type name

Parameters
artifactTypeNamename of the type to look up
Returns
a list of blackboard artifacts matching the type
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

ArrayList<BlackboardArtifact> org.sleuthkit.datamodel.Content.getArtifacts ( int  artifactTypeID) throws TskCoreException

Get all artifacts associated with this content that have the given type id

Parameters
artifactTypeIDtype id to look up
Returns
a list of blackboard artifacts matching the type
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

ArrayList<BlackboardArtifact> org.sleuthkit.datamodel.Content.getArtifacts ( BlackboardArtifact.ARTIFACT_TYPE  type) throws TskCoreException

Get all artifacts associated with this content that have the given type

Parameters
typetype to look up
Returns
a list of blackboard artifacts matching the type
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

long org.sleuthkit.datamodel.Content.getArtifactsCount ( String  artifactTypeName) throws TskCoreException

Get count of all artifacts associated with this content that have the given type name

Parameters
artifactTypeNamename of the type to look up
Returns
count of blackboard artifacts matching the type
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

long org.sleuthkit.datamodel.Content.getArtifactsCount ( int  artifactTypeID) throws TskCoreException

Get count of all artifacts associated with this content that have the given type id

Parameters
artifactTypeIDtype id to look up
Returns
count of blackboard artifacts matching the type
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

long org.sleuthkit.datamodel.Content.getArtifactsCount ( BlackboardArtifact.ARTIFACT_TYPE  type) throws TskCoreException

Get count of all artifacts associated with this content that have the given type

Parameters
typetype to look up
Returns
count of blackboard artifacts matching the type
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, and org.sleuthkit.datamodel.Report.

int org.sleuthkit.datamodel.Content.getChildrenCount ( ) throws TskCoreException

Returns count of children objects. Note, this should be more efficient than getting children and counting them.

Returns
children count
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.Report, and org.sleuthkit.datamodel.AbstractContent.

List<Long> org.sleuthkit.datamodel.Content.getChildrenIds ( ) throws TskCoreException
Content org.sleuthkit.datamodel.Content.getDataSource ( ) throws TskCoreException

Gets the root data source (image, virtual directory, etc.) of this content.

Returns
Content associated with data source or null if one can't be found
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractFile, org.sleuthkit.datamodel.FsContent, org.sleuthkit.datamodel.AbstractContent, org.sleuthkit.datamodel.Report, org.sleuthkit.datamodel.Image, and org.sleuthkit.datamodel.VirtualDirectory.

Referenced by org.sleuthkit.datamodel.Report.getDataSource(), and org.sleuthkit.datamodel.AbstractContent.getDataSource().

BlackboardArtifact org.sleuthkit.datamodel.Content.getGenInfoArtifact ( ) throws TskCoreException

Return the TSK_GEN_INFO artifact for the file so that individual attributes can be added to it. Creates one if it does not already exist.

Returns
Instance of the TSK_GEN_INFO artifact
Exceptions
TskCoreException

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

BlackboardArtifact org.sleuthkit.datamodel.Content.getGenInfoArtifact ( boolean  create) throws TskCoreException

Return the TSK_GEN_INFO artifact for the file so that individual attributes can be added to it. If one does not create, behavior depends on the create argument.

Parameters
createIf true, an artifact will be created if it does not already exist.
Returns
Instance of the TSK_GEN_INFO artifact or null if artifact does not already exist and create was set to false
Exceptions
TskCoreException

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

ArrayList<BlackboardAttribute> org.sleuthkit.datamodel.Content.getGenInfoAttributes ( BlackboardAttribute.ATTRIBUTE_TYPE  attr_type) throws TskCoreException

Return attributes of a given type from TSK_GEN_INFO.

Parameters
attr_typeAttribute type to find inside of the TSK_GEN_INFO artifact.
Returns
Attributes

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, and org.sleuthkit.datamodel.Report.

Set<String> org.sleuthkit.datamodel.Content.getHashSetNames ( ) throws TskCoreException

Get the names of all the hashsets that this content is in.

Returns
the names of the hashsets that this content is in
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

String org.sleuthkit.datamodel.Content.getName ( )

Get the name of this content object (does not include parent path)

Returns
the name

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.Report, and org.sleuthkit.datamodel.AbstractContent.

Referenced by org.sleuthkit.datamodel.ReadContentInputStream.read().

Content org.sleuthkit.datamodel.Content.getParent ( ) throws TskCoreException
Returns
returns the parent of this Content object or null if there isn't one as is the case for Image.
Exceptions
TskCoreException

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.Report, and org.sleuthkit.datamodel.AbstractContent.

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

long org.sleuthkit.datamodel.Content.getSize ( )
boolean org.sleuthkit.datamodel.Content.hasChildren ( ) throws TskCoreException

Returns true if the content object has children objects. Note, this should be more efficient than getting children and checking it empty.

Returns
true if has children, false otherwise.
Exceptions
TskCoreExceptionif critical error occurred within tsk core

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.Report, and org.sleuthkit.datamodel.AbstractContent.

AnalysisResultAdded org.sleuthkit.datamodel.Content.newAnalysisResult ( BlackboardArtifact.Type  artifactType,
Score  score,
String  conclusion,
String  configuration,
String  justification,
Collection< BlackboardAttribute attributesList 
) throws TskCoreException

Create and add an analysis result associated with this content.

Parameters
artifactTypeType of analysis result artifact to create.
scoreScore associated with this analysis.
conclusionConclusion from the analysis, may be empty.
configurationConfiguration element associated with this analysis, may be empty.
justificationJustification
attributesListAdditional attributes to attach to this analysis result artifact.
Returns
AnalysisResultAdded The analysis return added and the current aggregate score of content.
Exceptions
TskCoreExceptionif critical error occurred within tsk core.

Implemented in org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

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

AnalysisResultAdded org.sleuthkit.datamodel.Content.newAnalysisResult ( BlackboardArtifact.Type  artifactType,
Score  score,
String  conclusion,
String  configuration,
String  justification,
Collection< BlackboardAttribute attributesList,
long  dataSourceId 
) throws TskCoreException

Create and add an analysis result associated with this content.

Parameters
artifactTypeType of analysis result artifact to create.
scoreScore associated with this analysis.
conclusionConclusion from the analysis, may be empty.
configurationConfiguration element associated with this analysis, may be empty.
justificationJustification
attributesListAdditional attributes to attach to this analysis result artifact.
dataSourceIdThe data source for the analysis result
Returns
AnalysisResultAdded The analysis return added and the current aggregate score of content.
Exceptions
TskCoreExceptionif critical error occurred within tsk core.

Implemented in org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

BlackboardArtifact org.sleuthkit.datamodel.Content.newArtifact ( int  artifactTypeID) throws TskCoreException

Create and add an artifact associated with this content to the blackboard

Parameters
artifactTypeIDid of the artifact type (if the id doesn't already exist an exception will be thrown)
Returns
the blackboard artifact created (the artifact type id can be looked up from this)
Exceptions
TskCoreExceptionif critical error occurred within tsk core
Deprecated:
Please use newDataArtifact or newAnalysisResult.

Implemented in org.sleuthkit.datamodel.AbstractFile, org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

BlackboardArtifact org.sleuthkit.datamodel.Content.newArtifact ( BlackboardArtifact.ARTIFACT_TYPE  type) throws TskCoreException

Create and add an artifact associated with this content to the blackboard

Parameters
typeartifact enum tyoe
Returns
the blackboard artifact created (the artifact type id can be looked up from this)
Exceptions
TskCoreExceptionif critical error occurred within tsk core
Deprecated:
Please use newDataArtifact or newAnalysisResult.

Implemented in org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

DataArtifact org.sleuthkit.datamodel.Content.newDataArtifact ( BlackboardArtifact.Type  artifactType,
Collection< BlackboardAttribute attributesList 
) throws TskCoreException

Create and add a data artifact associated with this abstract file. This method creates the data artifact with the os account id associated with this abstract file if one exists.

Parameters
artifactTypeType of data artifact to create.
attributesListAdditional attributes to attach to this data artifact.
Returns
DataArtifact New data artifact.
Exceptions
TskCoreExceptionIf a critical error occurred within tsk core.

Implemented in org.sleuthkit.datamodel.AbstractFile, org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

Referenced by org.sleuthkit.datamodel.blackboardutils.GeoArtifactsHelper.addArea(), org.sleuthkit.datamodel.blackboardutils.CommunicationArtifactsHelper.addCalllog(), org.sleuthkit.datamodel.blackboardutils.CommunicationArtifactsHelper.addContact(), org.sleuthkit.datamodel.blackboardutils.ArtifactsHelper.addInstalledProgram(), org.sleuthkit.datamodel.blackboardutils.CommunicationArtifactsHelper.addMessage(), org.sleuthkit.datamodel.blackboardutils.GeoArtifactsHelper.addRoute(), org.sleuthkit.datamodel.blackboardutils.GeoArtifactsHelper.addTrack(), org.sleuthkit.datamodel.blackboardutils.WebBrowserArtifactsHelper.addWebBookmark(), org.sleuthkit.datamodel.blackboardutils.WebBrowserArtifactsHelper.addWebCookie(), org.sleuthkit.datamodel.blackboardutils.WebBrowserArtifactsHelper.addWebDownload(), org.sleuthkit.datamodel.blackboardutils.WebBrowserArtifactsHelper.addWebFormAddress(), org.sleuthkit.datamodel.blackboardutils.WebBrowserArtifactsHelper.addWebFormAutofill(), org.sleuthkit.datamodel.blackboardutils.WebBrowserArtifactsHelper.addWebHistory(), and org.sleuthkit.datamodel.SleuthkitCase.newBlackboardArtifact().

DataArtifact org.sleuthkit.datamodel.Content.newDataArtifact ( BlackboardArtifact.Type  artifactType,
Collection< BlackboardAttribute attributesList,
Long  osAccountId 
) throws TskCoreException

Create and add a data artifact associated with this content.

Parameters
artifactTypeType of analysis result artifact to create.
attributesListAdditional attributes to attach to this data artifact.
osAccountIdThe OS account id associated with the artifact. May be null.
Returns
DataArtifact New data artifact.
Exceptions
TskCoreExceptionIf a critical error occurred within tsk core.

Implemented in org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

DataArtifact org.sleuthkit.datamodel.Content.newDataArtifact ( BlackboardArtifact.Type  artifactType,
Collection< BlackboardAttribute attributesList,
Long  osAccountId,
long  dataSourceId 
) throws TskCoreException

Create and add a data artifact associated with this content.

Parameters
artifactTypeType of analysis result artifact to create.
attributesListAdditional attributes to attach to this data artifact.
osAccountIdThe OS account id associated with the artifact. May be null.
dataSourceIdThe data source id of the artifact
Returns
DataArtifact New data artifact.
Exceptions
TskCoreExceptionIf a critical error occurred within tsk core.

Implemented in org.sleuthkit.datamodel.AbstractContent, and org.sleuthkit.datamodel.Report.

int org.sleuthkit.datamodel.Content.read ( byte[]  buf,
long  offset,
long  len 
) throws TskCoreException

Reads data that this content object is associated with (file contents, volume contents, etc.).

Parameters
bufa character array of data (in bytes) to copy read data to
offsetbyte offset in the content to start reading from
lennumber of bytes to read into buf.
Returns
num of bytes read, or -1 on error
Exceptions
TskCoreExceptionif critical error occurred during read in the tsk core

Implemented in org.sleuthkit.datamodel.AbstractFile, org.sleuthkit.datamodel.BlackboardArtifact, org.sleuthkit.datamodel.OsAccount, org.sleuthkit.datamodel.Image, org.sleuthkit.datamodel.Report, org.sleuthkit.datamodel.HostAddress, org.sleuthkit.datamodel.FileSystem, org.sleuthkit.datamodel.Volume, org.sleuthkit.datamodel.VolumeSystem, org.sleuthkit.datamodel.Pool, and org.sleuthkit.datamodel.UnsupportedContent.

Referenced by org.sleuthkit.datamodel.ReadContentInputStream.read().


The documentation for this interface 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.