Package org.syrup

Examples of org.syrup.Task


        /* Check for double naming and prepare datastructures */
        for (int t = 0; t < tasks.length; t++)
        {

            Task tt = tasks[t];

            if (taskNames.get(tt.name()) != null)
            {
                throw new Exception("more then one Task with name: "
                    + tt.name());
            }
            else
            {
                taskNames.put(tt.name(), tt);
                taskContexts.put(tt, new HashMap());
            }
        }

        // Check if there are no Ports that have multiple Links attached
View Full Code Here


    private static void setAndCheckContext(HashMap taskContexts, Port p)
        throws Exception
    {
        if (p != null)
        {
            Task task = p.task();
            if (task != null)
            {
                HashMap context = (HashMap) taskContexts.get(task);
                if (context != null)
                {
View Full Code Here

       
        while (cs.hasNext())
        {
            LinkStruct cc = (LinkStruct) cs.next();

            Task from = pr(cc.from, p);
            Task to = pr(cc.to, p);

            if (from == null
                && to == null)
            {
                throw new Exception("from or to must be a reference");
            }
            c[i++] = new LinkImpl(new OutPortImpl(from, pr_port(cc.from)), new InPortImpl(to, pr_port(cc.to)), new DataImpl(cc.content));
        }

        InPort in1 = null;
        InPort in2 = null;
        OutPort out1 = null;
        OutPort out2 = null;

        if (binding != null)
        {
            in1 = new InPortImpl(pr(binding.in_1, p), pr_port(binding.in_1));
            in2 = new InPortImpl(pr(binding.in_2, p), pr_port(binding.in_2));
            out1 = new OutPortImpl(pr(binding.out_1, p), pr_port(binding.out_1));
            out2 = new OutPortImpl(pr(binding.out_2, p), pr_port(binding.out_2));
        }

        Iterator p_v = p.values().iterator();

        Task pa[] = new Task[p.values().size()];
        i = 0;
        while (p_v.hasNext())
        {
            pa[i++] = (Task) p_v.next();
        }
View Full Code Here

     *            The Map holding all Tasks indentified by name.
     * @return The Task, indentified by it's name.
     */
    private static Task pr_get(String k, Map m) throws Exception
    {
        Task p = (Task) m.get(k);
        if (p == null)
        {
            throw new Exception("Reference to task '"
                + k + "' not found");
        }
View Full Code Here

TOP

Related Classes of org.syrup.Task

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.