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.repository.ui.manageractions;
26  
27  import java.util.Map;
28  
29  import org.eclipse.jface.action.Action;
30  import org.wsmo.common.IRI;
31  import org.wsmo.datastore.WsmoRepository;
32  import org.wsmostudio.repository.ui.actions.ActionsManager;
33  import org.wsmostudio.runtime.extension.Initialisable;
34  
35  public class ManagerAction extends Action implements Initialisable {
36  
37      
38      protected WsmoRepository _instance;
39      protected IRI selection;
40      protected byte type;
41      
42      public ManagerAction() {
43          super();
44      }
45      
46      public void initialise(Map props) {
47          if (props.containsKey(ActionsManager.INSTANCE_REF)) {
48              this._instance = (WsmoRepository)props.get(ActionsManager.INSTANCE_REF);
49          }
50          if (props.containsKey(ActionsManager.CONF_ATTR_NAME)) {
51              setText((String)props.get(ActionsManager.CONF_ATTR_NAME));
52          }
53          if (props.containsKey(ActionsManager.SELECTION_REF)) {
54              this.selection = (IRI)props.get(ActionsManager.SELECTION_REF);
55          }
56          if (props.containsKey(ActionsManager.SELECTION_TYPE_REF)) {
57              this.type = ((Byte)props.get(ActionsManager.SELECTION_TYPE_REF)).byteValue();
58          }
59  
60      }
61  }
62  
63  /*
64   * $Log$
65   * Revision 1.2  2006/05/23 08:45:35  alex_simov
66   * licence header and footer added
67   *
68   */