Package hu.sztaki.ilab.longneck.process.block

Examples of hu.sztaki.ilab.longneck.process.block.Set


        c1equals.setApplyTo("a");
        c1equals.setValue("aaa");
        c1check.setConstraints(Arrays.asList(new Constraint[] { c1equals }));
       
        // Case 1 block
        Set c1set = new Set();
        c1set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 5, 5, 0));
        far.put(c1set);
        c1set.setApplyTo("b");
        c1set.setValue("case1");       
       
        Set c1set2 = new Set();
        c1set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 6, 6, 0));
        far.put(c1set2);
        c1set2.setApplyTo("c1");
        c1set2.setValue("case1");
       
        c1.setBlocks(Arrays.asList(new Block[] { c1check, c1set, c1set2 }));
       
       
        // Case 2
        Case c2 = new Case();
        c2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 7, 7, 0));
        far.put(c2);
       
        // Case 2 check
        Check c2check = new Check();
        c2check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 8, 8, 0));
        far.put(c2check);
       
        EqualsConstraint c2equals = new EqualsConstraint();
        c2equals.setApplyTo("a");
        c2equals.setValue("bbb");
        c2check.setConstraints(Arrays.asList(new Constraint[] { c2equals }));
       
        // Case 2 block
        Set c2set = new Set();
        c2set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 9, 9, 0));
        far.put(c2set);
        c2set.setApplyTo("b");
        c2set.setValue("case2");
       
        Set c2set2 = new Set();
        c2set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 10, 10, 0));
        far.put(c2set2);
        c2set2.setApplyTo("c2");
        c2set2.setValue("case2");
       
        c2.setBlocks(Arrays.asList(new Block[] { c2check, c2set, c2set2 }));

       
        // Case 3
        Case c3 = new Case();
        c3.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 11, 11, 0));
        far.put(c1);
       
        // Case 3 block
        Set c3set = new Set();
        c3set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 13, 13, 0));
        far.put(c3set);
        c3set.setApplyTo("b");
        c3set.setValue("case3");       
       
        Set c3set2 = new Set();
        c3set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 14, 14, 0));
        far.put(c3set2);
        c3set2.setApplyTo("c3");
        c3set2.setValue("case3");
       
        c3.setBlocks(Arrays.asList(new Block[] { c3set, c3set2 }));

        Set afterSet = new Set();
        afterSet.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 15, 15, 0));
        far.put(afterSet);
        afterSet.setApplyTo("after");
        afterSet.setValue("true");

        // Add cases to switch
        ta.setCases(Arrays.asList(new Case[] { c1, c2, c3 }));
        // Add blocks to top-level sequence       
        seq.setBlocks(Arrays.asList(new Block[] { ta, afterSet }));
View Full Code Here


        GenericBlock b1 = new GenericBlock();
        b1.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", null, 1, 1, 0));
        b1.setId("b1");
        b1.setVersion("1");
       
        Set b1set = new Set();
        b1set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 2, 2, 0));
        far.put(b1set);
        b1set.setApplyTo("b");
        b1set.setValue("b1");       
       
        BlockReference br2 = new BlockReference();
        br2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 3, 3, 0));
        far.put(br2);
        br2.setId("pkg1:b2");
        br2.setVersion("1");
       
        Set b1set2 = new Set();
        b1set2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 4, 4, 0));
        far.put(b1set2);
        b1set2.setApplyTo("c");
        b1set2.setValue("b1");
       
        b1.setBlocks(Arrays.asList(new Block[] { b1set, br2, b1set2 }));
       
        // Block 2
        GenericBlock b2 = new GenericBlock();
        b2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", null, 5, 5, 0));
        b2.setId("b2");
        b2.setVersion("1");
       
        Set b2set = new Set();
        b2set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 6, 6, 0));
        far.put(b2set);
        b2set.setApplyTo("b");
        b2set.setValue("b2");
       
        Set b2set2 = new Set();
        b2set2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 7, 7, 0));
        far.put(b2set2);
        b2set2.setApplyTo("d");
        b2set2.setValue("b2");
       
        b2.setBlocks(Arrays.asList(new Block[] { b2set, b2set2 }));
        br2.setReferredBlock(b2);
       
       
