test_class.file: fluxtream-connectors/src/test/java/org/fluxtream/connectors/google_latitude/GoogleLatitudeUpdaterTest.java
test_class.identifier: GoogleLatitudeUpdaterTest
test_case.body: @Test
      public void testParseLocation() throws Exception {
          JsonFactory jfactory = new JsonFactory();
          JsonParser jParser = jfactory.createJsonParser(new StringReader("{\n" +
                                                                          "    \"timestampMs\" : \"1376053800229\",\n" +
                                                                          "    \"latitudeE7\" : 508261000,\n" +
                                                                          "    \"longitudeE7\" : 43543660,\n" +
                                                                          "    \"accuracy\" : 10\n" +
                                                                          "  }"));
          while (jParser.nextToken()!= JsonToken.START_OBJECT);
          while (jParser.getCurrentName()==null)
              jParser.nextToken();
          GoogleLatitudeUpdater updater = new GoogleLatitudeUpdater();
          final ArrayList<LocationFacet> locations = new ArrayList<LocationFacet>();
          updater.parseLocation(null, jParser, locations);
          assertTrue(locations.size()==1);
          final LocationFacet locationFacet = locations.get(0);
          assertTrue(locationFacet.timestampMs==1376053800229l);
          assertTrue(locationFacet.latitude==50.8261000f);
          assertTrue(locationFacet.longitude==4.3543660f);
          assertTrue(locationFacet.accuracy==10);
      }
test_case.class_method_signature: GoogleLatitudeUpdaterTest.testParseLocation()
test_case.full_signature: @Test public void testParseLocation()
test_case.identifier: testParseLocation
test_case.invocations: createJsonParser nextToken getCurrentName nextToken parseLocation assertTrue size get assertTrue assertTrue assertTrue assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParseLocation()
focal_class.declarator: logger = FlxLogger.getLogger(GoogleLatitudeUpdater.class)
focal_class.original_string: FlxLogger logger = FlxLogger.getLogger(GoogleLatitudeUpdater.class);
focal_class.type: FlxLogger
focal_class.var_name: logger
focal_class.declarator: apiDataService
focal_class.modifier: @Autowired
focal_class.original_string: @Autowired
      ApiDataService apiDataService;
