VCardCard class

VCardCard class

Represents a single card extracted from a VCard file.

Learn more: https://docs.groupdocs.com/display/metadatanet/Working+with+vCard+metadata

The VCardCard type exposes the following members:

Methods

Method Description
filter_by_group Filters all vCard records by the group name passed as a parameter.
filter_by_group_file
filter_by_group_string
filter_home_tags Filters all vCard records marked with the HOME tag.
filter_preferred Filters the preferred records.
filter_work_tags Filters all vCard records marked with the WORK tag.
get_available_groups Retrieves the available group names.
add_properties Adds known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well. (inherited from MetadataPackage)
add_properties_func (inherited from MetadataPackage)
contains Returns True if the package contains a metadata property with the specified name; otherwise, False. (inherited from MetadataPackage)
contains_file (inherited from MetadataPackage)
contains_string (inherited from MetadataPackage)
find_properties Finds metadata properties that satisfy the specified predicate, searching recursively through all nested packages. (inherited from MetadataPackage)
find_properties_func (inherited from MetadataPackage)
get (inherited from MetadataPackage)
get_enumerator Returns an enumerator that iterates through the collection. (inherited from MetadataPackage)
get_file (inherited from MetadataPackage)
get_string (inherited from MetadataPackage)
remove_properties Removes metadata properties satisfying the specified predicate. (inherited from MetadataPackage)
remove_properties_func (inherited from MetadataPackage)
sanitize Removes writable metadata properties from the package, recursively affecting all nested packages. (inherited from MetadataPackage)
set_properties Sets known metadata properties satisfying the specified predicate. (inherited from MetadataPackage)
set_properties_func (inherited from MetadataPackage)
update_properties Updates known metadata properties that satisfy the specified predicate, recursively affecting all nested packages. (inherited from MetadataPackage)
update_properties_func (inherited from MetadataPackage)

Properties

Property Description
calendar_recordset The calendar records.
communication_recordset The communication records.
delivery_addressing_recordset The delivery addressing records.
explanatory_recordset The explanatory records.
extension_records The private extension records.
general_recordset The general records.
geographical_recordset The geographical records.
identification_recordset The identification records.
organizational_recordset The organizational records.
security_recordset The security records.
count The number of metadata properties. (inherited from MetadataPackage)
keys The collection of metadata property names. (inherited from MetadataPackage)
know_property_descriptors The collection of descriptors that contain information about properties accessible through the GroupDocs.Metadata search engine. (inherited from MetadataPackage)
metadata_type The metadata type of the package. (inherited from MetadataPackage)
property_descriptors The collection of descriptors that contain information about properties accessible through the GroupDocs.Metadata search engine. (inherited from MetadataPackage)

Example

from groupdocs.metadata import Metadata, Constants, VCardRootPackage

def print_array(values):
    if values is not None:
        for value in values:
            print(value)

with Metadata(Constants.InputVcf) as metadata:
    root = metadata.get_root_package(VCardRootPackage)

    for vcard in root.vcard_package.cards:
        # Print most preferred work phone numbers and work emails
        filtered = vcard.filter_work_tags().filter_preferred()
        print_array(filtered.communication_recordset.telephones)
        print_array(filtered.communication_recordset.emails)

See Also