Sleuth Kit Java Bindings (JNI)  4.9.0
Java bindings for using The Sleuth Kit
org.sleuthkit.datamodel.AbstractContent Class Referenceabstract

Inherits org.sleuthkit.datamodel.Content.

Inherited by org.sleuthkit.datamodel.AbstractFile, org.sleuthkit.datamodel.FileSystem, org.sleuthkit.datamodel.Image, org.sleuthkit.datamodel.Pool, org.sleuthkit.datamodel.Volume, and org.sleuthkit.datamodel.VolumeSystem.

Public Member Functions

boolean equals (Object obj)
 
ArrayList< BlackboardArtifactgetAllArtifacts () throws TskCoreException
 
long getAllArtifactsCount () 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 (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 (ATTRIBUTE_TYPE attr_type) throws TskCoreException
 
Set< String > getHashSetNames () throws TskCoreException
 
long getId ()
 
String getName ()
 
synchronized Content getParent () throws TskCoreException
 
SleuthkitCase getSleuthkitCase ()
 
synchronized String getUniquePath () throws TskCoreException
 
boolean hasChildren () throws TskCoreException
 
int hashCode ()
 
BlackboardArtifact newArtifact (int artifactTypeID) throws TskCoreException
 
BlackboardArtifact newArtifact (BlackboardArtifact.ARTIFACT_TYPE type) throws TskCoreException
 
String toString ()
 
String toString (boolean preserveState)
 
- Public Member Functions inherited from org.sleuthkit.datamodel.Content
public< T > T accept (ContentVisitor< T > v)
 
void close ()
 
long getArtifactsCount (BlackboardArtifact.ARTIFACT_TYPE type) throws TskCoreException
 
ArrayList< BlackboardAttributegetGenInfoAttributes (BlackboardAttribute.ATTRIBUTE_TYPE attr_type) throws TskCoreException
 
long getSize ()
 
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)
 

Static Public Attributes

static final long UNKNOWN_ID = -1
 

Protected Member Functions

 AbstractContent (SleuthkitCase db, long obj_id, String name)
 

Protected Attributes

long parentId
 

Detailed Description

Implements some general methods from the Content interface common across many content sub types

Definition at line 36 of file AbstractContent.java.

Constructor & Destructor Documentation

org.sleuthkit.datamodel.AbstractContent.AbstractContent ( SleuthkitCase  db,
long  obj_id,
String  name 
)
protected

Member Function Documentation

boolean org.sleuthkit.datamodel.AbstractContent.equals ( Object  obj)
ArrayList<BlackboardArtifact> org.sleuthkit.datamodel.AbstractContent.getAllArtifacts ( ) throws TskCoreException

Get all artifacts associated with this content

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

Implements org.sleuthkit.datamodel.Content.

Definition at line 400 of file AbstractContent.java.

References org.sleuthkit.datamodel.SleuthkitCase.getMatchingArtifacts().

long org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 420 of file AbstractContent.java.

References org.sleuthkit.datamodel.SleuthkitCase.getBlackboardArtifactsCount().

ArrayList<BlackboardArtifact> org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 325 of file AbstractContent.java.

References org.sleuthkit.datamodel.SleuthkitCase.getArtifactType().

Referenced by org.sleuthkit.datamodel.AbstractContent.getArtifacts(), and org.sleuthkit.datamodel.AbstractContent.getHashSetNames().

ArrayList<BlackboardArtifact> org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 330 of file AbstractContent.java.

References org.sleuthkit.datamodel.SleuthkitCase.getBlackboardArtifacts(), org.sleuthkit.datamodel.AbstractContent.getGenInfoArtifact(), and org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO.

ArrayList<BlackboardArtifact> org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 348 of file AbstractContent.java.

References org.sleuthkit.datamodel.AbstractContent.getArtifacts().

long org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 405 of file AbstractContent.java.

References org.sleuthkit.datamodel.SleuthkitCase.getBlackboardArtifactsCount().

long org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 410 of file AbstractContent.java.

References org.sleuthkit.datamodel.SleuthkitCase.getBlackboardArtifactsCount().

long org.sleuthkit.datamodel.AbstractContent.getArtifactsCount ( ARTIFACT_TYPE  type) throws TskCoreException
List<Content> org.sleuthkit.datamodel.AbstractContent.getChildren ( ) throws TskCoreException

Gets all children of this abstract content, if any.

Returns
A list of the children.
Exceptions
TskCoreExceptionif there was an error querying the case database.

Implements org.sleuthkit.datamodel.Content.

Definition at line 156 of file AbstractContent.java.

References org.sleuthkit.datamodel.AbstractContent.getSleuthkitCase().

Referenced by org.sleuthkit.datamodel.SleuthkitCase.addCarvedFiles(), org.sleuthkit.datamodel.FileSystem.getRootDirectory(), and org.sleuthkit.datamodel.AbstractFile.listFiles().

int org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 100 of file AbstractContent.java.

References org.sleuthkit.datamodel.AbstractContent.getSleuthkitCase().

Referenced by org.sleuthkit.datamodel.AbstractContent.equals(), and org.sleuthkit.datamodel.AbstractContent.hashCode().

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

Gets the object ids of objects, if any, that are children of this abstract content.

Returns
A list of the object ids.
Exceptions
TskCoreExceptionif there was an error querying the case database.

Implements org.sleuthkit.datamodel.Content.

Definition at line 176 of file AbstractContent.java.

References org.sleuthkit.datamodel.AbstractContent.getSleuthkitCase().

Content org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 188 of file AbstractContent.java.

