private static boolean equalPNValues(String v1, String v2) { return new PersonName(v1, true).equals(new PersonName(v2, true)); }
private void startPersonName(int number) { startValue(number); pn = new PersonName(); }
private static boolean containsPNValue(Object v) { return v != Value.NULL && !new PersonName((String) v, true).isEmpty(); }
private void writePersonName(String s) { PersonName pn = new PersonName(s, true); gen.writeStartObject(); writePNGroup("Alphabetic", pn, PersonName.Group.Alphabetic); writePNGroup("Ideographic", pn, PersonName.Group.Ideographic); writePNGroup("Phonetic", pn, PersonName.Group.Phonetic); gen.writeEnd(); }
switch (vr) { case PN: keyVal = new PersonName(keyVals[0]).toString(); break; case DA: continue; if (vr == VR.PN) val = new PersonName(val).toString(); if (pattern.matcher(val).matches()) return true; continue; if (vr == VR.PN) val = new PersonName(val).toString(); if (ignoreCase ? keyVal.equalsIgnoreCase(val) : keyVal.equals(val))
private void writeValues(VR vr, Object val, boolean bigEndian, SpecificCharacterSet cs) throws SAXException { if (vr.isStringType()) val = vr.toStrings(val, bigEndian, cs); int vm = vr.vmOf(val); for (int i = 0; i < vm; i++) { String s = vr.toString(val, bigEndian, i, null); addAttribute("number", Integer.toString(i + 1)); if (vr == VR.PN) { PersonName pn = new PersonName(s, true); startElement("PersonName"); writePNGroup("Alphabetic", pn, PersonName.Group.Alphabetic); writePNGroup("Ideographic", pn, PersonName.Group.Ideographic); writePNGroup("Phonetic", pn, PersonName.Group.Phonetic); endElement("PersonName"); } else { writeElement("Value", s); } } }