Package com.io7m.smfj.parser.api
Class SMFParserEventsDataAttributesNonInterleavedIgnoringReceiver
- java.lang.Object
-
- com.io7m.smfj.parser.api.SMFParserEventsDataAttributesNonInterleavedIgnoringReceiver
-
- All Implemented Interfaces:
SMFParserEventsDataAttributesNonInterleavedType
,SMFParserEventsErrorType
public final class SMFParserEventsDataAttributesNonInterleavedIgnoringReceiver extends java.lang.Object implements SMFParserEventsDataAttributesNonInterleavedType
A convenient implementation of theSMFParserEventsDataAttributeValuesType
interface that delegates warnings and errors but ignores data.
-
-
Constructor Summary
Constructors Constructor Description SMFParserEventsDataAttributesNonInterleavedIgnoringReceiver(SMFParserEventsErrorType in_receiver)
Construct a receiver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onDataAttributesNonInterleavedFinish()
Called when parsing of all non-interleaved attribute data has finished.java.util.Optional<SMFParserEventsDataAttributeValuesType>
onDataAttributeStart(SMFAttribute attribute)
Parsing of data for the attribute has started.void
onError(SMFErrorType e)
An error has occurred.void
onWarning(SMFWarningType w)
An error has occurred of a severity low enough that it should just be considered a warning.
-
-
-
Constructor Detail
-
SMFParserEventsDataAttributesNonInterleavedIgnoringReceiver
public SMFParserEventsDataAttributesNonInterleavedIgnoringReceiver(SMFParserEventsErrorType in_receiver)
Construct a receiver.- Parameters:
in_receiver
- The error/warning receiver
-
-
Method Detail
-
onWarning
public void onWarning(SMFWarningType w)
Description copied from interface:SMFParserEventsErrorType
An error has occurred of a severity low enough that it should just be considered a warning.- Specified by:
onWarning
in interfaceSMFParserEventsErrorType
- Parameters:
w
- The warning
-
onError
public void onError(SMFErrorType e)
Description copied from interface:SMFParserEventsErrorType
An error has occurred. Parsing will continue but the file as a whole must be considered invalid.- Specified by:
onError
in interfaceSMFParserEventsErrorType
- Parameters:
e
- The error
-
onDataAttributeStart
public java.util.Optional<SMFParserEventsDataAttributeValuesType> onDataAttributeStart(SMFAttribute attribute)
Description copied from interface:SMFParserEventsDataAttributesNonInterleavedType
Parsing of data for the attribute has started.
This method must return a receiver for the given attribute if it wants to receive values, or
Optional.empty()
if it does not.- Specified by:
onDataAttributeStart
in interfaceSMFParserEventsDataAttributesNonInterleavedType
- Parameters:
attribute
- The attribute- Returns:
- A value receiver
-
onDataAttributesNonInterleavedFinish
public void onDataAttributesNonInterleavedFinish()
Description copied from interface:SMFParserEventsDataAttributesNonInterleavedType
Called when parsing of all non-interleaved attribute data has finished.- Specified by:
onDataAttributesNonInterleavedFinish
in interfaceSMFParserEventsDataAttributesNonInterleavedType
-
-