1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.oodt.pcs.input;
17
18
19 import java.util.HashMap;
20 import java.util.Map;
21
22
23
24
25
26
27
28
29
30
31
32 public class PGEGroup {
33
34
35 private String name = null;
36
37
38 private Map<String, PGEScalar> scalars = null;
39
40
41 private Map<String, PGEVector> vectors = null;
42
43
44 private Map<String, PGEMatrix> matrixs = null;
45
46
47 private Map<String, PGEGroup> groups = null;
48
49
50
51
52
53
54 public PGEGroup(String name) {
55 this.name = name;
56 this.scalars = new HashMap<String, PGEScalar>();
57 this.vectors = new HashMap<String, PGEVector>();
58 this.matrixs = new HashMap<String, PGEMatrix>();
59 this.groups = new HashMap<String, PGEGroup>();
60 }
61
62
63
64
65 public String getName() {
66 return name;
67 }
68
69
70
71
72
73 public void setName(String name) {
74 this.name = name;
75 }
76
77
78
79
80 public Map<String, PGEScalar> getScalars() {
81 return scalars;
82 }
83
84
85
86
87
88 public void setScalars(Map<String, PGEScalar> scalars) {
89 this.scalars = scalars;
90 }
91
92
93
94
95 public Map<String, PGEVector> getVectors() {
96 return vectors;
97 }
98
99
100
101
102
103 public void setVectors(Map<String, PGEVector> vectors) {
104 this.vectors = vectors;
105 }
106
107
108
109
110 public Map<String, PGEMatrix> getMatrixs() {
111 return matrixs;
112 }
113
114
115
116
117
118 public void setMatrixs(Map<String, PGEMatrix> matrixs) {
119 this.matrixs = matrixs;
120 }
121
122
123
124
125 public Map<String, PGEGroup> getGroups() {
126 return groups;
127 }
128
129
130
131
132
133 public void setGroups(Map<String, PGEGroup> groups) {
134 this.groups = groups;
135 }
136
137 public void addScalar(PGEScalar scalar) {
138 if (this.scalars != null && !this.scalars.containsKey(scalar.getName())) {
139 this.scalars.put(scalar.getName(), scalar);
140 }
141 }
142
143 public void addVector(PGEVector vector) {
144 if (this.vectors != null && !this.vectors.containsKey(vector.getName())) {
145 this.vectors.put(vector.getName(), vector);
146 }
147 }
148
149 public void addMatrix(PGEMatrix matrix) {
150 if (this.matrixs != null && !this.matrixs.containsKey(matrix.getName())) {
151 this.matrixs.put(matrix.getName(), matrix);
152 }
153 }
154
155 public PGEScalar getScalar(String name) {
156 if (this.scalars != null) {
157 return this.scalars.get(name);
158 } else
159 return null;
160 }
161
162 public PGEVector getVector(String name) {
163 if (this.vectors != null) {
164 return this.vectors.get(name);
165 } else
166 return null;
167 }
168
169 public PGEMatrix getMatrix(String name) {
170 if (this.matrixs != null) {
171 return this.matrixs.get(name);
172 } else
173 return null;
174 }
175
176 public PGEGroup getGroup(String name) {
177 if (this.groups != null) {
178 return this.groups.get(name);
179 } else
180 return null;
181 }
182
183 public int getNumScalars() {
184 if (this.scalars != null) {
185 return this.scalars.size();
186 } else
187 return 0;
188 }
189
190 public int getNumVectors() {
191 if (this.vectors != null) {
192 return this.vectors.size();
193 } else
194 return 0;
195 }
196
197 public int getNumMatrixs() {
198 if (this.matrixs != null) {
199 return this.matrixs.size();
200 } else
201 return 0;
202 }
203
204 public int getNumGroups() {
205 if (this.groups != null) {
206 return this.groups.size();
207 } else
208 return 0;
209 }
210
211 }