com.groupdocs.metadata.core

Interfaces

Classes

Enums

Exceptions

com.groupdocs.metadata.core

Class VCardCard

  • All Implemented Interfaces:
    Iterable<MetadataProperty>


    public class VCardCard
    extends VCardRecordset

    Represents a single card extracted from a VCard file.

    Learn more

    This example shows how to use vCard property filters.

    
     public static void run() {
         try (Metadata metadata = new Metadata(Constants.InputVcf)) {
             VCardRootPackage root = metadata.getRootPackageGeneric();
             for (VCardCard vCard : root.getVCardPackage().getCards()) {
                 // Print most preferred work phone numbers and work emails
                 VCardCard filtered = vCard.filterWorkTags().filterPreferred();
                 PrintArray(filtered.getCommunicationRecordset().getTelephones());
                 PrintArray(filtered.getCommunicationRecordset().getEmails());
             }
         }
     }
     private static void PrintArray(String[] values) {
         if (values != null) {
             for (String value : values) {
                 System.out.println(value);
             }
         }
     }
     
    • Method Detail

      • getGeneralRecordset

        public final VCardGeneralRecordset getGeneralRecordset()

        Gets the general records.

        Returns:
        The general records.
      • getIdentificationRecordset

        public final VCardIdentificationRecordset getIdentificationRecordset()

        Gets the identification records.

        Returns:
        The identification records.
      • getDeliveryAddressingRecordset

        public final VCardDeliveryAddressingRecordset getDeliveryAddressingRecordset()

        Gets the delivery addressing records.

        Returns:
        The delivery addressing records.
      • getCommunicationRecordset

        public final VCardCommunicationRecordset getCommunicationRecordset()

        Gets the communication records.

        Returns:
        The communication records.
      • getGeographicalRecordset

        public final VCardGeographicalRecordset getGeographicalRecordset()

        Gets the geographical records.

        Returns:
        The geographical records.
      • getOrganizationalRecordset

        public final VCardOrganizationalRecordset getOrganizationalRecordset()

        Gets the organizational records.

        Returns:
        The organizational records.
      • getExplanatoryRecordset

        public final VCardExplanatoryRecordset getExplanatoryRecordset()

        Gets the explanatory records.

        Returns:
        The explanatory records.
      • getSecurityRecordset

        public final VCardSecurityRecordset getSecurityRecordset()

        Gets the security records.

        Returns:
        The security records.
      • getCalendarRecordset

        public final VCardCalendarRecordset getCalendarRecordset()

        Gets the calendar records.

        Returns:
        The calendar records.
      • getExtensionRecords

        public final VCardTextRecord[] getExtensionRecords()

        Gets the private extension records.

        Returns:
        The private extension records.
      • getAvailableGroups

        public final String[] getAvailableGroups()

        Gets the available group names.

        Returns:
        The available group names.
      • filterByGroup

        public final VCardCard filterByGroup(String groupName)

        Filters all vCard records by the group name passed as a parameter. For more information please see the method.

        Parameters:
        groupName - The name of the group.
        Returns:
        The filtered vCard instance.
        See Also:
        GetAvailableGroups
      • filterHomeTags

        public final VCardCard filterHomeTags()

        Filters all vCard records marked with the HOME tag.

        Returns:
        The filtered vCard instance.
      • filterWorkTags

        public final VCardCard filterWorkTags()

        Filters all vCard records marked with the WORK tag.

        Returns:
        Filtered vCard instance.
      • filterPreferred

        public final VCardCard filterPreferred()

        Filters the preferred records.

        Returns:
        The filtered vCard instance.