Examples of toStringValue()


Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

        }
        if (dateFormat != null && checkDateFormat(environment, ELEMENT_DATE_NAME, dateFormat)) {
            result.setDateFormat(dateFormat.toStringValue());
        }
        if (dateTimeFormat != null && checkDateFormat(environment, ELEMENT_DATE_TIME_NAME, dateTimeFormat)) {
            result.setDateTimeFormat(dateTimeFormat.toStringValue());
        }
        return result;
    }

    private boolean checkNotEmpty(DmdlSemantics environment, String name, AstLiteral stringLiteral) {
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

        }
        if (linefeed != null) {
            result.setAllowLinefeed(linefeed.toBooleanValue());
        }
        if (codec != null && checkNotEmpty(environment, ELEMENT_CODEC_NAME, codec)) {
            result.setCodecName(codec.toStringValue());
        }
        return result;
    }

    private boolean checkNotEmpty(DmdlSemantics environment, String name, AstLiteral stringLiteral) {
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

        }
        if (dateTimeFormat != null && checkDateFormat(environment, ELEMENT_DATE_TIME_NAME, dateTimeFormat)) {
            result.setDateTimeFormat(dateTimeFormat.toStringValue());
        }
        if (codec != null && checkNotEmpty(environment, ELEMENT_CODEC_NAME, codec)) {
            result.setCodecName(codec.toStringValue());
        }
        return result;
    }

    private boolean checkNotEmpty(DmdlSemantics environment, String name, AstLiteral stringLiteral) {
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

    private void consumeTableName(
            DmdlSemantics environment, AstAttribute attribute,
            Map<String, AstAttributeElement> elements, OrcFileTrait result) {
        AstLiteral tableName = take(environment, attribute, elements, ELEMENT_TABLE_NAME, LiteralKind.STRING);
        if (tableName != null) {
            String value = tableName.toStringValue();
            if (AttributeUtil.checkPresent(environment, tableName, label(ELEMENT_TABLE_NAME), value)) {
                result.setTableName(value);
            }
        }
    }
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

    private void consumeFormatVersion(
            DmdlSemantics environment, AstAttribute attribute,
            Map<String, AstAttributeElement> elements, OrcFileTrait result) {
        AstLiteral formatVersion = take(environment, attribute, elements, ELEMENT_FORMAT_VERSION, LiteralKind.STRING);
        if (formatVersion != null) {
            String symbol = formatVersion.toStringValue();
            try {
                OrcFile.Version value = OrcFile.Version.byName(symbol);
                result.configuration().withFormatVersion(value);
            } catch (IllegalArgumentException e) {
                environment.report(new Diagnostic(
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

    private <T extends Enum<?>> T consumeOption(
            DmdlSemantics environment, AstAttribute attribute, Map<String, AstAttributeElement> elements,
            String key, String description, T[] options) {
        AstLiteral literal = take(environment, attribute, elements, key, LiteralKind.STRING);
        if (literal != null) {
            String symbol = literal.toStringValue();
            T value = find(options, symbol);
            if (value == null) {
                environment.report(new Diagnostic(
                        Level.ERROR,
                        literal,
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

                        "@{0}.{1} must be a string literal",
                        TARGET_NAME,
                        ELEMENT_NAME));
                return null;
            }
            return literal.toStringValue();
        }
    }

    @Override
    public String toString() {
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

            Map<String, AstAttributeElement> elements,
            HiveFieldTrait trait) {
        AstLiteral name =
                AttributeUtil.takeLiteral(environment, attribute, elements, ELEMENT_NAME, LiteralKind.STRING, true);
        if (name != null) {
            String value = name.toStringValue();
            if (AttributeUtil.checkPresent(environment, name, label(ELEMENT_NAME), value)) {
                trait.setColumnName(value);
            }
        }
        environment.reportAll(AttributeUtil.reportInvalidElements(attribute, elements.values()));
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

    private void consumeTableName(
            DmdlSemantics environment, AstAttribute attribute,
            Map<String, AstAttributeElement> elements, ParquetFileTrait result) {
        AstLiteral tableName = take(environment, attribute, elements, ELEMENT_TABLE_NAME, LiteralKind.STRING);
        if (tableName != null) {
            String value = tableName.toStringValue();
            if (AttributeUtil.checkPresent(environment, tableName, label(ELEMENT_TABLE_NAME), value)) {
                result.setTableName(value);
            }
        }
    }
View Full Code Here

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()

    private void consumeFormatVersion(
            DmdlSemantics environment, AstAttribute attribute,
            Map<String, AstAttributeElement> elements, ParquetFileTrait result) {
        AstLiteral formatVersion = take(environment, attribute, elements, ELEMENT_FORMAT_VERSION, LiteralKind.STRING);
        if (formatVersion != null) {
            String symbol = formatVersion.toStringValue();
            try {
                ParquetProperties.WriterVersion value = ParquetProperties.WriterVersion.fromString(symbol);
                result.configuration().withWriterVersion(value);
            } catch (IllegalArgumentException e) {
                environment.report(new Diagnostic(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.