* @param vcard
* @throws VCardParseException
*/
private void parseVersionType(String group, String value, VCardImpl vcard) throws VCardParseException {
try {
VersionType versionType = new VersionType();
if(VCardVersion.V3_0.getVersion().compareTo(value) == 0) {
versionType.setVersion(VCardVersion.V3_0);
}
else if(VCardVersion.V2_1.getVersion().compareTo(value) == 0) {
versionType.setVersion(VCardVersion.V2_1);
}
else if(VCardVersion.V4_0.getVersion().compareTo(value) == 0) {
versionType.setVersion(VCardVersion.V4_0);
}
else {
throw new VCardParseException("Invalid value for \"VERSION\" type. Must be 2.1 or 3.0 or 4.0]");
}
if(group != null) {
versionType.setGroup(group);
}
vcard.setVersion(versionType);
}
catch(Exception ex) {