private void copyBusinessData(VCard card, Map<String, Object> contact) { for (Title title : card.getTitles()) { if (title.getValue() == null) { continue; } // This can loose data but there are only two title types in MS contacts if (title.getType() != null && title.getType().equalsIgnoreCase("home")) { safeSet("title", card.getTitles(), contact); } else { safeSet("jobTitle", card.getTitles(), contact); } } // This can loose data but there is only one company name in MS contacts for (Organization organization : card.getOrganizations()) { for (String orgName : organization.getValues()) { contact.put("companyName", orgName); } } for (Expertise expertise : card.getExpertise()) { if (expertise.getValue() == null) { continue; } contact.put("profession", expertise.getValue()); // only set first one break; } }
@Override public Expertise copy() { return new Expertise(this); } }
@Override protected Expertise _parseValue(String value) { return new Expertise(value); } }
/** * <p> * Adds a professional subject area that the person is knowledgeable in. * </p> * <p> * <b>Property name:</b> {@code EXPERTISE}<br> * <b>Supported versions:</b> {@code 4.0} * </p> * @param expertise the professional subject area to add (e.g. * "programming") * @return the property object that was created * @see <a href="http://tools.ietf.org/html/rfc6715#page-3">RFC 6715 p.3</a> */ public Expertise addExpertise(String expertise) { Expertise type = new Expertise(expertise); addExpertise(type); return type; }