Package com.linkedin.data.codec

Examples of com.linkedin.data.codec.JacksonDataCodec$Location


{
  protected boolean debug = false;

  public Object jsonToObject(String s) throws IOException
  {
    JacksonDataCodec codec = new JacksonDataCodec();
    String input = "{ \"key\" : " + s + " }";
    DataMap map = TestUtil.dataMapFromString(input);
    return map.get("key");
  }
View Full Code Here


  @Test
  public void run() throws IOException
  {
    DataCodec codecs[] = {
      new JacksonDataCodec(),
      new PsonDataCodec().setOptions(new PsonDataCodec.Options().setEncodeCollectionCount(false).setEncodeStringLength(false)),
      new PsonDataCodec().setOptions(new PsonDataCodec.Options().setEncodeCollectionCount(false).setEncodeStringLength(true)),
      new PsonDataCodec().setOptions(new PsonDataCodec.Options().setEncodeCollectionCount(true).setEncodeStringLength(false)),
      new PsonDataCodec().setOptions(new PsonDataCodec.Options().setEncodeCollectionCount(true).setEncodeStringLength(true)),
    };
View Full Code Here

    er.setServiceErrorCode(appCode);

    final byte[] mapBytes;
    try
    {
      mapBytes = new JacksonDataCodec().mapToBytes(er.data());
    }
    catch (final IOException e)
    {
      throw new RuntimeException(e);
    }
View Full Code Here

    final TestRecord record = new TestRecord().setId(id);

    byte[] mapBytes;
    try
    {
      mapBytes = new JacksonDataCodec().mapToBytes(record.data());
    }
    catch (final IOException e)
    {
      throw new RuntimeException(e);
    }
View Full Code Here

    er.setServiceErrorCode(appCode);

    byte[] mapBytes;
    try
    {
      mapBytes = new JacksonDataCodec().mapToBytes(er.data());
    }
    catch (IOException e)
    {
      throw new RuntimeException(e);
    }
View Full Code Here

  @Test(enabled = false)
  public void testShouldSetAndGetLocation() {
    //driver.get(pages.html5Page);

    LocationContext d = (LocationContext) new Augmenter().augment(driver);
    Location loc = new Location(40.714353, -74.005973, 0.056747);

    d.setLocation(loc);

    //driver.manage().timeouts().implicitlyWait(2000, MILLISECONDS);
View Full Code Here

          Map<Object, Object> map =
              (Map<Object, Object>) executeMethod.execute(DriverCommand.GET_LOCATION, null);
          double latitude = Long.valueOf((Long) map.get("latitude")).doubleValue();
          double longitude = Long.valueOf((Long) map.get("longitude")).doubleValue();
          double altitude = Long.valueOf((Long) map.get("altitude")).doubleValue();
          return new Location(latitude, longitude, altitude);
        } else if ("setLocation".equals(method.getName())) {
          return executeMethod.execute(DriverCommand.SET_LOCATION, ImmutableMap.of("location", args[0]));
        }
        return null;
      }
View Full Code Here

TOP

Related Classes of com.linkedin.data.codec.JacksonDataCodec$Location

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.