View Full Code Here

        GenericBlock b1 = new GenericBlock();
        b1.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", null, 1, 1, 0));
        b1.setId("b1");
        b1.setVersion("1");
       
        Set b1set = new Set();
        b1set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 2, 2, 0));
        far.put(b1set);
        b1set.setApplyTo("b");
        b1set.setValue("b1");       
       
        BlockReference br2 = new BlockReference();
        br2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 3, 3, 0));
        far.put(br2);
        br2.setId("pkg1:b2");
        br2.setVersion("1");
       
        Set b1set2 = new Set();
        b1set2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 4, 4, 0));
        far.put(b1set2);
        b1set2.setApplyTo("c");
        b1set2.setValue("b1");
       
        b1.setBlocks(Arrays.asList(new Block[] { b1set, br2, b1set2 }));
       
        // Block 2
        GenericBlock b2 = new GenericBlock();
        b2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", null, 5, 5, 0));
        b2.setId("b2");
        b2.setVersion("1");
       
        Check b2check = new Check();
        b2check.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 6, 6, 0));
        far.put(b2check);
       
        EqualsConstraint equals = new EqualsConstraint();
        equals.setApplyTo("a");
        equals.setValue("xxx");
        b2check.setConstraints(Arrays.asList(new Constraint[] { equals }));
       
        Set b2set = new Set();
        b2set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 6, 6, 0));
        far.put(b2set);
        b2set.setApplyTo("b");
        b2set.setValue("b2");
       
        Set b2set2 = new Set();
        b2set2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 7, 7, 0));
        far.put(b2set2);
        b2set2.setApplyTo("d");
        b2set2.setValue("b2");
       
        b2.setBlocks(Arrays.asList(new Block[] { b2check, b2set, b2set2 }));
        br2.setReferredBlock(b2);
       
       
View Full Code Here

        GenericBlock b1 = new GenericBlock();
        b1.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", null, 1, 1, 0));
        b1.setId("b1");
        b1.setVersion("1");
       
        Set b1set = new Set();
        b1set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 2, 2, 0));
        far.put(b1set);
        b1set.setApplyTo("b");
        b1set.setValue("b1");       
       
        BlockReference br2 = new BlockReference();
        br2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 3, 3, 0));
        far.put(br2);
        br2.setId("pkg1:b2");
        br2.setVersion("1");
        br2.setPropagateFailure(true);
       
        Set b1set2 = new Set();
        b1set2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 4, 4, 0));
        far.put(b1set2);
        b1set2.setApplyTo("c");
        b1set2.setValue("b1");
       
        b1.setBlocks(Arrays.asList(new Block[] { b1set, br2, b1set2 }));
       
        // Block 2
        GenericBlock b2 = new GenericBlock();
        b2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", null, 5, 5, 0));
        b2.setId("b2");
        b2.setVersion("1");
       
        Check b2check = new Check();
        b2check.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 6, 6, 0));
        far.put(b2check);
       
        EqualsConstraint equals = new EqualsConstraint();
        equals.setApplyTo("a");
        equals.setValue("xxx");
        b2check.setConstraints(Arrays.asList(new Constraint[] { equals }));
       
        Set b2set = new Set();
        b2set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 7, 7, 0));
        far.put(b2set);
        b2set.setApplyTo("b");
        b2set.setValue("b2");
       
        Set b2set2 = new Set();
        b2set2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 8, 8, 0));
        far.put(b2set2);
        b2set2.setApplyTo("d");
        b2set2.setValue("b2");
       
        b2.setBlocks(Arrays.asList(new Block[] { b2check, b2set, b2set2 }));
        br2.setReferredBlock(b2);
       
       
