public ToByteArray(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.fieldName = getConfigs().getString(config, "field"); this.charset = getConfigs().getCharset(config, "charset", Charsets.UTF_8); 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 ToByteArray(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.fieldName = getConfigs().getString(config, "field"); this.charset = getConfigs().getCharset(config, "charset", Charsets.UTF_8); validateArguments(); }
public ReadClob(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.outputFieldName = getConfigs().getString(config, "outputField", Fields.MESSAGE); this.charset = getConfigs().getCharset(config, "charset", null); validateArguments(); }
public ReadClob(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.outputFieldName = getConfigs().getString(config, "outputField", Fields.MESSAGE); this.charset = getConfigs().getCharset(config, "charset", null); 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 HashDigest(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.inputFieldName = getConfigs().getString(config, INPUT_FIELD); this.outputFieldName = getConfigs().getString(config, OUTPUT_FIELD); this.hashType = getConfigs().getString(config, HASH_TYPE); this.preserveExisting = getConfigs().getBoolean(config, PRESERVE_EXISTING_NAME, PRESERVE_EXISTING_DEFAULT); this.charset = getConfigs().getCharset(config, CHARSET_FIELD, Charsets.UTF_8); try { this.digest = MessageDigest.getInstance(hashType); } catch (NoSuchAlgorithmException e) { throw new MorphlineCompilationException("Unable to initialise digest", config, e); } validateArguments(); if (LOG.isTraceEnabled()) { LOG.trace("inputField: {}", inputFieldName); LOG.trace("outputField: {}", outputFieldName); LOG.trace("hashType: {}", hashType); LOG.trace("preserveExisting: {}", preserveExisting ); } }
public ConvertHTML(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) throws SAXNotRecognizedException, SAXNotSupportedException { super(builder, config, parent, child, context); this.charset = getConfigs().getCharset(config, "charset", null); this.omitXMLDeclaration = getConfigs().getBoolean(config, "omitXMLDeclaration", false); this.xmlReader = new Parser(); // no reuse? xmlReader.setProperty(Parser.schemaProperty, htmlSchema); xmlReader.setFeature(Parser.CDATAElementsFeature, getConfigs().getBoolean(config, "noCDATA", false)); xmlReader.setFeature(Parser.namespacesFeature, !getConfigs().getBoolean(config, "noNamespaces", true)); xmlReader.setFeature(Parser.ignoreBogonsFeature, getConfigs().getBoolean(config, "noBogons", false)); // also see TIKA-599 xmlReader.setFeature(Parser.bogonsEmptyFeature, getConfigs().getBoolean(config, "emptyBogons", false)); xmlReader.setFeature(Parser.rootBogonsFeature, getConfigs().getBoolean(config, "noRootBogons", false)); xmlReader.setFeature(Parser.defaultAttributesFeature, getConfigs().getBoolean(config, "noDefaultAttributes", false)); xmlReader.setFeature(Parser.translateColonsFeature, getConfigs().getBoolean(config, "noColons", false)); xmlReader.setFeature(Parser.restartElementsFeature, getConfigs().getBoolean(config, "noRestart", false)); xmlReader.setFeature(Parser.ignorableWhitespaceFeature, !getConfigs().getBoolean(config, "suppressIgnorableWhitespace", true)); 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(); }
this.charset = getConfigs().getCharset(config, "charset", null); this.ignoreFirstLine = getConfigs().getBoolean(config, "ignoreFirstLine", false); this.trim = getConfigs().getBoolean(config, "trim", true);
this.charset = getConfigs().getCharset(config, "charset", null); this.ignoreFirstLine = getConfigs().getBoolean(config, "ignoreFirstLine", false); this.trim = getConfigs().getBoolean(config, "trim", true);