Package com.asakusafw.dmdl.analyzer

Examples of com.asakusafw.dmdl.analyzer.DmdlAnalyzer$RecordExpressionResolver


     * @return the resolved
     * @throws DmdlSemanticException if failed to resolve
     */
    protected DmdlSemantics resolve0() throws DmdlSemanticException {
        AstScript script = parse();
        DmdlAnalyzer result = new DmdlAnalyzer(typeDrivers, attributeDrivers);
        for (AstModelDefinition<?> model : script.models) {
            result.addModel(model);
        }
        DmdlSemantics resolved = result.resolve();
        return resolved;
    }
View Full Code Here


     */
    public DmdlSemantics process(DmdlSourceRepository repository) throws IOException {
        if (repository == null) {
            throw new IllegalArgumentException("repository must not be null"); //$NON-NLS-1$
        }
        DmdlAnalyzer analyzer = parse(repository);
        try {
            LOG.debug(Messages.getString("AnalyzeTask.monitorResolveStarting")); //$NON-NLS-1$
            return analyzer.resolve();
        } catch (DmdlSemanticException e) {
            LOG.error(Messages.getString("AnalyzeTask.monitorResolveFailed"), e); //$NON-NLS-1$
            for (Diagnostic diagnostic : e.getDiagnostics()) {
                switch (diagnostic.level) {
                case INFO:
View Full Code Here

    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++;
                    }
                } catch (DmdlSyntaxException e) {
                    LOG.error(MessageFormat.format(
                            Messages.getString("AnalyzeTask.monitorParseFailed"), //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of com.asakusafw.dmdl.analyzer.DmdlAnalyzer$RecordExpressionResolver

Copyright © 2018 www.massapicom. 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.