Examples of DmdlParser


Examples of com.asakusafw.dmdl.parser.DmdlParser

            }

            InputStream in = url.openStream();
            try {
                Reader r = new InputStreamReader(in, "UTF-8");
                DmdlParser parser = new DmdlParser();
                AstScript script = parser.parse(r, uri);
                return script;
            } finally {
                in.close();
            }
        } catch (IOException e) {
View Full Code Here

Examples of com.asakusafw.dmdl.parser.DmdlParser

        result.setSidColumn(sidColumn);
        result.setTimestampColumn(timestampColumn);
        result.setDeleteFlagColumn(deleteFlagColumn);
        if (deleteFlagValue != null) {
            try {
                DmdlParser dmdl = new DmdlParser();
                AstLiteral literal = dmdl.parseLiteral(deleteFlagValue);
                result.setDeleteFlagValue(literal);
            } catch (DmdlSyntaxException e) {
                throw new IllegalArgumentException(MessageFormat.format(
                        "論理削除フラグの値はJavaのリテラルの形式で指定してください: {0}",
                        deleteFlagValue), e);
View Full Code Here

Examples of com.asakusafw.dmdl.parser.DmdlParser

    }

    private DmdlAnalyzer parse(DmdlSourceRepository source) throws IOException {
        assert source != null;
        boolean green = true;
        DmdlParser parser = new DmdlParser();
        DmdlAnalyzer analyzer = new DmdlAnalyzer(
                ServiceLoader.load(TypeDriver.class, serviceClassLoader),
                ServiceLoader.load(AttributeDriver.class, serviceClassLoader));
        int count = 0;
        Cursor cursor = source.createCursor();
        try {
            while (cursor.next()) {
                URI name = cursor.getIdentifier();
                LOG.info(Messages.getString("AnalyzeTask.monitorParseStarting"), name); //$NON-NLS-1$
                Reader resource = cursor.openResource();
                try {
                    AstScript script = parser.parse(resource, name);
                    for (AstModelDefinition<?> model : script.models) {
                        LOG.debug(Messages.getString("AnalyzeTask.monitorFoundModel"), model.name); //$NON-NLS-1$
                        analyzer.addModel(model);
                        count++;
                    }
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.