19 package org.sleuthkit.autopsy.datamodel;
21 import java.util.List;
22 import java.util.logging.Level;
24 import org.openide.util.NbBundle;
25 import org.openide.util.lookup.Lookups;
52 super(
new ContentChildren(content), Lookups.singleton(content));
53 this.content = content;
55 super.
setName(
"content_" + Long.toString(content.getId()));
69 throw new UnsupportedOperationException(
70 NbBundle.getMessage(
this.getClass(),
"AbstractContentNode.exception.cannotChangeSysName.msg"));
75 return super.getName();
85 boolean hasChildren =
false;
87 if (content != null) {
89 hasChildren = content.hasChildren();
90 }
catch (TskCoreException ex) {
91 logger.log(Level.SEVERE,
"Error checking if the node has children, for content: " + content, ex);
105 List<Long> childrenIds = null;
107 if (content != null) {
109 childrenIds = content.getChildrenIds();
110 }
catch (TskCoreException ex) {
111 logger.log(Level.SEVERE,
"Error getting children ids, for content: " + content, ex);
125 List<Content> children = null;
127 if (content != null) {
129 children = content.getChildren();
130 }
catch (TskCoreException ex) {
131 logger.log(Level.SEVERE,
"Error getting children, for content: " + content, ex);
147 int childrenCount = -1;
149 if (content != null) {
151 childrenCount = content.getChildrenCount();
152 }
catch (TskCoreException ex) {
153 logger.log(Level.SEVERE,
"Error checking node content children count, for content: " + content, ex);
157 return childrenCount;
172 public int read(byte[] buf,
long offset,
long len)
throws TskException {
173 return content.read(buf, offset, len);
int read(byte[] buf, long offset, long len)
List< Content > getContentChildren()
static final Logger logger
void setName(String name)
int getContentChildrenCount()
boolean hasContentChildren()
synchronized static Logger getLogger(String name)
List< Long > getContentChildrenIds()