1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.apache.ws.scout.registry.infomodel; |
18 | |
|
19 | |
import javax.xml.registry.JAXRException; |
20 | |
import javax.xml.registry.LifeCycleManager; |
21 | |
import javax.xml.registry.infomodel.ClassificationScheme; |
22 | |
import javax.xml.registry.infomodel.Concept; |
23 | |
import javax.xml.registry.infomodel.RegistryObject; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
public class ClassificationImpl extends RegistryObjectImpl |
33 | |
implements javax.xml.registry.infomodel.Classification |
34 | |
{ |
35 | |
|
36 | 0 | private ClassificationScheme scheme = new ClassificationSchemeImpl(null); |
37 | 0 | private Concept concept = new ConceptImpl(null); |
38 | 0 | private boolean external = false; |
39 | |
private String value; |
40 | |
|
41 | 0 | private RegistryObject classfiedobj = null; |
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
public ClassificationImpl(LifeCycleManager lifeCycleManager) |
47 | |
{ |
48 | 0 | super(lifeCycleManager); |
49 | 0 | } |
50 | |
|
51 | |
public ClassificationScheme getClassificationScheme() |
52 | |
throws JAXRException |
53 | |
{ |
54 | 0 | return scheme; |
55 | |
} |
56 | |
|
57 | |
public RegistryObject getClassifiedObject() throws JAXRException |
58 | |
{ |
59 | 0 | return classfiedobj; |
60 | |
} |
61 | |
|
62 | |
public Concept getConcept() throws JAXRException |
63 | |
{ |
64 | 0 | return concept; |
65 | |
} |
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
public String getValue() throws JAXRException |
75 | |
{ |
76 | 0 | if (isExternal()) { |
77 | 0 | return value; |
78 | |
} |
79 | |
else { |
80 | 0 | return concept.getValue(); |
81 | |
} |
82 | |
} |
83 | |
|
84 | |
public void setExternal(boolean b) { |
85 | 0 | this.external = b; |
86 | 0 | } |
87 | |
|
88 | |
public boolean isExternal() throws JAXRException |
89 | |
{ |
90 | 0 | return external; |
91 | |
} |
92 | |
|
93 | |
public void setClassificationScheme(ClassificationScheme cscheme) |
94 | |
throws JAXRException |
95 | |
{ |
96 | 0 | scheme = cscheme; |
97 | |
|
98 | |
|
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | 0 | ((ClassificationSchemeImpl) scheme).setExternal(isExternal()); |
104 | 0 | } |
105 | |
|
106 | |
public void setClassifiedObject(RegistryObject registryObject) |
107 | |
throws JAXRException |
108 | |
{ |
109 | 0 | classfiedobj = registryObject; |
110 | 0 | } |
111 | |
|
112 | |
public void setConcept(Concept cpt) throws JAXRException |
113 | |
{ |
114 | 0 | concept = cpt; |
115 | 0 | } |
116 | |
|
117 | |
public void setValue(String str) throws JAXRException |
118 | |
{ |
119 | 0 | value = str; |
120 | 0 | } |
121 | |
|
122 | |
} |