ezvcard.property
Class Xml

java.lang.Object
  extended by ezvcard.property.VCardProperty
      extended by ezvcard.property.SimpleProperty<Document>
          extended by ezvcard.property.Xml
All Implemented Interfaces:
HasAltId, Comparable<VCardProperty>

public class Xml
extends SimpleProperty<Document>
implements HasAltId

Any XML data attached to the vCard. This is used if the vCard was encoded in XML (xCard standard) and it contained some non-standard elements.

Code sample

 VCard vcard = new VCard();
 Xml xml = new Xml("<b>Some xml</b>");
 vcard.addXml(xml);
 

Property name: XML

Supported versions: 4.0

Author:
Michael Angstadt

Field Summary
 
Fields inherited from class ezvcard.property.SimpleProperty
value
 
Fields inherited from class ezvcard.property.VCardProperty
group, parameters
 
Constructor Summary
Xml(Document document)
          Creates an XML property.
Xml(Element element)
          Creates an XML property.
Xml(String xml)
          Creates an XML property.
 
Method Summary
 Set<VCardVersion> _supportedVersions()
           Gets the vCard versions that support this property.
 String getAltId()
          Gets the property's ALTID parameter.
 void setAltId(String altId)
          Sets the property's ALTID parameter.
 
Methods inherited from class ezvcard.property.SimpleProperty
_validate, getValue, setValue
 
Methods inherited from class ezvcard.property.VCardProperty
addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Xml

public Xml(String xml)
    throws SAXException
Creates an XML property.

Parameters:
xml - the XML to use as the property's value
Throws:
SAXException - if the XML cannot be parsed

Xml

public Xml(Element element)
Creates an XML property.

Parameters:
element - the XML element to use as the property's value (the element is imported into an empty Document object)

Xml

public Xml(Document document)
Creates an XML property.

Parameters:
document - the XML document to use as the property's value
Method Detail

_supportedVersions

public Set<VCardVersion> _supportedVersions()
Description copied from class: VCardProperty

Gets the vCard versions that support this property.

This method should be overridden by child classes if the property does not support all vCard versions. The default implementation of this method returns all vCard versions.

Overrides:
_supportedVersions in class VCardProperty
Returns:
the vCard versions that support this property.

getAltId

public String getAltId()
Description copied from interface: HasAltId
Gets the property's ALTID parameter.

Supported versions: 4.0

Specified by:
getAltId in interface HasAltId
Returns:
the ALTID or null if it doesn't exist
See Also:
VCardParameters.getAltId()

setAltId

public void setAltId(String altId)
Description copied from interface: HasAltId
Sets the property's ALTID parameter.

Supported versions: 4.0

Specified by:
setAltId in interface HasAltId
Parameters:
altId - the ALTID or null to remove
See Also:
VCardParameters.setAltId(java.lang.String)


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.