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   *  $Id: OInstanceImpl.java,v 1.3 2004/07/27 17:38:30 kalina Exp $
17   */
18  
19  package gate.creole.ontology;
20  
21  import java.util.Set;
22  
23  public class OInstanceImpl implements OInstance {
24  
25    protected Object userData;
26    protected OClass instanceClass;
27    protected String instanceName;
28  
29    public OInstanceImpl(String aName, OClass aClass) {
30        instanceName = aName;
31        instanceClass = aClass;
32      }
33  
34  
35    public OClass getOClass() {
36      return instanceClass;
37    }
38  
39    public String getName() {
40      return instanceName;
41    }
42  
43    /** Sets the user data of this instance. To be used to
44     * store arbitrary data on instances.
45     */
46    public void setUserData(Object theUserData){
47      userData = theUserData;
48    }
49  
50    /** Gets the user data of this instance.
51     *  @return the object which is user data
52     */
53    public Object getUserData(){
54      return userData;
55    }
56  
57    public void setDifferentFrom(OInstance theIndividual){
58      System.out.println("setDifferentFrom not supported yet");
59    }
60  
61    public Set getDifferentFrom(){
62      System.out.println("getDifferentFrom not supported yet");
63      return null;
64    }
65  
66    public void setPropertyValue(Property theProperty, Object theValue){
67      System.out.println("setPropertyValue not supported yet");
68    }
69  
70    public Object getPropertyValue(Property theProperty){
71      System.out.println("getPropertyValue not supported yet");
72      return null;
73    }
74  
75    public void setSameIndividualAs(OInstance theIndividual){
76      System.out.println("setSameIndividualAs not supported yet");
77    }
78  
79    public Set getSameIndividualAs(){
80      System.out.println("getSameIndividualAs not supported yet");
81      return null;
82    }
83  
84  
85  }