View Javadoc
1   /*
2    WSMO Studio - a Semantic Web Service Editor
3    Copyright (c) 2004-2006, OntoText Lab. / SIRMA Group
4    
5    This library is free software; you can redistribute it and/or modify it under
6    the terms of the GNU Lesser General Public License as published by the Free
7    Software Foundation; either version 2.1 of the License, or (at your option)
8    any later version.
9    This library is distributed in the hope that it will be useful, but WITHOUT
10   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   details.
13   You should have received a copy of the GNU Lesser General Public License along
14   with this library; if not, write to the Free Software Foundation, Inc.,
15   59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16   */
17  
18  /***
19   * <p>Title: WSMO Studio</p>
20   * <p>Description: Semantic Web Service Editor</p>
21   * <p>Copyright:  Copyright (c) 2004-2006</p>
22   * <p>Company: OntoText Lab. / SIRMA </p>
23   */
24  
25  package org.wsmostudio.ui.editors.model;
26  
27  import org.omwg.ontology.Value;
28  import org.wsmo.common.*;
29  import org.wsmo.common.exception.InvalidModelException;
30  
31  public class EntityModel extends ObservableModel {
32      
33      
34      public EntityModel(Entity entityObject) {
35          super(entityObject);
36      }
37      
38      
39      public void addNFPValue(IRI key, Value val) 
40              throws InvalidModelException {
41          ((Entity)getAdapter(Entity.class)).addNFPValue(key, val);
42          setChanged();
43      }
44      
45      public void addNFPValue(IRI key, Identifier val) 
46              throws InvalidModelException {
47          ((Entity)getAdapter(Entity.class)).addNFPValue(key, val);
48          setChanged();
49      }
50  
51      public void removeNFPValue(IRI key, Identifier val) 
52          throws InvalidModelException {
53          ((Entity)getAdapter(Entity.class)).removeNFPValue(key, val);
54              setChanged();
55      }
56      
57      public void removeNFPValue(IRI key, Value val) 
58              throws InvalidModelException {
59          ((Entity)getAdapter(Entity.class)).removeNFPValue(key, val);
60          setChanged();
61      }
62      
63  }
64  
65  /*
66   * $Log$
67   * Revision 1.3  2006/01/09 12:51:14  alex_simov
68   * Copyright message in header updated
69   *
70   * Revision 1.2  2005/11/09 16:16:08  alex_simov
71   * UIModels notification improved
72   *
73   * Revision 1.1  2005/11/04 15:54:00  alex_simov
74   * wsmo4j entity UI models created
75   *
76   *
77   */