Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
package org.etsi.mts.tdl.execution.java.rt.core;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
import org.etsi.mts.tdl.execution.java.tri.Data;
import org.etsi.mts.tdl.execution.java.tri.ElementAnnotation;
import org.etsi.mts.tdl.execution.java.tri.Mapping;
import org.etsi.mts.tdl.execution.java.tri.Type;
import org.etsi.mts.tdl.execution.java.tri.Value;
public class ValueImpl extends Value implements TriImpl<ValueImpl, Data<Type, Value>> {
private TypeImpl type;
private boolean collection = false;
private boolean structure = false;
private Object value = null;
private Map<String, Data<Type, Value>> parameters = new Hashtable<String, Data<Type, Value>>();
private List<Data<Type, Value>> items = new ArrayList<Data<Type, Value>>();
private MappingImpl mapping;
public ValueImpl() {
}
public ValueImpl(TypeImpl type) {
this.type = type;
}
public ValueImpl setType(TypeImpl type) {
this.type = type;
return this;
}
public ValueImpl setIsCollection(boolean collection) {
this.collection = collection;
return this;
}
public ValueImpl setIsStructure(boolean structure) {
this.structure = structure;
return this;
}
@Override
public boolean isCollection() {
return this.collection;
}
@Override
public boolean isStructure() {
return this.structure;
}
public ValueImpl setMapping(Mapping mapping) {
this.mapping = (MappingImpl) mapping;
return this;
}
@Override
public MappingImpl getMapping() {
return mapping;
}
@Override
public Object getValue() {
return this.value;
}
public ValueImpl setValue(Object value) {
this.value = value;
return this;
}
@Override
public Collection<String> getParameters() {
return this.parameters.keySet();
}
@Override
public Data<Type, Value> getParameter(String name) {
return this.parameters.get(name);
}
@Override
public ValueImpl setParameter(String name, Data<Type, Value> value) {
this.parameters.put(name, value);
return this;
}
@Override
public List<Data<Type, Value>> getItems() {
return this.items;
}
public ValueImpl addItem(Data<Type, Value> item) {
this.items.add(item);
return this;
}
public ValueImpl setItems(List<Data<Type, Value>> items) {
this.items = items;
return this;
}
@Override
public ValueImpl setName(String name, String qualifiedName) {
this.name = name;
this.qualifiedName = qualifiedName;
return this;
}
@Override
public ValueImpl addAnnotation(String key, String value) {
this.annotations.add(new ElementAnnotation(key, value));
return this;
}
public Data<Type, Value> asData() {
return new Data<Type, Value>(type, this);
}
}