Examples of ExtendedParamType


Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

      String enumParamValue = paramValue.replace("-", "_").toUpperCase();
      EmailParamType emailParamType = EmailParamType.valueOf(enumParamValue);
      emailType.addParam(emailParamType);
    }
    catch(IllegalArgumentException iae) {
      ExtendedParamType xParamType = null;
      if(paramValue.indexOf('=') != -1) {
        String[] pTmp = paramValue.split("=");
        xParamType = new ExtendedParamType(pTmp[0], pTmp[1], VCardTypeName.EMAIL);
      }
      else {
        xParamType = new ExtendedParamType(paramValue, VCardTypeName.EMAIL);
      }
     
      emailType.addExtendedParam(xParamType);
    }
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

    addressType2.setPostOfficeBox("ABC567");
    addressType2.setStreetAddress("25 Green Crecent Ave.");
    addressType2.setExtendedAddress("Bla bla");
    addressType2.addParam(AdrParamType.PREF)
           .addParam(AdrParamType.HOME)
           .addExtendedParam(new ExtendedParamType("X-OFFICE", VCardTypeName.ADR));
   
    assertTrue(adrType.equals(addressType2));
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

      String enumParamValue = paramValue.replace("-", "_").toUpperCase();
      UrlParamType urlParamType = UrlParamType.valueOf(enumParamValue);
      urlType.addParam(urlParamType);
    }
    catch(IllegalArgumentException iae) {
      ExtendedParamType xParamType = null;
      if(paramValue.indexOf('=') != -1) {
        String[] pTmp = paramValue.split("=");
        xParamType = new ExtendedParamType(pTmp[0], pTmp[1], VCardTypeName.URL);
      }
      else {
        xParamType = new ExtendedParamType(paramValue, VCardTypeName.URL);
      }
     
      urlType.addExtendedParam(xParamType);
    }
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

    addressType2.setPostOfficeBox("ABC567");
    addressType2.setStreetAddress("25 Green Crecent Ave.");
    addressType2.setExtendedAddress("Bla bla");
    addressType2.addParam(AdrParamType.PREF)
           .addParam(AdrParamType.HOME)
           .addExtendedParam(new ExtendedParamType("X-OFFICE", VCardTypeName.ADR));
   
    assertTrue(adrType.compareTo(addressType2) == 0);
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

    addressType2.setPostOfficeBox("ABC567");
    addressType2.setStreetAddress("25 Green Crecent Ave.");
    addressType2.setExtendedAddress("Bla bla");
    addressType2.addParam(AdrParamType.PREF)
           .addParam(AdrParamType.HOME)
           .addExtendedParam(new ExtendedParamType("X-OFFICE", VCardTypeName.ADR));
   
    int hcode1 = adrType.hashCode();
    int hcode2 = addressType2.hashCode();
    assertEquals(hcode1, hcode2);
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

      String enumParamValue = paramValue.replace("-", "_").toUpperCase();
      ImppParamType imppParamType = ImppParamType.valueOf(enumParamValue);
      imppType.addParam(imppParamType);
    }
    catch(IllegalArgumentException iae) {
      ExtendedParamType xParamType = null;
      if(paramValue.indexOf('=') != -1) {
        String[] pTmp = paramValue.split("=");
        xParamType = new ExtendedParamType(pTmp[0], pTmp[1], VCardTypeName.IMPP);
      }
      else {
        xParamType = new ExtendedParamType(paramValue, VCardTypeName.IMPP);
      }
     
      imppType.addExtendedParam(xParamType);
    }
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

    assertTrue(extendedType.hasExtendedValue());
  }
 
  @Test
  public void testAddExtendedParam() {
    extendedType.addExtendedParam(new ExtendedParamType("X-TEST", VCardTypeName.XTENDED));
    extendedType.addExtendedParam(new ExtendedParamType("X-CAR", "BMW", VCardTypeName.XTENDED));
    assertTrue(extendedType.containsExtendedParam(new ExtendedParamType("X-TEST", VCardTypeName.XTENDED)));
    assertTrue(extendedType.containsExtendedParam(new ExtendedParamType("X-CAR", "BMW", VCardTypeName.XTENDED)));
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  }
 
  @Test
  public void testAddAllExtendedParams() {
    List<ExtendedParamType> list = new ArrayList<ExtendedParamType>(2);
    list.add(new ExtendedParamType("X-TEST", VCardTypeName.XTENDED));
    list.add(new ExtendedParamType("X-CAR", "BMW", VCardTypeName.XTENDED));
   
    assertFalse(extendedType.hasExtendedParams());
    extendedType.addAllExtendedParams(list);
    assertTrue(extendedType.hasExtendedParams());
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

    assertTrue(extendedType.hasExtendedParams());
  }
 
  @Test
  public void testRemoveExtendedParam() {
    extendedType.addExtendedParam(new ExtendedParamType("X-TEST", VCardTypeName.XTENDED));
    extendedType.addExtendedParam(new ExtendedParamType("X-CAR", "BMW", VCardTypeName.XTENDED));
   
    assertTrue(extendedType.containsExtendedParam(new ExtendedParamType("X-TEST", VCardTypeName.XTENDED)));
    assertTrue(extendedType.containsExtendedParam(new ExtendedParamType("X-CAR", "BMW", VCardTypeName.XTENDED)));
   
    extendedType.removeExtendedParam(new ExtendedParamType("X-TEST", VCardTypeName.XTENDED));
   
    assertFalse(extendedType.containsExtendedParam(new ExtendedParamType("X-TEST", VCardTypeName.XTENDED)));
  }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.params.ExtendedParamType

  }
 
  @Test
  public void testClearExtendedParams() {
    List<ExtendedParamType> list = new ArrayList<ExtendedParamType>(2);
    list.add(new ExtendedParamType("X-TEST", VCardTypeName.XTENDED));
    list.add(new ExtendedParamType("X-CAR", "BMW", VCardTypeName.XTENDED));
    extendedType.addAllExtendedParams(list);
    assertTrue(extendedType.hasExtendedParams());
   
    extendedType.clearExtendedParams();
    assertFalse(extendedType.hasExtendedParams());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.