1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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.*;
28 import org.wsmo.common.Identifier;
29 import org.wsmo.common.exception.InvalidModelException;
30
31 public class InstanceModel extends EntityModel {
32
33 public InstanceModel(Instance delegate) {
34 super(delegate);
35 }
36
37 public Instance getInstance() {
38 return (Instance)getAdapter(Instance.class);
39 }
40
41 public void addAttributeValue(Identifier attr, Value val)
42 throws InvalidModelException {
43 getInstance().addAttributeValue(attr, val);
44 setChanged();
45 }
46
47 public void addConcept(Concept superConcept)
48 throws InvalidModelException {
49 getInstance().addConcept(superConcept);
50 setChanged();
51 }
52
53 public void removeAttributeValue(Identifier attr, Value val)
54 throws InvalidModelException {
55 getInstance().removeAttributeValue(attr, val);
56 setChanged();
57 }
58
59 public void removeAttributeValues(Identifier attr)
60 throws InvalidModelException {
61 getInstance().removeAttributeValues(attr);
62 setChanged();
63 }
64
65 public void removeConcept(Concept superConcept)
66 throws InvalidModelException {
67 getInstance().removeConcept(superConcept);
68 setChanged();
69 }
70
71 }
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88