View Full Code Here

        GenericBlock b1 = new GenericBlock();
        b1.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", null, 1, 1, 0));
        b1.setId("b1");
        b1.setVersion("1");

        Set b1set = new Set();
        b1set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 2, 2, 0));
        far.put(b1set);
        b1set.setApplyTo("b");
        b1set.setValue("b1");

        BlockReference br2 = new BlockReference();
        br2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 3, 3, 0));
        far.put(br2);
        br2.setId("pkg1:b2");
        br2.setVersion("1");
        Mapping mapping1 = new Mapping();
        Map map1 = new Map();
        map1.setTo("d");
        map1.setFrom("b");
        mapping1.addRule(map1);
        Map map11 = new Map();
        map11.setTo("c");
        map11.setFrom("f");
        mapping1.addRule(map11);
        br2.setMapping(mapping1);

        Set b1set2 = new Set();
        b1set2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 4, 4, 0));
        far.put(b1set2);
        b1set2.setApplyTo("a");
        b1set2.setValue("error");
       
        CloneRecord b1clone = new CloneRecord();
        b1clone.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 5, 5, 0));
        far.put(b1clone);
        b1clone.setFieldName("b");
        b1clone.setFieldValue("b3");

        b1.setBlocks(Arrays.asList(new Block[]{b1set, br2, b1set2, b1clone}));

        // Block 2
        GenericBlock b2 = new GenericBlock();
        b2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", null, 6, 6, 0));
        b2.setId("b2");
        b2.setVersion("1");

        Set b2set = new Set();
        b2set.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 7, 7, 0));
        far.put(b2set);
        b2set.setApplyTo("e");
        b2set.setValue("b2");

        Copy b2copy = new Copy();
        b2copy.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 8, 8, 0));
        far.put(b2copy);
        b2copy.setApplyTo("d");
        b2copy.setFrom("e");

        Set b2set2 = new Set();
        b2set2.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 9, 9, 0));
        far.put(b2set2);
        b2set2.setApplyTo("b");
        b2set2.setValue("error");

        Set b2set3 = new Set();
        b2set3.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 10, 10, 0));
        far.put(b2set2);
        b2set3.setApplyTo("a");
        b2set3.setValue("error");

        Set b2set4 = new Set();
        b2set4.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b2:1", 11, 11, 0));
        far.put(b2set4);
        b2set4.setApplyTo("c");
        b2set4.setValue("ok");
       
        CloneRecord b2clone = new CloneRecord();
        b2clone.setSourceInfo(new SourceInfo("file:///pkg1.blocks.xml", "b1:1", 12, 12, 0));
        far.put(b2clone);
View Full Code Here

        ifBlock.setConstraints(Arrays.asList(new Constraint[] { equals }));
       
        Sequence thenBranch = new Sequence();
        thenBranch.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 2, 2, 0));
        far.put(thenBranch);
        Set setbThen = new Set();
        setbThen.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 3, 3, 0));
        setbThen.setApplyTo("b");
        setbThen.setValue("then");       
        thenBranch.setBlocks(Arrays.asList(new Block[] { setbThen }));
        ifBlock.setThenBranch(thenBranch);
       
        Sequence elseBranch = new Sequence();
        elseBranch.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 4, 4, 0));
        far.put(elseBranch);
        Set setbElse = new Set();
        setbElse.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 5, 5, 0));
        setbElse.setApplyTo("b");
        setbElse.setValue("else");       
        elseBranch.setBlocks(Arrays.asList(new Block[] { setbElse }));
        ifBlock.setElseBranch(elseBranch);

        return seq;
    }
View Full Code Here

        c1equals.setApplyTo("a");
        c1equals.setValue("aaa");
        c1check.setConstraints(Arrays.asList(new Constraint[] { c1equals }));
       
        // Case 1 block
        Set c1set = new Set();
        c1set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 5, 5, 0));
        far.put(c1set);
        c1set.setApplyTo("b");
        c1set.setValue("case1");       
       
        Set c1set2 = new Set();
        c1set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 6, 6, 0));
        far.put(c1set2);
        c1set2.setApplyTo("c1");
        c1set2.setValue("case1");
       
        c1.setBlocks(Arrays.asList(new Block[] { c1check, c1set, c1set2 }));
       
       
        // Case 2
        Case c2 = new Case();
        c2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 7, 7, 0));
        far.put(c2);
       
        // Case 2 check
        Check c2check = new Check();
        c2check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 8, 8, 0));
        far.put(c2check);
       
        EqualsConstraint c2equals = new EqualsConstraint();
        c2equals.setApplyTo("a");
        c2equals.setValue("bbb");
        c2check.setConstraints(Arrays.asList(new Constraint[] { c2equals }));
       
        // Case 2 block
        Set c2set = new Set();
        c2set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 9, 9, 0));
        far.put(c2set);
        c2set.setApplyTo("b");
        c2set.setValue("case2");
       
        Set c2set2 = new Set();
        c2set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 10, 10, 0));
        far.put(c2set2);
        c2set2.setApplyTo("c2");
        c2set2.setValue("case2");
       
        c2.setBlocks(Arrays.asList(new Block[] { c2check, c2set, c2set2 }));

       
        // Case 3
        Case c3 = new Case();
        c3.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 11, 11, 0));
        far.put(c1);
       
        // Case 3 check
        Check c3check = new Check();
        c3check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 12, 12, 0));
        far.put(c3check);
       
        EqualsConstraint c3equals = new EqualsConstraint();
        c3equals.setApplyTo("a");
        c3equals.setValue("ccc");
        c3check.setConstraints(Arrays.asList(new Constraint[] { c3equals }));
       
        // Case 3 block
        Set c3set = new Set();
        c3set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 13, 13, 0));
        far.put(c3set);
        c3set.setApplyTo("b");
        c3set.setValue("case3");       
       
        Set c3set2 = new Set();
        c3set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 14, 14, 0));
        far.put(c3set2);
        c3set2.setApplyTo("c3");
        c3set2.setValue("case3");
       
        c3.setBlocks(Arrays.asList(new Block[] { c3check, c3set, c3set2 }));

        Set afterSet = new Set();
        afterSet.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 15, 15, 0));
        far.put(afterSet);
        afterSet.setApplyTo("after");
        afterSet.setValue("true");

        // Add cases to switch
        ss.setCases(Arrays.asList(new Case[] { c1, c2, c3 }));
        // Add blocks to top-level sequence       
        seq.setBlocks(Arrays.asList(new Block[] { ss, afterSet }));
