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.lang;
26
27 import JADE_SL.onto.*;
28 import JADE_SL.abs.*;
29
30 /***
31 * Generic base class for al content language codecs
32 * @author Federico Bergenti - Universita` di Parma
33 */
34 public abstract class Codec {
35
36 /***
37 * Class CodecException.
38 *
39 * @author Federico Bergenti
40 */
41 public static class CodecException extends WrapperException {
42
43 /***
44 * Constructor
45 *
46 * @param message the message.
47 *
48 */
49 public CodecException(String message) {
50 super(message);
51 }
52
53 /***
54 Construct a new <code>CodecException</code>
55 @param msg The message for this exception.
56 @param t The exception wrapped by this object.
57 */
58 public CodecException(String msg, Throwable t) {
59 super(msg, t);
60 }
61
62 }
63
64 /*** This string is the prefix of all the unnamed slots of a Frame **/
65 public static String UNNAMEDPREFIX = "_SL.UNNAMED";
66
67 private String name = null;
68
69 /***
70 * Construct a Codec object with the given name
71 */
72 protected Codec(String name) {
73 this.name = name;
74 }
75
76 /***
77 * Gets the name of this codec.
78 * @return the name of this codec.
79 */
80 public String getName() {
81 return name;
82 }
83
84 /***
85 * @return the ontology containing the schemas of the operator
86 * defined in this language
87 */
88 public Ontology getInnerOntology() {
89 return null;
90 }
91 }
92