private void addAttributes(int tag, VR vr, String privateCreator) { if (privateCreator != null) tag &= 0xffff00ff; if (includeKeyword) { String keyword = ElementDictionary.keywordOf(tag, privateCreator); if (keyword != null && !keyword.isEmpty()) addAttribute("keyword", keyword); } addAttribute("tag", TagUtils.toHexString(tag)); if (privateCreator != null) addAttribute("privateCreator", privateCreator); addAttribute("vr", vr.name()); }
private void writeAttribute(int tag, VR vr, Object value, SpecificCharacterSet cs, Attributes attrs) { if (TagUtils.isGroupLength(tag)) return; gen.writeStartObject(TagUtils.toHexString(tag)); gen.write("vr", vr.name()); if (value instanceof Value) writeValue((Value) value, attrs.bigEndian()); else writeValue(vr, value, attrs.bigEndian(), attrs.getSpecificCharacterSet(vr), true); gen.writeEnd(); }
} else { gen.writeStartObject(TagUtils.toHexString(tag)); gen.write("vr", vr.name()); if (vr == VR.SQ || len == -1) { hasItems.addLast(false);