focal_class.type: ApiDataService
focal_class.var_name: apiDataService
focal_class.file: fluxtream-connectors/src/main/java/org/fluxtream/connectors/google_latitude/GoogleLatitudeUpdater.java
focal_class.identifier: GoogleLatitudeUpdater
focal_class.interfaces: implements FileUploadSupport
focal_class.class_method_signature: GoogleLatitudeUpdater.GoogleLatitudeUpdater()
focal_class.full_signature: public  GoogleLatitudeUpdater()
focal_class.identifier: GoogleLatitudeUpdater
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  GoogleLatitudeUpdater()
focal_class.class_method_signature: GoogleLatitudeUpdater.updateConnectorDataHistory(UpdateInfo updateInfo)
focal_class.full_signature: @Override public void updateConnectorDataHistory(UpdateInfo updateInfo)
focal_class.identifier: updateConnectorDataHistory
focal_class.modifiers: @Override public
focal_class.parameters: (UpdateInfo updateInfo)
focal_class.return: void
focal_class.signature: void updateConnectorDataHistory(UpdateInfo updateInfo)
focal_class.class_method_signature: GoogleLatitudeUpdater.updateConnectorData(UpdateInfo updateInfo)
focal_class.full_signature: public void updateConnectorData(UpdateInfo updateInfo)
focal_class.identifier: updateConnectorData
focal_class.modifiers: public
focal_class.parameters: (UpdateInfo updateInfo)
focal_class.return: void
focal_class.signature: void updateConnectorData(UpdateInfo updateInfo)
focal_class.class_method_signature: GoogleLatitudeUpdater.setDefaultChannelStyles(ApiKey apiKey)
focal_class.full_signature: @Override public void setDefaultChannelStyles(ApiKey apiKey)
focal_class.identifier: setDefaultChannelStyles
focal_class.modifiers: @Override public
focal_class.parameters: (ApiKey apiKey)
focal_class.return: void
focal_class.signature: void setDefaultChannelStyles(ApiKey apiKey)
focal_class.class_method_signature: GoogleLatitudeUpdater.sendServiceDiscontinuedWarning(final UpdateInfo updateInfo)
focal_class.full_signature: private void sendServiceDiscontinuedWarning(final UpdateInfo updateInfo)
focal_class.identifier: sendServiceDiscontinuedWarning
focal_class.modifiers: private
focal_class.parameters: (final UpdateInfo updateInfo)
focal_class.return: void
focal_class.signature: void sendServiceDiscontinuedWarning(final UpdateInfo updateInfo)
focal_class.class_method_signature: GoogleLatitudeUpdater.cleanupOldTokens(final UpdateInfo updateInfo)
focal_class.full_signature: private void cleanupOldTokens(final UpdateInfo updateInfo)
focal_class.identifier: cleanupOldTokens
focal_class.modifiers: private
focal_class.parameters: (final UpdateInfo updateInfo)
focal_class.return: void
focal_class.signature: void cleanupOldTokens(final UpdateInfo updateInfo)
focal_class.class_method_signature: GoogleLatitudeUpdater.importFile(final ApiKey apiKey, final File f)
focal_class.full_signature: @Override public int importFile(final ApiKey apiKey, final File f)
focal_class.identifier: importFile
focal_class.modifiers: @Override public
focal_class.parameters: (final ApiKey apiKey, final File f)
focal_class.return: int
focal_class.signature: int importFile(final ApiKey apiKey, final File f)
focal_class.class_method_signature: GoogleLatitudeUpdater.parseLocations(final ApiKey apiKey, final InputStream inputStream)
focal_class.full_signature: private int parseLocations(final ApiKey apiKey, final InputStream inputStream)
focal_class.identifier: parseLocations
focal_class.modifiers: private
focal_class.parameters: (final ApiKey apiKey, final InputStream inputStream)
focal_class.return: int
focal_class.signature: int parseLocations(final ApiKey apiKey, final InputStream inputStream)
focal_class.class_method_signature: GoogleLatitudeUpdater.persistLocations(ApiKey apiKey, List<LocationFacet> locations)
focal_class.full_signature: private boolean persistLocations(ApiKey apiKey, List<LocationFacet> locations)
focal_class.identifier: persistLocations
focal_class.modifiers: private
focal_class.parameters: (ApiKey apiKey, List<LocationFacet> locations)
focal_class.return: boolean
focal_class.signature: boolean persistLocations(ApiKey apiKey, List<LocationFacet> locations)
focal_class.class_method_signature: GoogleLatitudeUpdater.getToLocationData(final JsonParser jParser)
focal_class.full_signature: private void getToLocationData(final JsonParser jParser)
focal_class.identifier: getToLocationData
focal_class.modifiers: private
focal_class.parameters: (final JsonParser jParser)
focal_class.return: void
focal_class.signature: void getToLocationData(final JsonParser jParser)
focal_class.class_method_signature: GoogleLatitudeUpdater.parseLocation(final ApiKey apiKey, final JsonParser jParser, final List<LocationFacet> locations)
focal_class.full_signature:  void parseLocation(final ApiKey apiKey, final JsonParser jParser, final List<LocationFacet> locations)
focal_class.identifier: parseLocation
focal_class.parameters: (final ApiKey apiKey, final JsonParser jParser, final List<LocationFacet> locations)
focal_class.return: void
focal_class.signature: void parseLocation(final ApiKey apiKey, final JsonParser jParser, final List<LocationFacet> locations)
focal_class.superclass: extends AbstractUpdater
focal_method.body: void parseLocation(final ApiKey apiKey, final JsonParser jParser, final List<LocationFacet> locations) throws IOException {
          LocationFacet locationFacet = new LocationFacet();
          if (apiKey!=null) {
              locationFacet.apiKeyId = apiKey.getId();
              locationFacet.guestId = apiKey.getGuestId();
          }
  
          locationFacet.timeUpdated = System.currentTimeMillis();
          locationFacet.source = LocationFacet.Source.GOOGLE_LATITUDE;
  
          do {
              String fieldName = jParser.getCurrentName();
              final JsonToken jsonToken = jParser.nextValue();
              if (jsonToken.isScalarValue()) {
                  if (fieldName.equals("timestampMs")) {
                      long ts = Long.valueOf(jParser.getText());
                      locationFacet.timestampMs = ts;
                      locationFacet.start = ts;
                      locationFacet.end = ts;
                      locationFacet.api = 2;
                  } else if (fieldName.equals("accuracy")) {
                      int accuracy = jParser.getIntValue();
                      locationFacet.accuracy = accuracy;
                  } else if (fieldName.equals("altitude")) {
                      int altitude = jParser.getIntValue();
                      locationFacet.altitude = altitude;
                  } else if (fieldName.equals("heading")) {
                      int heading = jParser.getIntValue();
                      locationFacet.heading = heading;
                  } else if (fieldName.equals("latitudeE7")) {
                      int lat = jParser.getIntValue();
                      locationFacet.latitude = lat/1E7f;
                  } else if (fieldName.equals("longitudeE7")) {
                      int lon = jParser.getIntValue();
                      locationFacet.longitude = lon/1E7f;
                  } else if (fieldName.equals("velocity")) {
                      int speed = jParser.getIntValue();
                      locationFacet.speed = speed;
                  }
              } else {
                  final JsonNode junk = jParser.readValueAsTree();
                  logger.info("we are not interested in this junk: " + junk.toString());
              }
          } while (jParser.nextToken() != JsonToken.END_OBJECT);
          locations.add(locationFacet);
      }
focal_method.class_method_signature: GoogleLatitudeUpdater.parseLocation(final ApiKey apiKey, final JsonParser jParser, final List<LocationFacet> locations)
focal_method.full_signature:  void parseLocation(final ApiKey apiKey, final JsonParser jParser, final List<LocationFacet> locations)
focal_method.identifier: parseLocation
focal_method.invocations: getId getGuestId currentTimeMillis getCurrentName nextValue isScalarValue equals valueOf getText equals getIntValue equals getIntValue equals getIntValue equals getIntValue equals getIntValue equals getIntValue readValueAsTree info toString nextToken add
focal_method.parameters: (final ApiKey apiKey, final JsonParser jParser, final List<LocationFacet> locations)
focal_method.return: void
focal_method.signature: void parseLocation(final ApiKey apiKey, final JsonParser jParser, final List<LocationFacet> locations)