private static String[] deflateLabels(AccumuloNameSubstitutionStrategy nameSubstitutionStrategy, String[] labels) { if (labels == null) { return null; } String[] results = new String[labels.length]; for (int i = 0; i < labels.length; i++) { String label = labels[i]; results[i] = nameSubstitutionStrategy.deflate(label); } return results; }
private static String[] deflateLabels(AccumuloNameSubstitutionStrategy nameSubstitutionStrategy, String[] labels) { if (labels == null) { return null; } String[] results = new String[labels.length]; for (int i = 0; i < labels.length; i++) { String label = labels[i]; results[i] = nameSubstitutionStrategy.deflate(label); } return results; }
private ImmutableSet<String> deflate(ImmutableSet<String> strings) { if (strings == null) { return null; } return ImmutableSet.copyOf( strings.stream() .map(s -> getNameSubstitutionStrategy().deflate(s)) .collect(Collectors.toSet()) ); }
private ImmutableSet<String> deflate(ImmutableSet<String> strings) { if (strings == null) { return null; } return ImmutableSet.copyOf( strings.stream() .map(s -> getNameSubstitutionStrategy().deflate(s)) .collect(Collectors.toSet()) ); }
private ImmutableSet<ByteSequence> deflateByteSequences(ImmutableSet<String> strings) { if (strings == null) { return null; } return ImmutableSet.copyOf( strings.stream() .map(s -> new ArrayByteSequence(getNameSubstitutionStrategy().deflate(s))) .collect(Collectors.toSet()) ); }
org.vertexium.accumulo.iterator.model.EdgeInfo edgeInfo = new EdgeInfo(getGraph().getNameSubstitutionStrategy().deflate(LABEL_LABEL1), "v2"); assertEquals(new Key(new Text("v1"), AccumuloVertex.CF_OUT_EDGE, new Text("e1"), new Text("a"), 100L), pair.getKey()); assertEquals(edgeInfo.toValue(), pair.getValue()); edgeInfo = new EdgeInfo(getGraph().getNameSubstitutionStrategy().deflate(LABEL_LABEL1), "v1"); assertEquals(new Key(new Text("v2"), AccumuloVertex.CF_IN_EDGE, new Text("e1"), new Text("a"), 100L), pair.getKey()); assertEquals(edgeInfo.toValue(), pair.getValue());