01: /*
02: * Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18: package org.mandarax.kernel;
19:
20: /**
21: * Interface for object owning knowledge (represented as clause sets). The interface
22: * defines methods to retrieve this knowledge.
23: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
24: * @version 3.4 <7 March 05>
25: * @since 1.1
26: */
27: public interface KnowledgeOwner extends java.io.Serializable {
28:
29: /**
30: * Iterate over all clauses.
31: * @return a clause iterator
32: * @throws ClauseSetException
33: */
34: org.mandarax.util.ClauseIterator clauses()
35: throws ClauseSetException;
36:
37: /**
38: * Get an iterator for clauses. The clause passed represents a query
39: * which can be used to restrict the clause set. E.g., if the clause
40: * iterator is built from database objects, and some of the variables
41: * in the query clause are already replaced by constants, these constants
42: * might be used to form a <code>WHERE</code> clause restricting the set of database objects
43: * used to establish the clauses. The additional parameter provides a general
44: * purpose interface to pass additional information, e.g. to sort the clause
45: * set.
46: * @return a clause iterator
47: * @param query the query clause
48: * @param additionalParameter an optional additional parameter
49: * @throws ClauseSetException
50: */
51: org.mandarax.util.ClauseIterator clauses(Clause query,
52: Object additionalParameter) throws ClauseSetException;
53: }
|