View Javadoc

1   /*
2    wsmo4j - a WSMO API and Reference Implementation
3    Copyright (c) 2005, University of Innsbruck, Austria
4    This library is free software; you can redistribute it and/or modify it under
5    the terms of the GNU Lesser General Public License as published by the Free
6    Software Foundation; either version 2.1 of the License, or (at your option)
7    any later version.
8    This library is distributed in the hope that it will be useful, but WITHOUT
9    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10   FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11   details.
12   You should have received a copy of the GNU Lesser General Public License along
13   with this library; if not, write to the Free Software Foundation, Inc.,
14   59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15   */
16  package org.deri.wsmo4j.logicalexpression.terms;
17  
18  
19  import java.util.List;
20  
21  import org.deri.wsmo4j.logicalexpression.ConstantTransformer;
22  import org.omwg.logicalexpression.terms.BuiltInConstructedTerm;
23  import org.omwg.logicalexpression.terms.Term;
24  import org.wsmo.common.IRI;
25  
26  
27  /**
28   *
29   *
30   * <pre>
31   * Created on Sep 7, 2005
32   * Committed by $Author$
33   * $Source$,
34   * </pre>
35   *
36   * @author Holger Lausen (holger.lausen@deri.org)
37   *
38   * @version $Revision$ $Date$
39   */
40  public class BuiltInConstructedTermImpl
41          extends ConstructedTermImpl
42          implements BuiltInConstructedTerm {
43  
44      /**
45       * @param functionSymbol the name of the term, in form of an IRI
46       * @param terms List of Terms
47       * @throws IllegalArgumentException in case the functionSymbol is not a built in
48       */
49      public BuiltInConstructedTermImpl(IRI functionSymbol, List <Term> terms)
50              throws IllegalArgumentException {
51          super(functionSymbol, terms);
52          if (!ConstantTransformer.getInstance().isBuiltInFunctionSymbol(functionSymbol.toString())) {
53              throw new IllegalArgumentException(functionSymbol + "is not Built in Function symbol!");
54          }
55      }
56  }