1 /***
2 * ***************************************************************
3 * JADE - Java Agent DEvelopment Framework is a framework to develop
4 * multi-agent systems in compliance with the FIPA specifications.
5 * Copyright (C) 2000 CSELT S.p.A.
6 *
7 * GNU Lesser General Public License
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation,
12 * version 2.1 of the License.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
23 * **************************************************************
24 */
25 package JADE_SL.abs;
26
27 import JADE_SL.onto.*;
28 import JADE_SL.schema.*;
29 import JADE_SL.Term;
30
31 /***
32 * Represent an Abstract descriptor that can hold an Identifying
33 * Referential Expression (IRE).
34 * Note that an IRE is both a content element (as in the case of
35 * a QUERY-REF communicative act) and a Term (as in the case of
36 * (== (X) (iota ?x P(?x))
37 * @author Paola Turci, Federico Bergenti - Universita` di Parma
38 */
39 public class AbsIRE extends AbsObjectImpl implements AbsContentElement, AbsTerm {
40
41 /***
42 * Construct an Abstract descriptor to hold a IRE of
43 * the proper type (e.g. ANY, IOTA, ALL...).
44 * @param typeName The name of the type of the IRE held by
45 * this abstract descriptor.
46 */
47 public AbsIRE(String typeName) {
48 super(typeName);
49 }
50
51 /***
52 * Sets the variable of this IRE.
53 * @param variable The abstract descriptor holding the variable.
54 */
55 public void setVariable(AbsVariable variable) {
56 set(IRESchema.VARIABLE, variable);
57 }
58
59 /***
60 * Sets the proposition of this IRE.
61 * @param proposition The abstract descriptor holding the proposition.
62 */
63 public void setProposition(AbsPredicate proposition) {
64 set(IRESchema.PROPOSITION, proposition);
65 }
66
67 /***
68 * Gets the variable of this IRE.
69 * @return the abstract descriptor holding the variable of this IRE.
70 */
71 public AbsVariable getVariable() {
72 return (AbsVariable) getAbsObject(IRESchema.VARIABLE);
73 }
74
75 /***
76 * Gets the proposition of this IRE.
77 * @return the abstract descriptor holding the proposition of this IRE.
78 */
79 public AbsPredicate getProposition() {
80 return (AbsPredicate) getAbsObject(IRESchema.PROPOSITION);
81 }
82
83 /***
84 * Redefine the <code>isGrounded()</code> method in order to
85 * always return <code>false</code>. Infact an IRE always
86 * includes a variable.
87 */
88 public boolean isGrounded() {
89 return false;
90 }
91
92 }
93