Package it.freedomotic.core

Examples of it.freedomotic.core.Resolver.addContext()


        if (!mostSimilar.isEmpty()) {
            Command c = mostSimilar.get(0).getCommand();
            System.out.println("execute speech command: " + c.getName());

            Resolver resolver = new Resolver();
            resolver.addContext("event.",
                    getPayload());

            try {
                Command resolvedCommand = resolver.resolve(c);
                busService.send(resolvedCommand);
View Full Code Here


                "Environment object ''{0}'' tries to ''{1}'' itself using hardware command ''{2}''",
                new Object[]{pojo.getName(), action, command.getName()});

        Resolver resolver = new Resolver();
        //adding a resolution context for object that owns this hardware level command. 'owner.' is the prefix of this context
        resolver.addContext("owner.",
                getExposedProperties());
        resolver.addContext("owner.",
                getExposedBehaviors());

        try {
View Full Code Here

        Resolver resolver = new Resolver();
        //adding a resolution context for object that owns this hardware level command. 'owner.' is the prefix of this context
        resolver.addContext("owner.",
                getExposedProperties());
        resolver.addContext("owner.",
                getExposedBehaviors());

        try {
            final Command resolvedCommand = resolver.resolve(command); //eg: turn on an X10 device
            //            XStream s = FreedomXStream.getXstream();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.