Package com.linkedin.data

Examples of com.linkedin.data.DataMap.keySet()


    }
    if (i == _path.size())
    {
      if (i >= _patchedPath.length)
      {
        for (String keys : currentOpMap.keySet())
        {
          if (keys.startsWith(PatchConstants.COMMAND_PREFIX))
          {
            status = Status.IS_CHILD_MODIFIED;
            break;
View Full Code Here


      {
        Assert.assertTrue(memberKeys.contains(nullMemberKey));
        continue;
      }

      final String key = value.keySet().iterator().next();
      Assert.assertTrue(memberKeys.contains(key));
    }
  }

  @Test
View Full Code Here

      final JacksonDataCodec codec = new JacksonDataCodec(jsonFactory);
      // make sure intern field names is not enabled
      assertFalse(jsonFactory.isEnabled(JsonFactory.Feature.INTERN_FIELD_NAMES));
      assertTrue(jsonFactory.isEnabled(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES));
      final DataMap map = codec.bytesToMap(jsonAsBytes);
      final String key = map.keySet().iterator().next();
      assertNotSame(key, keyName);
    }

    {
      final JsonFactory jsonFactory = new JsonFactory();
View Full Code Here

      // enable intern field names
      jsonFactory.enable(JsonFactory.Feature.INTERN_FIELD_NAMES);
      assertTrue(jsonFactory.isEnabled(JsonFactory.Feature.INTERN_FIELD_NAMES));
      assertTrue(jsonFactory.isEnabled(JsonFactory.Feature.CANONICALIZE_FIELD_NAMES));
      final DataMap map = codec.bytesToMap(jsonAsBytes);
      final String key = map.keySet().iterator().next();
      assertSame(key, keyName);
    }
  }

  /**
 
View Full Code Here

    }
    jsonBuilder.append("\":0}");

    final JacksonDataCodec codec = new JacksonDataCodec();
    final DataMap map = codec.bytesToMap(jsonBuilder.toString().getBytes());
    Assert.assertEquals(map.keySet().iterator().next().length(), 262146);
  }
}
View Full Code Here

    final DataMap inputErrors = dataMap.containsKey(BatchResponse.ERRORS) ? dataMap.getDataMap(BatchResponse.ERRORS)
                                                                          : new DataMap();

    final Set<String> mergedKeys = new HashSet<String>(inputResults.keySet());
    mergedKeys.addAll(inputStatuses.keySet());
    mergedKeys.addAll(inputErrors.keySet());

    for (String key : mergedKeys)
    {
      final DataMap entityResponseData = new DataMap();
View Full Code Here

                                                                            : new DataMap();
    final DataMap inputErrors = dataMap.containsKey(BatchResponse.ERRORS) ? dataMap.getDataMap(BatchResponse.ERRORS)
                                                                          : new DataMap();

    final Set<String> mergedKeys = new HashSet<String>(inputResults.keySet());
    mergedKeys.addAll(inputErrors.keySet());

    for (String key : mergedKeys)
    {
      final DataMap updateData;
View Full Code Here

        }
      }
      else if (f.equals(PatchConstants.SET_COMMAND))
      {
        DataMap setFields = (DataMap)v;
        Set<String> setFieldNames = setFields.keySet();
        List<String> toRemove = new LinkedList<String>();
        DataMap filteredSetFields = new DataMap();
        for (String setFieldName: setFieldNames)
        {
          if (projected.containsKey(setFieldName))
View Full Code Here

      {
        DataMap dataMap = (DataMap) obj;
        stringBuilder.append(URIConstants.OBJ_START);
        if (!dataMap.isEmpty())
        {
          List<String> keys = new ArrayList<String>(dataMap.keySet());
          Collections.sort(keys);
          ListIterator<String> iterator = keys.listIterator();

          String currentKey = iterator.next();
          mapEncodingHelper(currentKey, dataMap.get(currentKey), escaping, componentType, stringBuilder);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.