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 /***
28 * @author Paola Turci, Federico Bergenti - Universita` di Parma
29 */
30 public class AbsPredicate extends AbsPrimitiveSlotsHolder implements AbsContentElement {
31
32 /***
33 * Construct an Abstract descriptor to hold a predicate of
34 * the proper type (e.g. FATHER_OF, WORKS_FOR...).
35 * @param typeName The name of the type of the predicate held by
36 * this abstract descriptor.
37 */
38 public AbsPredicate(String typeName) {
39 super(typeName);
40 }
41
42 /***
43 * Sets an attribute of the predicate held by this
44 * abstract descriptor.
45 * @param name The name of the attribute to be set.
46 * @param value The new value of the attribute.
47 */
48 public void set(String name, AbsObject value) {
49 super.set(name, value);
50 }
51
52 /***
53 * Gets the value (casted as an AbsTerm) of an attribute of
54 * the predicate held by this abstract descriptor.
55 * This method is here mainly for backward compatibility.
56 * @param name The name of the attribute.
57 * @return value The value of the attribute.
58 */
59 public AbsTerm getAbsTerm(String name) {
60 return (AbsTerm) getAbsObject(name);
61 }
62 }
63