1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package nl.tudelft.goal.emohawk.translators;
21
22
23 import cz.cuni.amis.pogamut.emohawk.agent.module.sensomotoric.Place;
24 import eis.eis2java.exception.TranslationException;
25 import eis.eis2java.translation.Java2Parameter;
26 import eis.eis2java.translation.Translator;
27 import eis.iilang.Identifier;
28 import eis.iilang.Numeral;
29 import eis.iilang.Parameter;
30
31 public class PlaceTranslator implements Java2Parameter<Place> {
32
33 @Override
34 public Parameter[] translate(Place o) throws TranslationException {
35 return new Parameter[] {
36 new Identifier(o.name().toLowerCase()),
37 Translator.getInstance().translate2Parameter(o.getPlaceLocation())[0],
38 new Numeral(o.getPlaceRadius()) };
39 }
40
41 @Override
42 public Class<? extends Place> translatesFrom() {
43 return Place.class;
44 }
45
46 }