Class WoolResourceFileLoader

  • All Implemented Interfaces:
    WoolFileLoader

    public class WoolResourceFileLoader
    extends Object
    implements WoolFileLoader
    This WOOL file loader can load files from resources on the classpath. The files should be organized as language/speaker/dialogue-name.wool or language/speaker/dialogue-name.json. Example: en/robin/intro.wool

    The files should be specified in project file "dialogues.json" in the root directory. This can automatically be generated at build time. It should be structured like:

    {
        "en": {
            "robin":[
                "dialogue1.wool",
                "dialogue2.wool",
                "dialogue3.json"
            ]
        }
    }

    • Constructor Detail

      • WoolResourceFileLoader

        public WoolResourceFileLoader​(String resourcePath)
        Constructs a new instance.
        Parameters:
        resourcePath - the resource path (without leading or trailing slash)