1   /*
2    * OInstanceImpl.java
3    *
4    * Copyright (c) 2002, The University of Sheffield.
5    *
6    * This file is part of GATE (see http://gate.ac.uk/), and is free
7    * software, licenced under the GNU Library General Public License,
8    * Version 2, June1991.
9    *
10   * A copy of this licence is included in the distribution in the file
11   * licence.html, and is also available at http://gate.ac.uk/gate/licence.html.
12   *
13   * Kalina Bontcheva 03/2003
14   *
15   */
16  
17  package gate.creole.ontology;
18  
19  public class OInstanceImpl implements OInstance {
20  
21    protected Object userData;
22    protected OClass instanceClass;
23    protected String instanceName;
24  
25    public OInstanceImpl(String aName, OClass aClass) {
26        instanceName = aName;
27        instanceClass = aClass;
28      }
29  
30  
31    public OClass getOClass() {
32      return instanceClass;
33    }
34  
35    public String getName() {
36      return instanceName;
37    }
38  
39    /** Sets the user data of this instance. To be used to
40     * store arbitrary data on instances.
41     */
42    public void setUserData(Object theUserData){
43      userData = theUserData;
44    }
45  
46    /** Gets the user data of this instance.
47     *  @return the object which is user data
48     */
49    public Object getUserData(){
50      return userData;
51    }
52  
53  }