Class VCard


  • public class VCard
    extends Object
    The Class VCard representing a VCard entity of the Omex description.
    Author:
    martin scharm
    • Constructor Detail

      • VCard

        public VCard()
        Instantiates an empty VCard.
      • VCard

        public VCard​(String familyName,
                     String givenName,
                     String email,
                     String organization)
        Instantiates a new VCard.
        Parameters:
        familyName - the family name
        givenName - the given name
        email - the email
        organization - the organization
      • VCard

        public VCard​(org.jdom2.Element element)
        Instantiates a new VCard from an entity of the Omex description.
        Parameters:
        element - the XML element which roots the VCard entity
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Checks if the VCard is empty.
        Returns:
        true, if it is empty
      • toXml

        public void toXml​(org.jdom2.Element parent)
        Appends the VCard tree to an XML element.
        Parameters:
        parent - the parent element in the XML tree
      • getFamilyName

        public String getFamilyName()
        Gets the family name.
        Returns:
        the family name
      • getGivenName

        public String getGivenName()
        Gets the given name.
        Returns:
        the given name
      • getEmail

        public String getEmail()
        Gets the email address.
        Returns:
        the email
      • getOrganization

        public String getOrganization()
        Gets the organization.
        Returns:
        the organization
      • setFamilyName

        public void setFamilyName​(String familyName)
        Sets the family name.
        Parameters:
        familyName - the new family name
      • setGivenName

        public void setGivenName​(String givenName)
        Sets the given name.
        Parameters:
        givenName - the new given name
      • setEmail

        public void setEmail​(String email)
        Sets the email.
        Parameters:
        email - the new email
      • setOrganization

        public void setOrganization​(String organization)
        Sets the organization.
        Parameters:
        organization - the new organization
      • toJsonObject

        public Object toJsonObject()
        Export this VCard as a JSON object.
        Returns:
        the object