ezvcard.types
Class KindType

java.lang.Object
  extended by ezvcard.types.VCardType
      extended by ezvcard.types.TextType
          extended by ezvcard.types.KindType
All Implemented Interfaces:
Comparable<VCardType>

public class KindType
extends TextType

Defines the type of entity that this vCard represents, such as an individual or an organization.

Setting the KIND

 //use static methods to create a KindType object
 VCard vcard = new VCard();
 KindType kind = KindType.individual();
 vcard.setKind(kind);
 

Getting the KIND

 //use "is*" methods to determine the KindType value
 VCard vcard = ...
 KindType kind = vcard.getKind();
 if (kind != null){
   if (kind.isIndividual()){
     ...
   } else if (kind.isGroup()){
     ...
   }
   ...
 }
 

vCard property name: KIND

vCard versions: 4.0

Author:
Michael Angstadt

Field Summary
static String APPLICATION
           
static String DEVICE
           
static String GROUP
           
static String INDIVIDUAL
           
static String LOCATION
           
static String NAME
           
static String ORG
           
 
Fields inherited from class ezvcard.types.TextType
value
 
Fields inherited from class ezvcard.types.VCardType
group, subTypes, typeName
 
Constructor Summary
KindType()
           
KindType(String kind)
          Use of this constructor is discouraged.
 
Method Summary
static KindType application()
          Creates a new KIND type whose value is set to "application".
static KindType device()
          Creates a new KIND type whose value is set to "device".
 VCardVersion[] getSupportedVersions()
          Gets the vCard versions that support this type.
static KindType group()
          Creates a new KIND type whose value is set to "group".
static KindType individual()
          Creates a new KIND type whose value is set to "individual".
 boolean isApplication()
          Determines if the value is set to "application".
 boolean isDevice()
          Determines if the value is set to "device".
 boolean isGroup()
          Determines if the value is set to "group".
 boolean isIndividual()
          Determines if the value is set to "individual".
 boolean isLocation()
          Determines if the value is set to "location".
 boolean isOrg()
          Determines if the value is set to "org".
static KindType location()
          Creates a new KIND type whose value is set to "location".
static KindType org()
          Creates a new KIND type whose value is set to "org".
 
Methods inherited from class ezvcard.types.TextType
doMarshalText, doMarshalXml, doUnmarshalHtml, doUnmarshalText, doUnmarshalXml, getValue, setValue
 
Methods inherited from class ezvcard.types.VCardType
compareTo, doMarshalSubTypes, getGroup, getQName, getSubTypes, getTypeName, marshalSubTypes, marshalText, marshalXml, setGroup, unmarshalHtml, unmarshalText, unmarshalXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

INDIVIDUAL

public static final String INDIVIDUAL
See Also:
Constant Field Values

GROUP

public static final String GROUP
See Also:
Constant Field Values

ORG

public static final String ORG
See Also:
Constant Field Values

LOCATION

public static final String LOCATION
See Also:
Constant Field Values

APPLICATION

public static final String APPLICATION
See Also:
Constant Field Values

DEVICE

public static final String DEVICE
See Also:
Constant Field Values
Constructor Detail

KindType

public KindType()

KindType

public KindType(String kind)
Use of this constructor is discouraged. Please use one of the static methods to create a new KIND type.

Parameters:
kind - the kind value (e.g. "group")
Method Detail

isIndividual

public boolean isIndividual()
Determines if the value is set to "individual".

Returns:
true if the value is "individual", false if not

isGroup

public boolean isGroup()
Determines if the value is set to "group".

Returns:
true if the value is "group", false if not

isOrg

public boolean isOrg()
Determines if the value is set to "org".

Returns:
true if the value is "org", false if not

isLocation

public boolean isLocation()
Determines if the value is set to "location".

Returns:
true if the value is "location", false if not

isApplication

public boolean isApplication()
Determines if the value is set to "application".

Returns:
true if the value is "application", false if not
See Also:
RFC 6473

isDevice

public boolean isDevice()
Determines if the value is set to "device".

Returns:
true if the value is "device", false if not
See Also:
RFC 6869

individual

public static KindType individual()
Creates a new KIND type whose value is set to "individual".

Returns:
the new KIND type

group

public static KindType group()
Creates a new KIND type whose value is set to "group".

Returns:
the new KIND type

org

public static KindType org()
Creates a new KIND type whose value is set to "org".

Returns:
the new KIND type

location

public static KindType location()
Creates a new KIND type whose value is set to "location".

Returns:
the new KIND type

application

public static KindType application()
Creates a new KIND type whose value is set to "application".

Returns:
the new KIND type
See Also:
RFC 6473

device

public static KindType device()
Creates a new KIND type whose value is set to "device".

Returns:
the new KIND type
See Also:
RFC 6869

getSupportedVersions

public VCardVersion[] getSupportedVersions()
Description copied from class: VCardType
Gets the vCard versions that support this type.

Overrides:
getSupportedVersions in class VCardType
Returns:
the vCard versions that support this type.


Copyright © 2012-2013. All Rights Reserved.