Package net.sourceforge.cardme.vcard

Examples of net.sourceforge.cardme.vcard.VCardImpl.addUrl()


    organizations.setOrgName("IBM");
    organizations.addOrgUnit("SUN");
    vcard.setOrg(organizations);
   
    vcard.setUid(new UidType("c0ff639f-9633-4e57-bcfd-55079cfd9d65"));
    vcard.addUrl(new UrlType(new URL("http://www.sun.com")));
    vcard.setGeo(new GeoType(3.4f, -2.6f));

    Calendar birthday = Calendar.getInstance();
    birthday.clear();
    birthday.set(Calendar.YEAR, 1980);
View Full Code Here


  }
 
  @Test
  public void testBuildUrlType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.addUrl(new UrlType("http://www.sun.com"));
    vcard.addUrl(new UrlType("this is free form text."));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
View Full Code Here

 
  @Test
  public void testBuildUrlType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.addUrl(new UrlType("http://www.sun.com"));
    vcard.addUrl(new UrlType("this is free form text."));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

 
  @Test
  public void testURL() throws VCardBuildException {
    VCardImpl vcard = new VCardImpl();
    appyBasicName(vcard);
    vcard.addUrl(new UrlType("http://www.example.org/"));
    String result = getSerializedString(vcard);
    assertTrue(result.contains("URL:http://www.example.org/"));
   
    vcard.addUrl(new UrlType("ftp://ftp.example.org/"));
    result = getSerializedString(vcard);
View Full Code Here

    appyBasicName(vcard);
    vcard.addUrl(new UrlType("http://www.example.org/"));
    String result = getSerializedString(vcard);
    assertTrue(result.contains("URL:http://www.example.org/"));
   
    vcard.addUrl(new UrlType("ftp://ftp.example.org/"));
    result = getSerializedString(vcard);
    assertTrue(result.contains("URL:ftp://ftp.example.org/"));
   
    vcard.addUrl(new UrlType("this is free form text"));
    result = getSerializedString(vcard);
View Full Code Here

   
    vcard.addUrl(new UrlType("ftp://ftp.example.org/"));
    result = getSerializedString(vcard);
    assertTrue(result.contains("URL:ftp://ftp.example.org/"));
   
    vcard.addUrl(new UrlType("this is free form text"));
    result = getSerializedString(vcard);
    assertTrue(result.contains("URL:this is free form text"));
  }
 
  @Test
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.