References org.sleuthkit.datamodel.Content.getDataSource(), and org.sleuthkit.datamodel.AbstractContent.getParent().

Referenced by org.sleuthkit.datamodel.FsContent.getDataSource(), and org.sleuthkit.datamodel.VolumeSystem.getVolumeSystemHandle().

BlackboardArtifact org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 353 of file AbstractContent.java.

Referenced by org.sleuthkit.datamodel.AbstractContent.getArtifacts(), org.sleuthkit.datamodel.AbstractContent.getGenInfoAttributes(), and org.sleuthkit.datamodel.AbstractContent.newArtifact().

BlackboardArtifact org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 358 of file AbstractContent.java.

References org.sleuthkit.datamodel.SleuthkitCase.getBlackboardArtifacts(), org.sleuthkit.datamodel.SleuthkitCase.newBlackboardArtifact(), and org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO.

ArrayList<BlackboardAttribute> org.sleuthkit.datamodel.AbstractContent.getGenInfoAttributes ( ATTRIBUTE_TYPE  attr_type) throws TskCoreException
Set<String> org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 425 of file AbstractContent.java.

References org.sleuthkit.datamodel.AbstractContent.getArtifacts(), org.sleuthkit.datamodel.BlackboardAttribute.getValueString(), org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_HASHSET_HIT, and org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME.

SleuthkitCase org.sleuthkit.datamodel.AbstractContent.getSleuthkitCase ( )

Gets handle of SleuthkitCase to which this content belongs

Returns
the case handle

Definition at line 269 of file AbstractContent.java.

Referenced by org.sleuthkit.datamodel.blackboardutils.CommunicationArtifactsHelper.addAttachments(), org.sleuthkit.datamodel.LocalFilesDataSource.getAcquisitionDetails(), org.sleuthkit.datamodel.Image.getAcquisitionDetails(), org.sleuthkit.datamodel.VolumeSystem.getChildren(), org.sleuthkit.datamodel.Pool.getChildren(), org.sleuthkit.datamodel.AbstractContent.getChildren(), org.sleuthkit.datamodel.Volume.getChildren(), org.sleuthkit.datamodel.Image.getChildren(), org.sleuthkit.datamodel.AbstractContent.getChildrenCount(), org.sleuthkit.datamodel.VolumeSystem.getChildrenIds(), org.sleuthkit.datamodel.Pool.getChildrenIds(), org.sleuthkit.datamodel.AbstractContent.getChildrenIds(), org.sleuthkit.datamodel.Volume.getChildrenIds(), org.sleuthkit.datamodel.Image.getChildrenIds(), org.sleuthkit.datamodel.AbstractFile.getDataSource(), org.sleuthkit.datamodel.DerivedFile.getDerivedMethod(), org.sleuthkit.datamodel.FsContent.getFileSystem(), org.sleuthkit.datamodel.Image.getFileSystems(), org.sleuthkit.datamodel.Image.getImageHandle(), org.sleuthkit.datamodel.Image.getMd5(), org.sleuthkit.datamodel.FsContent.getParentDirectory(), org.sleuthkit.datamodel.AbstractFile.getRanges(), org.sleuthkit.datamodel.Image.getSha1(), org.sleuthkit.datamodel.Image.getSha256(), org.sleuthkit.datamodel.AbstractContent.hasChildren(), org.sleuthkit.datamodel.AbstractFile.save(), org.sleuthkit.datamodel.LocalFilesDataSource.setAcquisitionDetails(), org.sleuthkit.datamodel.Image.setAcquisitionDetails(), org.sleuthkit.datamodel.LocalFilesDataSource.setDisplayName(), org.sleuthkit.datamodel.Image.setDisplayName(), org.sleuthkit.datamodel.Image.setMD5(), org.sleuthkit.datamodel.Image.setSha1(), and org.sleuthkit.datamodel.Image.setSha256().

synchronized String org.sleuthkit.datamodel.AbstractContent.getUniquePath ( ) throws TskCoreException
Returns
returns the full path to this Content object starting with a "/" followed by the Image name and similarly for all other segments in the hierarchy.

Implements org.sleuthkit.datamodel.Content.

Definition at line 72 of file AbstractContent.java.

References org.sleuthkit.datamodel.AbstractContent.getName(), org.sleuthkit.datamodel.AbstractContent.getParent(), and org.sleuthkit.datamodel.Content.getUniquePath().

Referenced by org.sleuthkit.datamodel.AbstractContent.toString().

boolean org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 88 of file AbstractContent.java.

References org.sleuthkit.datamodel.AbstractContent.getSleuthkitCase().

int org.sleuthkit.datamodel.AbstractContent.hashCode ( )
BlackboardArtifact org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 311 of file AbstractContent.java.

References org.sleuthkit.datamodel.AbstractContent.getGenInfoArtifact(), org.sleuthkit.datamodel.SleuthkitCase.newBlackboardArtifact(), and org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO.

Referenced by org.sleuthkit.datamodel.AbstractContent.newArtifact().

BlackboardArtifact org.sleuthkit.datamodel.AbstractContent.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

Implements org.sleuthkit.datamodel.Content.

Definition at line 320 of file AbstractContent.java.

References org.sleuthkit.datamodel.AbstractContent.newArtifact().

String org.sleuthkit.datamodel.AbstractContent.toString ( )

Definition at line 439 of file AbstractContent.java.

String org.sleuthkit.datamodel.AbstractContent.toString ( boolean  preserveState)

Member Data Documentation

long org.sleuthkit.datamodel.AbstractContent.parentId
protected
final long org.sleuthkit.datamodel.AbstractContent.UNKNOWN_ID = -1
static

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

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