19 package org.sleuthkit.datamodel;
21 import java.util.ArrayList;
22 import java.util.Collections;
23 import java.util.HashSet;
24 import java.util.List;
26 import java.util.logging.Level;
27 import java.util.logging.Logger;
56 checkedHasChildren =
false;
73 if (uniquePath == null) {
75 if (!name.isEmpty()) {
80 if (myParent != null) {
89 if (checkedHasChildren ==
true) {
94 checkedHasChildren =
true;
105 if (childrenCount != -1) {
111 hasChildren = childrenCount > 0;
112 checkedHasChildren =
true;
119 if (parent == null) {
120 ObjectInfo parentInfo = null;
122 parentInfo = db.getParentInfo(
this);
123 }
catch (TskCoreException ex) {
132 void setParent(
Content parent) {
142 void setParentId(
long parentId) {
155 if (myParent == null) {
176 if (getClass() != obj.getClass()) {
180 if (this.objId != other.
objId) {
189 hash = 41 * hash + (int) (this.objId ^ (this.objId >>> 32));
215 if (genInfoArtifact == null)
220 ArrayList<BlackboardArtifact> list =
new ArrayList<BlackboardArtifact>();
222 if (genInfoArtifact != null) {
223 list.add(genInfoArtifact);
242 if (genInfoArtifact != null) {
249 if (arts.isEmpty()) {
256 retArt = arts.get(0);
258 genInfoArtifact = retArt;
264 ArrayList<BlackboardAttribute> returnList =
new ArrayList<BlackboardAttribute>();
266 if (genInfoArtifact == null) {
268 if (genInfoArtifact == null) {
274 if (attribute.getAttributeTypeID() == attr_type.getTypeID()) {
275 returnList.add(attribute);
309 Set<String> hashNames =
new HashSet<String>();
315 hashNames.add(attr.getValueString());
318 return Collections.unmodifiableSet(hashNames);
328 return "AbstractContent [\t" +
"objId " + String.format(
"%010d", objId) +
"\t"
329 +
"name " + name +
"\t" +
"parentId " + parentId +
"\t"
330 +
"\t" +
"checkedHasChildren " + checkedHasChildren
331 +
"\t" +
"hasChildren " + hasChildren
332 +
"\t" +
"childrenCount " + childrenCount
333 +
"uniquePath " + uniquePath +
"]\t";
337 return "AbstractContent [\t" +
"objId " + String.format(
"%010d", objId)
338 +
"\t" +
"name " + name
339 +
"\t" +
"checkedHasChildren " + checkedHasChildren
340 +
"\t" +
"hasChildren " + hasChildren
341 +
"\t" +
"childrenCount " + childrenCount
345 return "AbstractContent [\t" +
"objId "
346 + String.format(
"%010d", objId) +
"\t" +
"name " + name
347 +
"\t" +
"checkedHasChildren " + checkedHasChildren
348 +
"\t" +
"hasChildren " + hasChildren
349 +
"\t" +
"childrenCount " + childrenCount
351 +
"\t" +
"parentId " + parentId +
"]\t";
355 return "AbstractContent [\t" +
"objId " + String.format(
"%010d", objId) +
"\t"
356 +
"name " + name +
"\t" +
"parentId " + parentId +
"\t"
357 +
"\t" +
"checkedHasChildren " + checkedHasChildren
358 +
"\t" +
"hasChildren " + hasChildren
359 +
"\t" +
"childrenCount " + childrenCount
360 +
"uniquePath " + uniquePath +
"]\t";
volatile boolean hasChildren
static ARTIFACT_TYPE fromLabel(String label)
long getBlackboardArtifactsCount(long objId)
synchronized Content getParent()
ArrayList< BlackboardArtifact > getBlackboardArtifacts(int artifactTypeID)
ArrayList< BlackboardArtifact > getArtifacts(int artifactTypeID)
TSK_HASHSET_HIT
hashset hits
Content getContentById(long id)
ArrayList< BlackboardArtifact > getAllArtifacts()
TSK_GEN_INFO
Default type.
synchronized String getUniquePath()
String toString(boolean preserveState)
ArrayList< BlackboardArtifact > getMatchingArtifacts(String whereClause)
volatile int childrenCount
BlackboardArtifact newArtifact(BlackboardArtifact.ARTIFACT_TYPE type)
ArrayList< BlackboardArtifact > getArtifacts(BlackboardArtifact.ARTIFACT_TYPE type)
BlackboardArtifact newBlackboardArtifact(int artifactTypeID, long obj_id)
BlackboardArtifact getGenInfoArtifact()
AbstractContent(SleuthkitCase db, long obj_id, String name)
SleuthkitCase getSleuthkitCase()
boolean equals(Object obj)
BlackboardArtifact genInfoArtifact
long getArtifactsCount(ARTIFACT_TYPE type)
long getAllArtifactsCount()
List< BlackboardAttribute > getAttributes()
BlackboardArtifact newArtifact(int artifactTypeID)
Set< String > getHashSetNames()
long getArtifactsCount(int artifactTypeID)
ArrayList< BlackboardArtifact > getArtifacts(String artifactTypeName)
volatile boolean checkedHasChildren
static final long UNKNOWN_ID
BlackboardArtifact getGenInfoArtifact(boolean create)
ArrayList< BlackboardAttribute > getGenInfoAttributes(ATTRIBUTE_TYPE attr_type)
long getArtifactsCount(String artifactTypeName)