19 package org.sleuthkit.autopsy.keywordsearch;
21 import java.util.Collection;
22 import java.util.HashMap;
31 class KeywordCachedArtifact {
33 private BlackboardArtifact artifact;
34 private Map<Integer, BlackboardAttribute> attributes;
36 KeywordCachedArtifact(BlackboardArtifact artifact) {
37 this.artifact = artifact;
38 attributes =
new HashMap<Integer, BlackboardAttribute>();
41 BlackboardArtifact getArtifact() {
45 Collection<BlackboardAttribute> getAttributes() {
46 return attributes.values();
49 BlackboardAttribute getAttribute(Integer attrTypeID) {
50 return attributes.get(attrTypeID);
53 void add(BlackboardAttribute attribute) {
54 attributes.put(attribute.getAttributeTypeID(), attribute);
57 void add(Collection<BlackboardAttribute> attributes) {
58 for (BlackboardAttribute attr : attributes) {
59 this.attributes.put(attr.getAttributeTypeID(), attr);