Package com.asakusafw.dmdl.semantics

Examples of com.asakusafw.dmdl.semantics.Type


            throw new IllegalArgumentException("attribute must not be null"); //$NON-NLS-1$
        }
        if (types == null) {
            throw new IllegalArgumentException("types must not be null"); //$NON-NLS-1$
        }
        Type type = declaration.getType();
        if (type instanceof BasicType) {
            BasicTypeKind kind = ((BasicType) type).getKind();
            for (BasicTypeKind accept : types) {
                if (kind == accept) {
                    return true;
View Full Code Here


        // for all p in other.properties:
        //   assert p in this.properties
        //   assert this.p.type == other.p.type
        for (PropertyDeclaration projectionProperty : projectionProperties) {
            Type type = properties.get(projectionProperty.getName().identifier);
            if (type == null || type.isSame(projectionProperty.getType()) == false) {
                return false;
            }
        }
        return true;
    }
View Full Code Here

            for (PropertySymbol grouping : term.getGrouping()) {
                groupingProperties.add(grouping.getName().identifier);
            }
            for (MappingFactor factor : term.getMappings()) {
                PropertySymbol target = factor.getTarget();
                Type declared = typeMap.get(target.getName().identifier);
                if (declared == null) {
                    typeMap.put(target.getName().identifier, target.findDeclaration().getType());
                } else if (groupingProperties.contains(target.getName().identifier) == false) {
                    report(new Diagnostic(
                            Level.ERROR,
View Full Code Here

                        property.aggregator,
                        Messages.getString("DmdlAnalyzer.diagnosticMissingSummarizeAggregateFunction"), //$NON-NLS-1$
                        property.aggregator.toString()));
                continue;
            }
            Type resolved = original.getType().map(mapping);
            if (resolved == null) {
                report(new Diagnostic(
                        Level.ERROR,
                        property,
                        Messages.getString(
View Full Code Here

                            property.name,
                            Messages.getString("DmdlAnalyzer.diagnosticDuplicatedProperty"), //$NON-NLS-1$
                            property.name.identifier));
                }
                sawPropertyName.add(property.name.identifier);
                Type type = context.resolveType(property.type);
                if (type == null) {
                    report(new Diagnostic(
                            Level.ERROR,
                            property.type,
                            Messages.getString("DmdlAnalyzer.diagnosticUnknownTypeProperty"), //$NON-NLS-1$
                            property.type.toString()));
                    continue;
                }

                PropertyDeclaration other = model.findPropertyDeclaration(property.name.identifier);
                if (other != null) {
                    LOG.debug("property {} is duplicated", property.name); //$NON-NLS-1$
                    if (type.equals(other.getType()) == false) {
                        report(new Diagnostic(
                                Level.ERROR,
                                property.name,
                                Messages.getString(
                                        "DmdlAnalyzer.diagnosticInconsistentTypeRepordProperty"), //$NON-NLS-1$
View Full Code Here

    public Type resolveType(AstType type) {
        if (type == null) {
            throw new IllegalArgumentException("type must not be null"); //$NON-NLS-1$
        }
        for (TypeDriver driver : typeDrivers) {
            Type resolved = driver.resolve(world, type);
            if (resolved != null) {
                return resolved;
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of com.asakusafw.dmdl.semantics.Type

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.