VCardRootPackage
Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.RootMetadataPackage
public class VCardRootPackage extends RootMetadataPackage
Represents the root package allowing working with metadata in a VCard file.
Learn more
This code sample demonstrates how to read metadata properties of a vCard file.
public static void run() { try (Metadata metadata = new Metadata(Constants.InputVcf)) { VCardRootPackage root = metadata.getRootPackageGeneric(); for (VCardCard vCard : root.getVCardPackage().getCards()) { System.out.println(vCard.getIdentificationRecordset().getName()); PrintArray(vCard.getIdentificationRecordset().getFormattedNames()); PrintArray(vCard.getCommunicationRecordset().getEmails()); PrintArray(vCard.getCommunicationRecordset().getTelephones()); PrintArray(vCard.getDeliveryAddressingRecordset().getAddresses()); // … } } } private static void PrintArray(String[] values) { if (values != null) { for (String value : values) { System.out.println(value); } } }
Methods
Method | Description |
---|---|
getVCardPackage() | Gets the VCard metadata package. |
getVCardPackage()
public final VCardPackage getVCardPackage()
Gets the VCard metadata package.
Returns: VCardPackage - The VCard metadata package.