View Javadoc

1   /*
2    wsmo4j - a WSMO API and Reference Implementation
3   
4    Copyright (c) 2005, University of Innsbruck, Austria
5   
6    This library is free software; you can redistribute it and/or modify it under
7    the terms of the GNU Lesser General Public License as published by the Free
8    Software Foundation; either version 2.1 of the License, or (at your option)
9    any later version.
10   This library is distributed in the hope that it will be useful, but WITHOUT
11   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12   FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13   details.
14   You should have received a copy of the GNU Lesser General Public License along
15   with this library; if not, write to the Free Software Foundation, Inc.,
16   59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17   */
18  package org.omwg.logicalexpression;
19  
20  
21  import java.util.*;
22  
23  import org.omwg.logicalexpression.terms.*;
24  import org.wsmo.common.*;
25  
26  
27  /**
28   * This interface represents an atom with a n-ary domain, where n is
29   * the arity of the predicate represented.
30   * @author DERI Innsbruck, reto.krummenacher@deri.org
31   * @version $Revision: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $
32   * @see org.omwg.logicalexpression.AtomicExpression
33   */
34  public interface Atom
35          extends AtomicExpression {
36  
37      /**
38       * The arity of the Atom indicates how many Terms are contained in the
39       * Atom's list of arguments.
40       *
41       * @return the arity of the atom, i.e. the number of parameters
42       */
43      int getArity();
44  
45      /**
46       * The returned Identifier represents the name of the predicate.
47       *
48       * @return the identifier of the atom, i.e. the name of the predicate
49       */
50      Identifier getIdentifier();
51  
52      /**
53       * The index i points to a position in the Atom's list of arguments. So i mustn't
54       * exceed the arity of the atom.
55       * The desired Term, to which the index points, is returned.
56       *
57       * @param i the position of the parameter desired, maximal value getArity-1
58       * @return the parameter at the position provided as parameter
59       * @throws IllegalArgumentException in case i<0 or i exceeds the arity of the atom
60       */
61      Term getParameter(int i)
62              throws IllegalArgumentException;
63      
64      /**
65       * 
66       * @return List containing the Atom's arguments (a list of Terms).
67       */
68      List <Term> listParameters();
69      
70      public void setParameters(List <Term> parameter);
71  }
72  /*
73   * $Log$
74   * Revision 1.7  2007/04/02 12:13:15  morcen
75   * Generics support added to wsmo-api, wsmo4j and wsmo-test
76   *
77   * Revision 1.6  2005/10/25 12:20:55  holgerlausen
78   * listParamters -> listParameters
79   *
80   * Revision 1.5  2005/09/21 06:31:55  holgerlausen
81   * allowing to set arguments rfe  1290049
82   *
83   * Revision 1.4  2005/09/13 16:07:08  holgerlausen
84   * added convinience method listParameters
85   *
86   * Revision 1.3  2005/09/09 11:58:19  holgerlausen
87   * fixed header logexp no longer extension
88   *
89   * Revision 1.2  2005/09/09 11:12:12  marin_dimitrov
90   * formatting
91   *
92   * Revision 1.1  2005/09/02 13:32:43  ohamano
93   * move logicalexpression packages from ext to core
94   * move tests from logicalexpression.test to test module
95   *
96   * Revision 1.7  2005/09/02 09:43:28  ohamano
97   * integrate wsmo-api and le-api on api and reference implementation level; full parser, serializer and validator integration will be next step
98   *
99   * Revision 1.6  2005/08/18 16:15:40  nathaliest
100  * JavaDoc added
101  *
102  * Revision 1.5  2005/08/16 16:28:29  nathaliest
103  * JavaDoc added
104  * Method getArgument(int) at UnaryImpl, QuantifiedImpl and BinaryImpl changed
105  * Method equals(Object) at QuantifiedImpl changed
106  *
107  * Revision 1.4  2005/06/22 13:32:01  ohamano
108  * change header
109  *
110  * Revision 1.3  2005/06/20 08:30:03  holgerlausen
111  * formating
112  *
113  * Revision 1.2  2005/06/18 14:06:10  holgerlausen
114  * added local LEFactory, updated javadoc, refactored LEVariable > Variable etc. parse(String) for LEFactory is running now
115  *
116  * Revision 1.1  2005/06/16 13:55:23  ohamano
117  * first import
118  *
119  */