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 a WSMO relation instance 36 * 37 * @see Relation 38 * @author not attributable 39 * @version $Revision: 1946 $ $Date: 2007-04-02 15:13:28 +0300 (Mon, 02 Apr 2007) $ 40 */ 41 public interface RelationInstance 42 extends OntologyElement { 43 44 /** 45 * Sets the relation this relation instance is an instance of. 46 * @param memberOf The Relation this relation instance is an instance of. 47 * @throws org.wsmo.common.exception.SynchronisationException 48 * @throws org.wsmo.common.exception.InvalidModelException 49 * @see #getRelation() 50 */ 51 void setRelation(Relation memberOf) 52 throws SynchronisationException, InvalidModelException; 53 54 /** 55 * Returns the relation this relation instance is an instance of. 56 * @return The relation this relation instance is an instance of. 57 * @throws org.wsmo.common.exception.SynchronisationException 58 * @see #setRelation(org.omwg.ontology.Relation) 59 */ 60 Relation getRelation() 61 throws SynchronisationException; 62 63 /** 64 * Returns a list of ParameterValues. 65 * @return A list of ParameterValues 66 * for all parameters set via <code>setParameterValue</code>. 67 */ 68 public List <Value> listParameterValues(); 69 70 /** 71 * Returns the value of the specified paramter. 72 * @param pos The index of the parameter of interest. 73 * @return The value of the specified parameter. 74 * @throws org.wsmo.common.exception.SynchronisationException 75 * @see #setParameterValue(byte, Value) 76 */ 77 Value getParameterValue(byte pos) 78 throws SynchronisationException, InvalidModelException; 79 80 /** 81 * Sets the value of the specieifed Parameter to be the specified ParameterValue object. 82 * @param pos The index of the Parameter of interest. 83 * @param value The ParameterValue object to set the specified Parameter's value to. 84 * @throws org.wsmo.common.exception.SynchronisationException 85 * @throws org.wsmo.common.exception.InvalidModelException 86 * @see #getParameterValue(byte pos) 87 */ 88 void setParameterValue(byte pos, Value value ) 89 throws SynchronisationException, InvalidModelException; 90 91 /** 92 * @supplierCardinality 0..* 93 * @supplierRole specifies-value-for 94 * @directed 95 */ 96 /*# Parameter lnkParameter; */ 97 } 98 99 /* 100 * $Log$ 101 * Revision 1.18 2007/04/02 12:13:14 morcen 102 * Generics support added to wsmo-api, wsmo4j and wsmo-test 103 * 104 * Revision 1.17 2005/09/27 13:09:59 marin_dimitrov 105 * javadoc 106 * 107 * Revision 1.16 2005/09/21 08:15:39 holgerlausen 108 * fixing java doc, removing asString() 109 * 110 * Revision 1.15 2005/06/24 12:51:07 marin_dimitrov 111 * now use Value for param/attr values (was: Object) 112 * 113 * Revision 1.14 2005/06/01 10:22:22 marin_dimitrov 114 * v0.4.0 115 * 116 * Revision 1.6 2005/05/13 15:38:26 marin 117 * fixed javadoc errors 118 * 119 * Revision 1.5 2005/05/13 15:02:41 marin 120 * javadoc, header, footer, etc 121 * 122 * Revision 1.7 2005/05/13 13:58:25 marin 123 * javadoc, header, footer, etc 124 * 125 */