01: // You can redistribute this software and/or modify it under the terms of
02: // the Infozone Software License version 2 published by the Infozone Group
03: // (http://www.infozone-group.org).
04: //
05: // Copyright (C) @year@ by The Infozone Group. All rights reserved.
06: //
07: // $Id: XPathQuery.java,v 1.1 2002/05/10 08:59:12 per_nyfelt Exp $
08:
09: package org.infozone.tools.xml.queries;
10:
11: import java.io.*;
12:
13: import org.w3c.dom.Document;
14: import org.w3c.dom.Node;
15: import org.w3c.dom.traversal.NodeFilter;
16:
17: /**
18: * This class represents a XPath query, which an {@link XPathProcessor} is
19: * able to handle.
20: *
21: * @version $Revision: 1.1 $ $Date: 2002/05/10 08:59:12 $
22: * @author <a href="http://www.softwarebuero.de">SMB</a>
23: * @see XPathProcessor
24: */
25: public interface XPathQuery extends Serializable {
26:
27: public void setQString(String qstring) throws Exception;
28:
29: public void setNamespace(Node namespace) throws Exception;
30:
31: public void setNodeFilter(NodeFilter filter) throws Exception;
32:
33: /**
34: * Execute the xpath.
35: *
36: * @param rootNode The node from which the query should start or null.
37: * @param nameSpace The node that resolves namespace queries or null.
38: * @param filter The node filter which is to apply while querying or null.
39: * @return The XObject insulating the query result.
40: */
41: public XObject execute(Node rootNode) throws Exception;
42:
43: }
|