History log of /frameworks/opt/vcard/java/com/android/vcard/VCardParser_V40.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
56650608f09fc75f260c03e00456ef3d1e60c929 01-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add parseOne() capability.

Bug: 4066223
Change-Id: I1699dd073a3b9647a5654d3fea4a2963430599da
/frameworks/opt/vcard/java/com/android/vcard/VCardParser_V40.java
1de396f6df89363169d3a2e61a61fa98d12c1ef8 23-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Refactor code

1) introduce VCardProperty and make use of it everywhere

Previously we had had two structures for it:
VCardParserImpl_V21.PropertyData and VCardEntry#Property.
The former was for holding raw data for property, while
the latter was for holding resultant (encoded) values.
Apparently we can share same structure.

To do so, we need to let VCardInterpreter pass the
structure to interpreter side, instead of splitting them
into smaller pieces by using several propertyXXX() calls.
Thus this change introduces onPropertyCreated(VCardProperty)
in lieu of propertyXXX().

Now vCard parser side is responsible for encoding
Quoted-Printable, BASE64, and several charsets.
Users are still able to do them manually by using
VCardEntry#getRawValue().

2) add better handling for data inside VCardEntry

Now VCardEntry has so many fields that it is harder to
iterate those data, while the iteration itself is common
use case for it. At least three functionalities are
now using iteration: toString(), isEmpty(), and
constructInsertOperations().

This change introduces inner iterator functionality.
VCardEntry.EntryElementIterator allows users to implement
their own iteration logic.
VCardEntry#iterateAllData(VCardEntry.EntryElementIterator)
iterates all data inside VCardEntry and pass them into
the inner iterator.

3) make VCardParser abstract class

VCardParser should provide some utility functionality like
VCardParser#getInstance(), while currently users have to
choose one of inherited classes like VCardParser_V21, which
is hindering encapsulation.

Currently no external library implements VCardParser,
so this change isn't so harmful.

Bug: 4167593
Bug: 4066223
Change-Id: Ic6bb453cf733cf1de356789b36dd90521dceff56
/frameworks/opt/vcard/java/com/android/vcard/VCardParser_V40.java
da2f6ef422b360827f2c5231552d8c9fad0ed8b1 23-Jan-2011 Daisuke Miyakawa <dmiyakawa@google.com> Let the lib use properties in 4.0 rev 15

Change-Id: I048614aef9ec32cb124d057693dfe6d037a2223e
/frameworks/opt/vcard/java/com/android/vcard/VCardParser_V40.java
4560bdde6dd75cca49fc55b58aafb5d416b88ca3 20-Aug-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make vCard 4.0 parser support SORT-AS parameter.

Add unit test for it.

Fix bugs in foundation classes..

Change-Id: I8b5ca1fd49ef3e729ec85429fb8110efde5091f1
/frameworks/opt/vcard/java/com/android/vcard/VCardParser_V40.java
be378d5b188f51cf717e5309e3c39180e85833a8 02-Jul-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add a first implementation for vCard 4.0.

TODO: need unit tests.

Bug: 2794181
Change-Id: I6be681f79479e9d6d436895e1b5539af54539f9c
/frameworks/opt/vcard/java/com/android/vcard/VCardParser_V40.java