1 /* 2 wsmo4j - a WSMO API and Reference Implementation 3 4 Copyright (c) 2004-2005, OntoText Lab. / SIRMA 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 19 /** 20 * <p>Title: WSMO4J</p> 21 * <p>Description: WSMO API and a Reference Implementation</p> 22 * <p>Copyright: Copyright (c) 2004-2005</p> 23 * <p>Company: OntoText Lab. / SIRMA </p> 24 */ 25 26 package org.omwg.ontology; 27 28 29 import java.util.*; 30 31 import org.wsmo.common.exception.*; 32 33 34 /** 35 * Defines WSMO parameter of a relation. 36 * 37 * @author not attributable 38 * @see Relation 39 * @author not attributable 40 * @version $Revision: 1946 $Date: 41 */ 42 public interface Parameter { 43 44 /** 45 * Returns the type of this parameter. 46 * @return true (constraining) / false (inferring) 47 */ 48 boolean isConstraining(); 49 50 /** 51 * Sets the type of this parameter. 52 * @param constraining true (constraining) / false (inferring) 53 */ 54 void setConstraining(boolean constraining); 55 56 /** 57 * Returns the {@link Relation} to which this parameter is assigned. 58 * @return 59 */ 60 Relation getRelation(); 61 62 /** 63 * Adds a new {@link Type} as range for this parameter. 64 * @param type the Type to be added 65 * @throws InvalidModelException 66 */ 67 void addType(Type type) throws InvalidModelException; 68 69 /** 70 * Removes a {@link Type} for this parameter. 71 * @param type the Type to be removed 72 * @throws InvalidModelException 73 */ 74 void removeType(Type type); 75 76 /** 77 * Returns the list of allowed {@link Type} for the current parameter. 78 * @semantics result is either a Concept or a WsmlDatatype 79 * @return Set of Type objects 80 */ 81 Set <Type> listTypes(); 82 83 /** 84 * @supplierCardinality 1 85 * @directed 86 * @supplierRole has-type 87 */ 88 /*# Concept lnkConcept; */ 89 90 /** 91 * @supplierCardinality 1 92 * @supplierRole has-datatype 93 * @directed 94 */ 95 /*# WsmlDataType lnkWsmlDataType; */ 96 } 97 98 /* 99 * $Log$ 100 * Revision 1.17 2007/04/02 12:13:14 morcen 101 * Generics support added to wsmo-api, wsmo4j and wsmo-test 102 * 103 * Revision 1.16 2006/02/13 22:49:23 nathaliest 104 * - changed concept.createAttribute() and Parameter.addType to throw InvalidModelException. 105 * - small change at check AnonIds in ConceptImpl 106 * 107 * Revision 1.15 2005/09/26 08:36:20 vassil_momtchev 108 * javadoc, header and footer added 109 * 110 */