public class VObjectDataAdapter extends Object implements VObjectDataListener
VObjectDataListener.| Constructor and Description |
|---|
VObjectDataAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
onComponentBegin(String name,
Context context)
Called when a component begins (in other words, when a BEGIN property is
encountered).
|
void |
onComponentEnd(String name,
Context context)
Called when a component ends (in other words, when an END property is
encountered).
|
void |
onProperty(VObjectProperty property,
Context context)
Called when a property is read.
|
void |
onVersion(String value,
Context context)
Called when a VERSION property is read whose value and position (as
defined in
SyntaxRules) are recognized as valid. |
void |
onWarning(Warning warning,
VObjectProperty property,
Exception thrown,
Context context)
Called when a non-fatal error occurs during parsing.
|
public VObjectDataAdapter()
public void onComponentBegin(String name, Context context)
VObjectDataListeneronComponentBegin in interface VObjectDataListenername - the component name (will always be in uppercase)context - the parse contextpublic void onComponentEnd(String name, Context context)
VObjectDataListenerCalled when a component ends (in other words, when an END property is encountered).
If a component ends before any of its subcomponents end, then the parser will generate "onComponentEnd" events for each subcomponent.
For example, the following data will cause the following sequence of events to occur. Notice that the outer component, A, ends before its subcomponents.
Data:
BEGIN:A BEGIN:B BEGIN:C END:A END:C END:B
Sequence of events:
onComponentEnd in interface VObjectDataListenername - the component name (will always be in uppercase)context - the parse contextpublic void onProperty(VObjectProperty property, Context context)
VObjectDataListeneronProperty in interface VObjectDataListenerproperty - the propertycontext - the parse contextpublic void onVersion(String value, Context context)
VObjectDataListenerSyntaxRules) are recognized as valid.onVersion in interface VObjectDataListenervalue - the version stringcontext - the parse contextpublic void onWarning(Warning warning, VObjectProperty property, Exception thrown, Context context)
VObjectDataListeneronWarning in interface VObjectDataListenerwarning - the warningproperty - the property that the warning is associated with, or null
if the warning is not associated with a propertythrown - the exception that was thrown or null if no exception was
throwncontext - the parse contextCopyright © 2016–2018 Michael Angstadt. All rights reserved.