org.kitesdk.morphline.stdio
Class AbstractParser

java.lang.Object
  extended by org.kitesdk.morphline.base.AbstractCommand
      extended by org.kitesdk.morphline.stdio.AbstractParser
All Implemented Interfaces:
Command

public abstract class AbstractParser
extends AbstractCommand

Base class for convenient implementation of morphline parsers.


Field Summary
static String SUPPORTED_MIME_TYPES
           
 
Fields inherited from class org.kitesdk.morphline.base.AbstractCommand
LOG
 
Constructor Summary
protected AbstractParser(CommandBuilder builder, com.typesafe.config.Config config, Command parent, Command child, MorphlineContext context)
           
protected AbstractParser(com.typesafe.config.Config config, Command parent, Command child, MorphlineContext context)
          Deprecated. 
 
Method Summary
protected  void addSupportedMimeType(String mediaType)
           
protected  Charset detectCharset(Record record, Charset charset)
           
protected  boolean doProcess(Record record)
          Processes the given record on the data plane of this command.
protected abstract  boolean doProcess(Record record, InputStream stream)
           
protected  void incrementNumRecords()
           
static void removeAttachments(Record outputRecord)
           
 
Methods inherited from class org.kitesdk.morphline.base.AbstractCommand
buildCommand, buildCommandChain, doNotify, getChild, getConfig, getConfigs, getContext, getCounter, getHistogram, getMeter, getParent, getTimer, isMeasuringMetrics, notify, process, validateArguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPPORTED_MIME_TYPES

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

AbstractParser

protected AbstractParser(CommandBuilder builder,
                         com.typesafe.config.Config config,
                         Command parent,
                         Command child,
                         MorphlineContext context)

AbstractParser

@Deprecated
protected AbstractParser(com.typesafe.config.Config config,
                                    Command parent,
                                    Command child,
                                    MorphlineContext context)
Deprecated. 

Deprecated; will be removed in the next release

Method Detail

addSupportedMimeType

protected void addSupportedMimeType(String mediaType)

doProcess

protected boolean doProcess(Record record)
Description copied from class: AbstractCommand
Processes the given record on the data plane of this command.

Overrides:
doProcess in class AbstractCommand
Returns:
true to indicate that processing shall continue, false to indicate that backtracking shall be done

doProcess

protected abstract boolean doProcess(Record record,
                                     InputStream stream)
                              throws IOException
Throws:
IOException

incrementNumRecords

protected void incrementNumRecords()

detectCharset

protected Charset detectCharset(Record record,
                                Charset charset)

removeAttachments

public static void removeAttachments(Record outputRecord)


Copyright © 2013–2014. All rights reserved.