public ReadJsonTestTweets(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.isLengthDelimited = getConfigs().getBoolean(config, "isLengthDelimited", true); this.idPrefix = getConfigs().getString(config, "idPrefix", null); if ("random".equals(idPrefix)) { idPrefix = String.valueOf(new Random().nextInt()); } else if (idPrefix == null) { idPrefix = ""; } validateArguments(); }
public ReadLine(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.charset = getConfigs().getCharset(config, "charset", null); this.ignoreFirstLine = getConfigs().getBoolean(config, "ignoreFirstLine", false); String cprefix = getConfigs().getString(config, "commentPrefix", ""); if (cprefix.length() > 1) { throw new MorphlineCompilationException("commentPrefix must be at most one character long: " + cprefix, config); } this.commentPrefix = (cprefix.length() > 0 ? cprefix : null); validateArguments(); }
public Split(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.fieldName = getConfigs().getString(config, "field"); this.separator = getConfigs().getString(config, "separator"); this.newFields = getConfigs().getStringList(config, "newFields"); this.dropUndeclaredField = getConfigs().getBoolean(config, "dropUndeclaredField", true); this.trimSegments = getConfigs().getBoolean(config, "trimSegments", true); LOG.debug("fieldName: {}", fieldName); validateArguments(); }
public ToString(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.fieldName = getConfigs().getString(config, "field"); this.trim = getConfigs().getBoolean(config, "trim", false); validateArguments(); }
public AddCurrentTime(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.fieldName = getConfigs().getString(config, FIELD_NAME, Fields.TIMESTAMP); this.preserveExisting = getConfigs().getBoolean(config, PRESERVE_EXISTING_NAME, true); validateArguments(); }
protected Rename(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); remove = getConfigs().getBoolean(config, CONF_REMOVE, DEFAULT_REMOVE); Config paths = getConfigs().getConfig(config, CONF_FIELDS); entries = paths.entrySet(); }
public ToString(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.fieldName = getConfigs().getString(config, "field"); this.trim = getConfigs().getBoolean(config, "trim", false); validateArguments(); }
public AddCurrentTime(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.fieldName = getConfigs().getString(config, FIELD_NAME, Fields.TIMESTAMP); this.preserveExisting = getConfigs().getBoolean(config, PRESERVE_EXISTING_NAME, true); validateArguments(); }
public ReadLine(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.charset = getConfigs().getCharset(config, "charset", null); this.ignoreFirstLine = getConfigs().getBoolean(config, "ignoreFirstLine", false); String cprefix = getConfigs().getString(config, "commentPrefix", ""); if (cprefix.length() > 1) { throw new MorphlineCompilationException("commentPrefix must be at most one character long: " + cprefix, config); } this.commentPrefix = (cprefix.length() > 0 ? cprefix : null); validateArguments(); }
public ExtractURIComponents(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.inputFieldName = getConfigs().getString(config, "inputField"); this.outputFieldPrefix = getConfigs().getString(config, "outputFieldPrefix", ""); this.failOnInvalidURI = getConfigs().getBoolean(config, "failOnInvalidURI", false); validateArguments(); }
public ReadSequenceFile(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.includeMetaData = getConfigs().getBoolean(config, "includeMetaData", false); this.keyField = getConfigs().getString(config, CONFIG_KEY_FIELD, Fields.ATTACHMENT_NAME); this.valueField = getConfigs().getString(config, CONFIG_VALUE_FIELD, Fields.ATTACHMENT_BODY); validateArguments(); }
public ExtractURIComponents(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.inputFieldName = getConfigs().getString(config, "inputField"); this.outputFieldPrefix = getConfigs().getString(config, "outputFieldPrefix", ""); this.failOnInvalidURI = getConfigs().getBoolean(config, "failOnInvalidURI", false); validateArguments(); }
public ReadMultiLine(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.regex = Pattern.compile(getConfigs().getString(config, "regex")).matcher(""); this.negate = getConfigs().getBoolean(config, "negate", false); this.charset = getConfigs().getCharset(config, "charset", null); this.what = new Validator<What>().validateEnum( config, getConfigs().getString(config, "what", What.previous.toString()), What.class); validateArguments(); }
public ReadMultiLine(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.regex = Pattern.compile(getConfigs().getString(config, "regex")).matcher(""); this.negate = getConfigs().getBoolean(config, "negate", false); this.charset = getConfigs().getCharset(config, "charset", null); this.what = new Validator<What>().validateEnum( config, getConfigs().getString(config, "what", What.previous.toString()), What.class); validateArguments(); }
public ReadSequenceFile(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.includeMetaData = getConfigs().getBoolean(config, "includeMetaData", false); this.keyField = getConfigs().getString(config, CONFIG_KEY_FIELD, Fields.ATTACHMENT_NAME); this.valueField = getConfigs().getString(config, CONFIG_VALUE_FIELD, Fields.ATTACHMENT_BODY); validateArguments(); }
public ExtractURIQueryParameters(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.parameterName = getConfigs().getString(config, "parameter"); this.inputFieldName = getConfigs().getString(config, "inputField"); this.outputFieldName = getConfigs().getString(config, "outputField"); this.failOnInvalidURI = getConfigs().getBoolean(config, "failOnInvalidURI", false); this.maxParameters = getConfigs().getInt(config, "maxParameters", Integer.MAX_VALUE); this.charset = getConfigs().getString(config, "charset", "UTF-8"); Charset.forName(charset); // fail fast if charset is unsupported validateArguments(); }
public ExtractURIQueryParameters(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.parameterName = getConfigs().getString(config, "parameter"); this.inputFieldName = getConfigs().getString(config, "inputField"); this.outputFieldName = getConfigs().getString(config, "outputField"); this.failOnInvalidURI = getConfigs().getBoolean(config, "failOnInvalidURI", false); this.maxParameters = getConfigs().getInt(config, "maxParameters", Integer.MAX_VALUE); this.charset = getConfigs().getString(config, "charset", "UTF-8"); Charset.forName(charset); // fail fast if charset is unsupported validateArguments(); }
public GenerateSequenceNumber(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.fieldName = getConfigs().getString(config, "field"); this.preserveExisting = getConfigs().getBoolean(config, "preserveExisting", true); validateArguments(); }
public ExtractURIComponent(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.inputFieldName = getConfigs().getString(config, "inputField"); this.outputFieldName = getConfigs().getString(config, "outputField"); this.failOnInvalidURI = getConfigs().getBoolean(config, "failOnInvalidURI", false); this.component = new Validator<Component>().validateEnum( config, getConfigs().getString(config, "component"), Component.class); validateArguments(); }
public ExtractURIComponent(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.inputFieldName = getConfigs().getString(config, "inputField"); this.outputFieldName = getConfigs().getString(config, "outputField"); this.failOnInvalidURI = getConfigs().getBoolean(config, "failOnInvalidURI", false); this.component = new Validator<Component>().validateEnum( config, getConfigs().getString(config, "component"), Component.class); validateArguments(); }