BrightSide Workbench Full Report + Source Code
org.turro.vcard.VCard Class Reference
Collaboration diagram for org.turro.vcard.VCard:

Public Member Functions

 VCard (Version version)
 
Version getVersion ()
 
String getVCard ()
 
void addProperty (Property property)
 
Property getProperty (PropertyTag tag)
 
List< PropertygetProperties (PropertyTag tag)
 
void readLines (List< String > lines)
 

Protected Attributes

List< Propertyproperties
 
Version version
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 31 of file VCard.java.

Constructor & Destructor Documentation

◆ VCard()

org.turro.vcard.VCard.VCard ( Version  version)

Definition at line 36 of file VCard.java.

36  {
37  this.version = version;
38  properties = new Vector<Property>();
39  }
List< Property > properties
Definition: VCard.java:33

Member Function Documentation

◆ addProperty()

void org.turro.vcard.VCard.addProperty ( Property  property)

Definition at line 60 of file VCard.java.

60  {
61  properties.add(property);
62  }

◆ getProperties()

List<Property> org.turro.vcard.VCard.getProperties ( PropertyTag  tag)

Definition at line 73 of file VCard.java.

73  {
74  List<Property> props = new ArrayList<Property>();
75  for(Property p : properties) {
76  if(p.getTag().equals(tag)) {
77  props.add(p);
78  }
79  }
80  return props;
81  }

◆ getProperty()

Property org.turro.vcard.VCard.getProperty ( PropertyTag  tag)

Definition at line 64 of file VCard.java.

64  {
65  for(Property p : properties) {
66  if(p.getTag().equals(tag)) {
67  return p;
68  }
69  }
70  return null;
71  }

◆ getVCard()

String org.turro.vcard.VCard.getVCard ( )

Definition at line 45 of file VCard.java.

45  {
46  StringBuilder sb = new StringBuilder();
47 
48  sb.append("BEGIN:VCARD\n");
50 
51  for(Property p : properties) {
52  p.renderProperty(sb);
53  }
54 
55  sb.append("END:VCARD\n");
56 
57  return sb.toString();
58  }
void renderVersion(StringBuilder sb)
Definition: Version.java:60
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVersion()

Version org.turro.vcard.VCard.getVersion ( )

Definition at line 41 of file VCard.java.

41  {
42  return version;
43  }
Here is the caller graph for this function:

◆ readLines()

void org.turro.vcard.VCard.readLines ( List< String >  lines)

Definition at line 83 of file VCard.java.

83  {
84  for(String l : lines) {
85  PropertyTag pt = PropertyTag.getInstance(l);
86  if(pt != null) {
87  properties.add(Property.getInstance(this, pt, l));
88  }
89  }
90  }
Here is the call graph for this function:

Member Data Documentation

◆ properties

List<Property> org.turro.vcard.VCard.properties
protected

Definition at line 33 of file VCard.java.

◆ version

Version org.turro.vcard.VCard.version
protected

Definition at line 34 of file VCard.java.


The documentation for this class was generated from the following file: