Skip to content
Snippets Groups Projects
Commit 00991c52 authored by Brian Carrier's avatar Brian Carrier
Browse files

Merge pull request #22 from alawrence/master

Added Convenience Methods to BlackboardArtifact
parents 5c529bda 0f19d66b
Branches
Tags
No related merge requests found
......@@ -190,7 +190,7 @@ JNIEXPORT void JNICALL
* @param caseHandle the pointer to the case
*/
JNIEXPORT void JNICALL
Java_org_sleuthkit_datamodel_SleuthkitJNI_setCaseDbNSRLNat(JNIEnv * env,
Java_org_sleuthkit_datamodel_SleuthkitJNI_setDbNSRLNat(JNIEnv * env,
jclass obj, jstring pathJ) {
if (m_NSRLDb != NULL) {
......@@ -213,7 +213,7 @@ JNIEXPORT void JNICALL
* @param caseHandle the pointer to the case
*/
JNIEXPORT void JNICALL
Java_org_sleuthkit_datamodel_SleuthkitJNI_setCaseDbKnownBadNat(JNIEnv * env,
Java_org_sleuthkit_datamodel_SleuthkitJNI_setDbKnownBadNat(JNIEnv * env,
jclass obj, jstring pathJ) {
if (m_knownBadDb != NULL) {
......@@ -230,7 +230,7 @@ JNIEXPORT void JNICALL
JNIEXPORT void JNICALL
Java_org_sleuthkit_datamodel_SleuthkitJNI_clearCaseDbLookupsNat(JNIEnv * env,
Java_org_sleuthkit_datamodel_SleuthkitJNI_closeDbLookupsNat(JNIEnv * env,
jclass obj) {
if (m_NSRLDb != NULL) {
......
......@@ -49,26 +49,26 @@ JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_closeCaseDbNat
/*
* Class: org_sleuthkit_datamodel_SleuthkitJNI
* Method: setCaseDbNSRLNat
* Method: setDbNSRLNat
* Signature: (Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_setCaseDbNSRLNat
JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_setDbNSRLNat
(JNIEnv *, jclass, jstring);
/*
* Class: org_sleuthkit_datamodel_SleuthkitJNI
* Method: setCaseDbKnownBadNat
* Method: setDbKnownBadNat
* Signature: (Ljava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_setCaseDbKnownBadNat
JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_setDbKnownBadNat
(JNIEnv *, jclass, jstring);
/*
* Class: org_sleuthkit_datamodel_SleuthkitJNI
* Method: clearCaseDbLookupsNat
* Method: closeDbLookupsNat
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_clearCaseDbLookupsNat
JNIEXPORT void JNICALL Java_org_sleuthkit_datamodel_SleuthkitJNI_closeDbLookupsNat
(JNIEnv *, jclass);
/*
......
......@@ -326,6 +326,22 @@ public long getArtifactID() {
public int getAttributeTypeID() {
return attributeTypeID;
}
/**
* get the attribute type id
* @return type id
*/
public String getAttributeTypeName() throws TskException {
return Case.getAttrTypeString(attributeTypeID);
}
/**
* get the attribute type id
* @return type id
*/
public String getAttributeTypeDisplayName() throws TskException {
return Case.getAttrTypeDisplayName(attributeTypeID);
}
/**
* get the value type (this should be used to identify the type of value and call
......
......@@ -31,9 +31,9 @@ public class SleuthkitJNI {
private static native long newCaseDbNat(String dbPath) throws TskException;
private static native long openCaseDbNat(String path) throws TskException;
private static native void closeCaseDbNat(long db) throws TskException;
private static native void setCaseDbNSRLNat(String hashDbPath) throws TskException;
private static native void setCaseDbKnownBadNat(String hashDbPath) throws TskException;
private static native void clearCaseDbLookupsNat() throws TskException;
private static native void setDbNSRLNat(String hashDbPath) throws TskException;
private static native void setDbKnownBadNat(String hashDbPath) throws TskException;
private static native void closeDbLookupsNat() throws TskException;
private static native int hashDBLookup(String hash) throws TskException;
......@@ -94,7 +94,7 @@ void free() throws TskException {
SleuthkitJNI.closeCaseDbNat(caseDbPointer);
}
void clearLookupDatabases() throws TskException {
clearCaseDbLookupsNat();
closeDbLookupsNat();
}
......@@ -102,14 +102,14 @@ void clearLookupDatabases() throws TskException {
* Set the path to an NSRL database
*/
void setNSRLDatabase(String path) throws TskException {
setCaseDbNSRLNat(path);
setDbNSRLNat(path);
}
/**
* Set the path to a known bad hash database
*/
void setKnownBadDatabase(String path) throws TskException {
setCaseDbKnownBadNat(path);
setDbKnownBadNat(path);
}
......@@ -412,14 +412,14 @@ public static boolean lookupIndexExists(String dbPath) throws TskException {
* Set the path to an NSRL database
*/
public static void setNSRLDatabase(String path) throws TskException {
setCaseDbNSRLNat(path);
setDbNSRLNat(path);
}
/**
* Set the path to a known bad hash database
*/
public static void setKnownBadDatabase(String path) throws TskException {
setCaseDbKnownBadNat(path);
setDbKnownBadNat(path);
}
public static TskData.FileKnown lookupHash(String hash) throws TskException{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment