@Test public void testBuildLabel() { builder.setDefaultLabel("NODE"); Map<String, Object> map = new HashMap<>(); map.put("id", "2"); Label label = builder.buildLabel(map); Assert.assertEquals("ID_2", label.name()); }
@Override public Label buildLabel(Map<String,Object> obj) { String label = defaultLabel; Object type = obj.get("id"); if(type != null) { label = "ID_"+String.valueOf(type); } return Label.label(label); }
DocumentLabelBuilderById implements DocumentLabelBuilder { @Override public Label buildLabel(Map<String,Object> obj) { String label = defaultLabel; Object type = obj.get("id"); if(type != null) { label = "ID_"+String.valueOf(type); } return Label.label(label); } }
DocumentLabelBuilderById implements DocumentLabelBuilder { @Override public Label buildLabel(Map<String,Object> obj) { String label = defaultLabel; Object type = obj.get("id"); if(type != null) { label = "ID_"+String.valueOf(type); } return Label.label(label); }  }
DocumentLabelBuilderById implements DocumentLabelBuilder { @Override public Label buildLabel(Map<String,Object> obj) { String label = defaultLabel; Object type = obj.get("id"); if(type != null) { label = "ID_"+String.valueOf(type); } return Label.label(label); }  @Override Label buildLabel(Map<String,Object> obj); @Override void setDefaultLabel(String label); }
DocumentLabelBuilderById implements DocumentLabelBuilder { @Override public Label buildLabel(Map<String,Object> obj) { String label = defaultLabel; Object type = obj.get("id"); if(type != null) { label = "ID_"+String.valueOf(type); } return Label.label(label); }  @Override Label buildLabel(Map<String,Object> obj); @Override void setDefaultLabel(String label);  }