test_class.declarator: eventMapper
test_class.modifier: @Autowired
      public
test_class.original_string: @Autowired
      public EventMapper eventMapper;
test_class.type: EventMapper
test_class.var_name: eventMapper
test_class.file: cepheus-cep/src/test/java/com/orange/cepheus/cep/EventMapperTest.java
test_class.identifier: EventMapperTest
test_case.body: @Test
      public void testEsperTypes() {
          EventType e = new EventType("ID", "TYPE", false);
          e.addAttribute(new Attribute("1", "string"));
          e.addAttribute(new Attribute("2", "double"));
          e.addAttribute(new Attribute("3", "int"));
          e.addAttribute(new Attribute("4", "float"));
          e.addAttribute(new Attribute("5", "boolean"));
          e.addAttribute(new Attribute("6", "XXXX"));
          e.addAttribute(new Attribute("7", "long"));
          e.addAttribute(new Attribute("8", "date"));
          e.addAttribute(new Attribute("9", "geo:point"));
  
          Map<String, Object> map = eventMapper.esperTypeFromEventType(e);
  
          assertEquals(String.class, map.get("id"));
          assertEquals(String.class, map.get("1"));
          assertEquals(double.class, map.get("2"));
          assertEquals(int.class, map.get("3"));
          assertEquals(float.class, map.get("4"));
          assertEquals(boolean.class, map.get("5"));
          assertEquals(long.class, map.get("7"));
          assertEquals(Date.class, map.get("8"));
          assertEquals(Geometry.class, map.get("9"));
      }
test_case.class_method_signature: EventMapperTest.testEsperTypes()
test_case.full_signature: @Test public void testEsperTypes()
test_case.identifier: testEsperTypes
test_case.invocations: addAttribute addAttribute addAttribute addAttribute addAttribute addAttribute addAttribute addAttribute addAttribute esperTypeFromEventType assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEsperTypes()
focal_class.declarator: jsonpaths = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String, JsonPath> jsonpaths = new HashMap<>();
focal_class.type: Map<String, JsonPath>
focal_class.var_name: jsonpaths
focal_class.declarator: iso8691DateFormat = new ISO8601DateFormat()
focal_class.modifier: private
focal_class.original_string: private ISO8601DateFormat iso8691DateFormat = new ISO8601DateFormat();
focal_class.type: ISO8601DateFormat
focal_class.var_name: iso8691DateFormat
focal_class.file: cepheus-cep/src/main/java/com/orange/cepheus/cep/EventMapper.java
focal_class.identifier: EventMapper
focal_class.class_method_signature: EventMapper.setConfiguration(Configuration configuration)
focal_class.full_signature: public void setConfiguration(Configuration configuration)
focal_class.identifier: setConfiguration
focal_class.modifiers: public
focal_class.parameters: (Configuration configuration)
focal_class.return: void
focal_class.signature: void setConfiguration(Configuration configuration)
focal_class.class_method_signature: EventMapper.esperTypeFromEventType(EventType eventType)
focal_class.full_signature: public Map<String, Object> esperTypeFromEventType(EventType eventType)
focal_class.identifier: esperTypeFromEventType
focal_class.modifiers: public
focal_class.parameters: (EventType eventType)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> esperTypeFromEventType(EventType eventType)
focal_class.class_method_signature: EventMapper.eventFromContextElement(ContextElement contextElement)
focal_class.full_signature: public Event eventFromContextElement(ContextElement contextElement)
focal_class.identifier: eventFromContextElement
focal_class.modifiers: public
focal_class.parameters: (ContextElement contextElement)
focal_class.return: Event
focal_class.signature: Event eventFromContextElement(ContextElement contextElement)
focal_class.class_method_signature: EventMapper.contextElementFromEvent(EventBean eventBean, EventType eventType)
focal_class.full_signature: public ContextElement contextElementFromEvent(EventBean eventBean, EventType eventType)
focal_class.identifier: contextElementFromEvent
focal_class.modifiers: public
focal_class.parameters: (EventBean eventBean, EventType eventType)
focal_class.return: ContextElement
focal_class.signature: ContextElement contextElementFromEvent(EventBean eventBean, EventType eventType)
focal_class.class_method_signature: EventMapper.attributeValueFromEventProperty(Object value, String type)
focal_class.full_signature: public Object attributeValueFromEventProperty(Object value, String type)
focal_class.identifier: attributeValueFromEventProperty
focal_class.modifiers: public
focal_class.parameters: (Object value, String type)
focal_class.return: Object
focal_class.signature: Object attributeValueFromEventProperty(Object value, String type)
focal_class.class_method_signature: EventMapper.classForType(String attributeType)
focal_class.full_signature: private Class classForType(String attributeType)
focal_class.identifier: classForType
focal_class.modifiers: private
focal_class.parameters: (String attributeType)
focal_class.return: Class
focal_class.signature: Class classForType(String attributeType)
focal_class.class_method_signature: EventMapper.valueForType(Object value, String type, String name)
focal_class.full_signature: private Object valueForType(Object value, String type, String name)
focal_class.identifier: valueForType
focal_class.modifiers: private
focal_class.parameters: (Object value, String type, String name)
focal_class.return: Object
focal_class.signature: Object valueForType(Object value, String type, String name)
focal_class.class_method_signature: EventMapper.valueForString(String value, String type, String name)
focal_class.full_signature: private Object valueForString(String value, String type, String name)
focal_class.identifier: valueForString
focal_class.modifiers: private
focal_class.parameters: (String value, String type, String name)
focal_class.return: Object
focal_class.signature: Object valueForString(String value, String type, String name)
focal_method.body: public Map<String, Object> esperTypeFromEventType(EventType eventType) {
          // Add all metadata
          Map<String, Object> properties = new HashMap<>();
          for (Attribute attribute : eventType.getAttributes()) {
              // For metadata, join with attribute name using a '_'
              for (Metadata meta : attribute.getMetadata()) {
                  properties.put(attribute.getName() + "_" + meta.getName(), classForType(meta.getType()));
              }
          }
          // Override with event type properties, plus the reserved id attribute
          for (Attribute attribute : eventType.getAttributes()) {
              properties.put(attribute.getName(), classForType(attribute.getType()));
          }
          properties.put("id", String.class);
          return properties;
      }
focal_method.class_method_signature: EventMapper.esperTypeFromEventType(EventType eventType)
focal_method.full_signature: public Map<String, Object> esperTypeFromEventType(EventType eventType)
focal_method.identifier: esperTypeFromEventType
focal_method.invocations: getAttributes getMetadata put getName getName classForType getType getAttributes put getName classForType getType put
focal_method.modifiers: public
focal_method.parameters: (EventType eventType)
focal_method.return: Map<String, Object>
focal_method.signature: Map<String, Object> esperTypeFromEventType(EventType eventType)