mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge fixes to main modules from branch 'keyword-search-prototype'
This commit is contained in:
commit
89e96e5027
@ -39,8 +39,12 @@ public interface DataContentViewer {
|
||||
public String getTitle();
|
||||
|
||||
/**
|
||||
* Get new DataContentViewer instance.
|
||||
* Get new DataContentViewer instance. (This method is weird. We use the
|
||||
* instance returned by the Lookup as a factory for the instances that
|
||||
* are actually used.)
|
||||
*/
|
||||
// TODO: extract the factory method out into a seperate interface that
|
||||
// is used for the Lookup.
|
||||
public DataContentViewer getInstance();
|
||||
|
||||
/**
|
||||
|
@ -97,14 +97,6 @@ abstract class AbstractContentNode<T extends Content> extends AbstractNode imple
|
||||
public byte[] read(long offset, long len) throws TskException {
|
||||
return content.read(offset, len);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of the file ID / Metadata address on the columns on
|
||||
* the directory table.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
abstract public int getFileIDColumn();
|
||||
|
||||
/**
|
||||
* Returns the content of this node.
|
||||
@ -238,6 +230,5 @@ abstract class AbstractContentNode<T extends Content> extends AbstractNode imple
|
||||
public List<String> visit(VolumeSystem vs) {
|
||||
return vs.getParent().accept(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.datamodel;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import org.openide.nodes.FilterNode;
|
||||
import org.openide.nodes.Node;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.TskException;
|
||||
|
||||
public class ContentFilterNode extends FilterNode implements ContentNode {
|
||||
|
||||
public ContentFilterNode(ContentNode original) {
|
||||
super((Node) original);
|
||||
}
|
||||
|
||||
public ContentFilterNode(ContentNode original, Children children) {
|
||||
super((Node) original, children);
|
||||
}
|
||||
|
||||
public ContentFilterNode(ContentNode original, Children children, Lookup lookup) {
|
||||
super((Node) original, children, lookup);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public long getID() {
|
||||
return ((ContentNode) super.getOriginal()).getID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[][] getRowValues(int rows) throws SQLException {
|
||||
return ((ContentNode) super.getOriginal()).getRowValues(rows);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] read(long offset, long len) throws TskException {
|
||||
return ((ContentNode) super.getOriginal()).read(offset, len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Content getContent() {
|
||||
return ((ContentNode) super.getOriginal()).getContent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDisplayPath() {
|
||||
return ((ContentNode) super.getOriginal()).getDisplayPath();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getSystemPath() {
|
||||
return ((ContentNode) super.getOriginal()).getSystemPath();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T accept(ContentNodeVisitor<T> v) {
|
||||
return ((ContentNode) super.getOriginal()).accept(v);
|
||||
}
|
||||
}
|
@ -65,14 +65,6 @@ public interface ContentNode {
|
||||
*/
|
||||
public byte[] read(long offset, long len) throws TskException;
|
||||
|
||||
/**
|
||||
* Returns the location of the file ID / Metadata address on the columns on
|
||||
* the directory table.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getFileIDColumn();
|
||||
|
||||
/**
|
||||
* Returns the content of this node.
|
||||
*
|
||||
|
@ -100,11 +100,6 @@ public class DirectoryNode extends AbstractFsContentNode<Directory> {
|
||||
return objs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFileIDColumn() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T accept(ContentNodeVisitor<T> v) {
|
||||
return v.visit(this);
|
||||
|
@ -94,12 +94,7 @@ public class FileNode extends AbstractFsContentNode<File> {
|
||||
});
|
||||
return objs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFileIDColumn() {
|
||||
return 1; // change this later when it's defined
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <T> T accept(ContentNodeVisitor<T> v) {
|
||||
return v.visit(this);
|
||||
|
@ -79,11 +79,6 @@ public class ImageNode extends AbstractContentNode<Image> {
|
||||
return objs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFileIDColumn() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cookie getCookie(Class clazz) {
|
||||
Children ch = getChildren();
|
||||
|
@ -90,11 +90,6 @@ public class VolumeNode extends AbstractContentNode<Volume> {
|
||||
return objs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFileIDColumn() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Right click action for volume node
|
||||
*
|
||||
|
@ -1,8 +1,8 @@
|
||||
build.xml.data.CRC32=db477856
|
||||
build.xml.script.CRC32=6ec7becb
|
||||
build.xml.stylesheet.CRC32=a56c6a5b@1.42.2
|
||||
build.xml.stylesheet.CRC32=a56c6a5b@1.46.2
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=db477856
|
||||
nbproject/build-impl.xml.script.CRC32=8c5007a7
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.42.2
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2
|
||||
|
@ -205,11 +205,6 @@ public class DataResultFilterNode extends FilterNode implements ContentNode {
|
||||
return ((ContentNode) currentNode).read(offset, len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFileIDColumn() {
|
||||
return ((ContentNode) currentNode).getFileIDColumn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Content getContent() {
|
||||
return ((ContentNode) currentNode).getContent();
|
||||
|
@ -23,7 +23,10 @@ import java.util.List;
|
||||
import javax.swing.Action;
|
||||
import org.openide.nodes.FilterNode;
|
||||
import org.openide.nodes.Node;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.Volume;
|
||||
|
||||
/**
|
||||
* This class sets the actions for the nodes in the directory tree and creates
|
||||
|
@ -26,6 +26,7 @@
|
||||
<file name="org-sleuthkit-autopsy-directorytree-DirectoryTreeTopComponent.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.corecomponentinterfaces.DataExplorer"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.getDefault"/>
|
||||
<attr name="position" intvalue="100"/>
|
||||
</file>
|
||||
</folder>
|
||||
<folder name="Windows2">
|
||||
|
@ -111,11 +111,6 @@ public class DataResultFilterNode extends FilterNode implements ContentNode {
|
||||
return ((ContentNode) currentNode).read(offset, len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFileIDColumn() {
|
||||
return ((ContentNode) currentNode).getFileIDColumn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Content getContent() {
|
||||
return ((ContentNode) currentNode).getContent();
|
||||
|
@ -40,7 +40,6 @@ import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
import org.openide.nodes.Node;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.windows.TopComponent;
|
||||
import org.openide.windows.WindowManager;
|
||||
|
@ -90,11 +90,6 @@ class SearchNode extends AbstractNode implements ContentNode {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFileIDColumn() {
|
||||
return -1; // change this later when needed
|
||||
}
|
||||
|
||||
@Override
|
||||
public Content getContent() {
|
||||
return null;
|
||||
|
@ -22,6 +22,7 @@
|
||||
<file name="org-sleuthkit-autopsy-filesearch-FileSearchTopComponent.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.corecomponentinterfaces.DataExplorer"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.filesearch.FileSearchTopComponent.getDefault"/>
|
||||
<attr name="position" intvalue="200"/>
|
||||
</file>
|
||||
</folder>
|
||||
<folder name="Windows2">
|
||||
|
Loading…
x
Reference in New Issue
Block a user