Class VCard
- java.lang.Object
-
- de.unirostock.sems.cbarchive.meta.omex.VCard
-
public class VCard extends Object
The Class VCard representing a VCard entity of the Omex description.- Author:
- martin scharm
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEmail()Gets the email address.StringgetFamilyName()Gets the family name.StringgetGivenName()Gets the given name.StringgetOrganization()Gets the organization.booleanisEmpty()Checks if the VCard is empty.voidsetEmail(String email)Sets the email.voidsetFamilyName(String familyName)Sets the family name.voidsetGivenName(String givenName)Sets the given name.voidsetOrganization(String organization)Sets the organization.ObjecttoJsonObject()Export this VCard as a JSON object.voidtoXml(org.jdom2.Element parent)Appends the VCard tree to an XML element.
-
-
-
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 namegivenName- the given nameemail- the emailorganization- 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
-
-