This project has retired. For details please refer to its
Attic page.
ClassificationSchemeImpl xref
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 java.util.ArrayList;
20 import java.util.Collection;
21 import java.util.Iterator;
22
23 import javax.xml.registry.JAXRException;
24 import javax.xml.registry.LifeCycleManager;
25 import javax.xml.registry.UnsupportedCapabilityException;
26 import javax.xml.registry.infomodel.ClassificationScheme;
27 import javax.xml.registry.infomodel.Concept;
28
29
30
31
32
33
34
35
36 public class ClassificationSchemeImpl
37 extends RegistryEntryImpl
38 implements ClassificationScheme
39 {
40
41 private Collection<Concept> childConcepts = new ArrayList<Concept>();
42
43
44
45 private boolean external = false;
46
47
48
49
50 public ClassificationSchemeImpl(LifeCycleManager lifeCycleManager)
51 {
52 super(lifeCycleManager);
53 }
54
55 public void addChildConcept(Concept concept)
56 throws JAXRException
57 {
58 childConcepts.add(concept);
59 }
60
61 public void addChildConcepts(Collection collection)
62 throws JAXRException
63 {
64 childConcepts.addAll(collection);
65 }
66
67 public int getChildConceptCount()
68 throws JAXRException
69 {
70 return childConcepts.size();
71 }
72
73 public Collection getChildrenConcepts() throws JAXRException
74 {
75 return childConcepts;
76 }
77
78 public Collection getDescendantConcepts() throws JAXRException
79 {
80 Collection<Concept> coll = new ArrayList<Concept>();
81 Iterator iter = childConcepts.iterator();
82 while(iter != null && iter.hasNext())
83 {
84 ConceptImpl../../../../../../org/apache/ws/scout/registry/infomodel/ConceptImpl.html#ConceptImpl">ConceptImpl c = (ConceptImpl)iter.next();
85 coll.add(c);
86 coll.addAll(c.getDescendantConcepts());
87 }
88 return coll;
89 }
90
91 public int getValueType()
92 throws JAXRException
93 {
94
95
96
97
98 throw new UnsupportedCapabilityException();
99 }
100
101 protected void setExternal(boolean b) {
102 this.external = b;
103 }
104
105 public boolean isExternal() throws JAXRException
106 {
107 return this.external;
108 }
109
110 public void removeChildConcept(Concept concept)
111 throws JAXRException
112 {
113 this.childConcepts.remove(concept);
114 }
115
116 public void removeChildConcepts(Collection collection)
117 throws JAXRException
118 {
119 this.childConcepts.removeAll(collection);
120 }
121
122 public void setValueType(int param)
123 throws JAXRException
124 {
125
126
127
128
129 throw new UnsupportedCapabilityException();
130 }
131
132 }