All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jason.util.asl2html Maven / Gradle / Ivy

Go to download

Jason is a fully-fledged interpreter for an extended version of AgentSpeak, a BDI agent-oriented logic programming language.

There is a newer version: 2.3
Show newest version
package jason.util;

import javax.xml.transform.Transformer;
import javax.xml.transform.stream.StreamSource;



/** 
 * Convert an agent asl code to HTML. 
 *
 * @author Jomi
 */
public class asl2html extends asl2xml {

    String style = "/xml/asl2html.xsl";
    
    public asl2html() {}
    public asl2html(String style) {
        this.style = style;
    }
    
    public static void main(String[] args) throws Exception {
        if (args.length != 1) {
            System.err.println("The asl code file must be informed");
            System.exit(1);
        }
        new asl2html().run(args[0]);
    }

    public Transformer getTransformer()  throws Exception {
        if (transCache == null) {
            transCache = getFactory().newTransformer(
                    new StreamSource(asl2html.class.getResource(style).openStream()));
        }
        return transCache;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy