Package net.sourceforge.cardme.vcard.types

Examples of net.sourceforge.cardme.vcard.types.VersionType


   * @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) {
View Full Code Here

TOP

Related Classes of net.sourceforge.cardme.vcard.types.VersionType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.