01: package org.mandarax.zkb;
02:
03: /*
04: * Copyright (C) 1999-2004 <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</a>
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: */
20:
21: import org.mandarax.kernel.KnowledgeBase;
22:
23: /**
24: * Simple data structure consisting of a knowledge base plus an additional object, the "attachment".
25: * ZKB allows to save additional objects with the knowledge base. In case there are indeed many attachments,
26: * use a container (e.g. a map) to wrap them as one object.
27: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
28: * @version 3.4 <7 March 05>
29: * @since 2.2
30: */
31: public class KnowledgeBasePlusAttachment {
32: private Object attachment = null;
33: private KnowledgeBase kb = null;
34:
35: /**
36: * Constructor.
37: * @param kb the knowledge base
38: * @param attachment the attachment
39: */
40: public KnowledgeBasePlusAttachment(KnowledgeBase kb,
41: Object attachment) {
42: super ();
43: this .kb = kb;
44: this .attachment = attachment;
45: }
46:
47: /**
48: * Returns the attachment.
49: * @return an object
50: */
51: public Object getAttachment() {
52: return attachment;
53: }
54:
55: /**
56: * Returns the kb.
57: * @return a knowledge base
58: */
59: public KnowledgeBase getKB() {
60: return kb;
61: }
62:
63: }
|