org.kitesdk.morphline.base
Class Compiler

java.lang.Object
  extended by org.kitesdk.morphline.base.Compiler

public final class Compiler
extends Object

Tool to parse and compile a morphline file or morphline config.


Constructor Summary
Compiler()
           
 
Method Summary
 Command compile(com.typesafe.config.Config morphlineConfig, MorphlineContext morphlineContext, Command finalChild)
          Compiles the given morphline config using the given morphline context.
 Command compile(File morphlineFile, String morphlineId, MorphlineContext morphlineContext, Command finalChild, com.typesafe.config.Config... overrides)
          Parses the given morphlineFile, then finds the morphline with the given morphlineId within, then compiles the morphline and returns the corresponding morphline command.
 com.typesafe.config.Config find(String morphlineId, com.typesafe.config.Config config, String nameForErrorMsg)
          Finds the given morphline id within the given morphline config, using the given nameForErrorMsg for error reporting.
 com.typesafe.config.Config parse(File file, com.typesafe.config.Config... overrides)
          Loads the given config file from the local file system
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Compiler

public Compiler()
Method Detail

compile

public Command compile(File morphlineFile,
                       String morphlineId,
                       MorphlineContext morphlineContext,
                       Command finalChild,
                       com.typesafe.config.Config... overrides)
Parses the given morphlineFile, then finds the morphline with the given morphlineId within, then compiles the morphline and returns the corresponding morphline command. The returned command will feed records into finalChild.


parse

public com.typesafe.config.Config parse(File file,
                                        com.typesafe.config.Config... overrides)
                                 throws IOException
Loads the given config file from the local file system

Throws:
IOException

find

public com.typesafe.config.Config find(String morphlineId,
                                       com.typesafe.config.Config config,
                                       String nameForErrorMsg)
Finds the given morphline id within the given morphline config, using the given nameForErrorMsg for error reporting.


compile

public Command compile(com.typesafe.config.Config morphlineConfig,
                       MorphlineContext morphlineContext,
                       Command finalChild)
Compiles the given morphline config using the given morphline context. The returned command will feed records into finalChild or into /dev/null if finalChild is null.



Copyright © 2013–2014. All rights reserved.