Package com.asakusafw.dmdl.model

Examples of com.asakusafw.dmdl.model.AstScript


     * Emit DMDL script into the temporary folder to generate Java model classes later.
     * @param model the model
     * @see #generateJava()
     */
    protected void emitDmdl(AstModelDefinition<?> model) {
        AstScript script = new AstScript(null, Collections.singletonList(model));
        StringWriter buffer = new StringWriter();
        PrintWriter output = new PrintWriter(buffer);
        DmdlEmitter.emit(script, output);
        output.close();
        try {
View Full Code Here


     * Emit DMDL script into the temporary folder to generate Java model classes later.
     * @param model the model
     * @see #generateJava()
     */
    protected void emitDmdl(AstModelDefinition<?> model) {
        AstScript script = new AstScript(null, Collections.singletonList(model));
        StringWriter buffer = new StringWriter();
        PrintWriter output = new PrintWriter(buffer);
        DmdlEmitter.emit(script, output);
        output.close();
        try {
View Full Code Here

     * Emit DMDL script into the temporary folder to generate Java model classes later.
     * @param model the model
     * @see #generateJava()
     */
    protected void emitDmdl(AstModelDefinition<?> model) {
        AstScript script = new AstScript(null, Collections.singletonList(model));
        StringWriter buffer = new StringWriter();
        PrintWriter output = new PrintWriter(buffer);
        DmdlEmitter.emit(script, output);
        output.close();
        try {
View Full Code Here

     * Emit DMDL script into the temporary folder to generate Java model classes later.
     * @param model the model
     * @see #generateJava()
     */
    protected void emitDmdl(AstModelDefinition<?> model) {
        AstScript script = new AstScript(null, Collections.singletonList(model));
        StringWriter buffer = new StringWriter();
        PrintWriter output = new PrintWriter(buffer);
        DmdlEmitter.emit(script, output);
        output.close();
        try {
View Full Code Here

     * Emit DMDL script into the temporary folder to generate Java model classes later.
     * @param model the model
     * @see #generateJava()
     */
    protected void emitDmdl(AstModelDefinition<?> model) {
        AstScript script = new AstScript(null, Collections.singletonList(model));
        StringWriter buffer = new StringWriter();
        PrintWriter output = new PrintWriter(buffer);
        DmdlEmitter.emit(script, output);
        output.close();
        try {
View Full Code Here

     * Resolves context script.
     * @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();
View Full Code Here

            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

     */
    public void emit(ModelDescription model) throws IOException {
        if (model == null) {
            throw new IllegalArgumentException("model must not be null"); //$NON-NLS-1$
        }
        AstScript script = convert(model);
        String name = model.getReference().getSimpleName();
        emit(name, script);
    }
View Full Code Here

        } else if (model instanceof SummarizedModelDescription) {
            def = SummarizedModelGenerator.generate((SummarizedModelDescription) model);
        } else {
            throw new AssertionError(model);
        }
        return new AstScript(null, Collections.singletonList(def));
    }
View Full Code Here

            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

Related Classes of com.asakusafw.dmdl.model.AstScript

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.