View Full Code Here

        c1equals.setApplyTo("a");
        c1equals.setValue("aaa");
        c1check.setConstraints(Arrays.asList(new Constraint[] { c1equals }));
       
        // Case 1 block
        Set c1set = new Set();
        c1set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 5, 5, 0));
        far.put(c1set);
        c1set.setApplyTo("b");
        c1set.setValue("case1");       
       
        Set c1set2 = new Set();
        c1set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 6, 6, 0));
        far.put(c1set2);
        c1set2.setApplyTo("c1");
        c1set2.setValue("case1");
       
        c1.setBlocks(Arrays.asList(new Block[] { c1check, c1set, c1set2 }));
       
       
        // Case 2
        Case c2 = new Case();
        c2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 7, 7, 0));
        far.put(c2);
       
        // Case 2 check
        Check c2check = new Check();
        c2check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 8, 8, 0));
        far.put(c2check);
       
        EqualsConstraint c2equals = new EqualsConstraint();
        c2equals.setApplyTo("a");
        c2equals.setValue("bbb");
        c2check.setConstraints(Arrays.asList(new Constraint[] { c2equals }));
       
        // Case 2 block
        Set c2set = new Set();
        c2set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 9, 9, 0));
        far.put(c2set);
        c2set.setApplyTo("b");
        c2set.setValue("case2");
       
        Set c2set2 = new Set();
        c2set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 10, 10, 0));
        far.put(c2set2);
        c2set2.setApplyTo("c2");
        c2set2.setValue("case2");
       
        c2.setBlocks(Arrays.asList(new Block[] { c2check, c2set, c2set2 }));

       
        // Case 3
        Case c3 = new Case();
        c3.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 11, 11, 0));
        far.put(c1);
       
        // Case 3 check
        Check c3check = new Check();
        c3check.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 12, 12, 0));
        far.put(c3check);
       
        EqualsConstraint c3equals = new EqualsConstraint();
        c3equals.setApplyTo("a");
        c3equals.setValue("ccc");
        c3check.setConstraints(Arrays.asList(new Constraint[] { c3equals }));
       
        // Case 3 block
        Set c3set = new Set();
        c3set.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 13, 13, 0));
        far.put(c3set);
        c3set.setApplyTo("b");
        c3set.setValue("case3");       
       
        Set c3set2 = new Set();
        c3set2.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 14, 14, 0));
        far.put(c3set2);
        c3set2.setApplyTo("c3");
        c3set2.setValue("case3");
       
        c3.setBlocks(Arrays.asList(new Block[] { c3check, c3set, c3set2 }));

        Set afterSet = new Set();
        afterSet.setSourceInfo(new SourceInfo("file:///dummy.xml", null, 15, 15, 0));
        far.put(afterSet);
        afterSet.setApplyTo("after");
        afterSet.setValue("true");

        // Add cases to switch
        sw.setCases(Arrays.asList(new Case[] { c1, c2, c3 }));
        // Add blocks to top-level sequence       
        seq.setBlocks(Arrays.asList(new Block[] { sw, afterSet }));
View Full Code Here

TOP

Related Classes of hu.sztaki.ilab.longneck.process.block.Set

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.