-
Notifications
You must be signed in to change notification settings - Fork 4
/
GamaBDIPlanConverter.java
36 lines (28 loc) · 1.11 KB
/
GamaBDIPlanConverter.java
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
package ummisco.gama.serializer.gamaType.converters;
import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import msi.gaml.architecture.simplebdi.BDIPlan;
import ummisco.gama.dev.utils.DEBUG;
public class GamaBDIPlanConverter implements Converter {
ConverterScope convertScope;
public GamaBDIPlanConverter(final ConverterScope s) {
convertScope = s;
}
@Override
public boolean canConvert(final Class arg0) {
return BDIPlan.class.isAssignableFrom(arg0);
}
@Override
public void marshal(Object arg0, HierarchicalStreamWriter arg1, MarshallingContext arg2) {
final BDIPlan plan = (BDIPlan) arg0;
DEBUG.OUT("ConvertAnother : BDIPlan " + plan.getClass() + " " + plan.getGamlType().getContentType());
DEBUG.OUT("END --- ConvertAnother : BDIPlan ");
}
@Override
public Object unmarshal(HierarchicalStreamReader arg0, UnmarshallingContext arg1) {
return null;
}
}