Ejemplo n.º 1
0
        public virtual void testLayerRunListComplex()
        {
            JDFElement.setLongID(false);
            setUpDoc();
            setupRunList(1);
            setupLayout(true);

            n.setPartStatus(new JDFAttributeMap(EnumPartIDKey.PartVersion, "De"), EnumNodeStatus.Completed, null);
            JDFResourceLink rl = n.getLink(rlIn, null);

            rl.setPartition(EnumPartIDKey.PartVersion, "De Euro");
            d.write2File(sm_dirTestDataTemp + "LayerListDeEuro.jdf", 2, false);

            VJDFAttributeMap vMap = new VJDFAttributeMap();
            JDFAttributeMap  map  = new JDFAttributeMap();

            map.put(EnumPartIDKey.PartVersion, "De");
            map.put(EnumPartIDKey.LayerIDs, "1");
            vMap.Add(map);

            map = new JDFAttributeMap();
            map.put(EnumPartIDKey.PartVersion, "Euro");
            map.put(EnumPartIDKey.LayerIDs, "2");
            vMap.Add(map);
            rl.setPartMapVector(vMap);

            rl.setDescriptiveName("Only DE + Euro, no bkg partversion is selected");
            d.write2File(sm_dirTestDataTemp + "LayerListDeEuro_BKG.jdf", 2, false);
        }
Ejemplo n.º 2
0
        public virtual void testAmountPalletteCompleteManifest()
        {
            JDFElement.setLongID(false);
            JDFDoc  d = new JDFDoc("JDF");
            JDFNode n = d.getJDFRoot();

            n.setType(EnumType.ProcessGroup);
            n.setTypes(new VString("Binding Stacking BoxPacking Palletizing", " "));
            JDFComponent    comp = (JDFComponent)n.addResource(ElementName.COMPONENT, null, EnumUsage.Output, null, null, null, null);
            JDFResourceLink rl   = n.getLink(comp, null);

            rl.setAmount(2, null);
            rl.setDescriptiveName("The link point to 2 pallets with a total comtent of 10000 brochures in 200 boxes");
            JDFComponent compBrochure = (JDFComponent)n.addResource(ElementName.COMPONENT, null, EnumUsage.Input, null, null, null, null);

            compBrochure.setResStatus(EnumResStatus.Available, true);
            compBrochure.setDescriptiveName("The individual Brochures");
            JDFResourceLink rlB = n.getLink(compBrochure, null);

            rlB.setAmount(10000, null);
            rlB.setActualAmount(9700, null);

            for (int i = 0; i < 2; i++)
            {
                // create a pallet partition - may also use the root
                JDFComponent compPallet = (JDFComponent)comp.addPartition(EnumPartIDKey.DeliveryUnit0, "Pallet" + i);
                compPallet.setProductID("Pallet_" + i);

                JDFBundle bundlePallet = compPallet.getCreateBundle();
                int       nBox         = i == 0 ? 100 : 94;
                bundlePallet.setDescriptiveName("Pallet Bundle describing " + nBox + " boxes with " + nBox * 50 + " Brochures Contents total");
                bundlePallet.setTotalAmount(nBox * 50);
                bundlePallet.setBundleType(EnumBundleType.Pallet);

                for (int j = 0; j < nBox; j++)
                {
                    JDFBundleItem biBoxes = bundlePallet.appendBundleItem();
                    JDFComponent  compBox = (JDFComponent)compPallet.addPartition(EnumPartIDKey.DeliveryUnit1, "Box_" + i + "_" + j);
                    compBox.setProductID("Box_" + i + "_" + j);
                    biBoxes.refElement(compBox);
                    biBoxes.setAmount(1);

                    JDFBundle bundleBox = compBox.appendBundle();
                    bundleBox.setDescriptiveName("Bundle describing box #" + j + " with 50 Brochures Contents per box");
                    bundleBox.setTotalAmount(50);
                    bundleBox.setBundleType(EnumBundleType.Box);

                    JDFBundleItem biBrochures = bundleBox.appendBundleItem();
                    biBrochures.refElement(compBrochure);
                    biBrochures.setAmount(50);
                }
            }

            d.write2File(sm_dirTestDataTemp + "MISFinAmountCompleteManifest.jdf", 2, false);
        }
Ejemplo n.º 3
0
        public virtual void testAmount()
        {
            JDFElement.setLongID(false);
            JDFDoc  d = new JDFDoc("JDF");
            JDFNode n = d.getJDFRoot();

            n.setType(EnumType.ProcessGroup);
            n.setTypes(new VString("Binding Stacking BoxPacking Palletizing", " "));
            JDFComponent    comp = (JDFComponent)n.addResource(ElementName.COMPONENT, null, EnumUsage.Output, null, null, null, null);
            JDFResourceLink rl   = n.getLink(comp, null);

            rl.setAmount(2, null);
            rl.setDescriptiveName("The link point to 2 pallets with a total comtent of 10000 brochures in 200 boxes");

            // create a pallet partition - may also use the root
            JDFComponent compPallet = (JDFComponent)comp.addPartition(EnumPartIDKey.DeliveryUnit0, "Pallet");

            JDFComponent compBox      = (JDFComponent)compPallet.addPartition(EnumPartIDKey.DeliveryUnit1, "Box");
            JDFBundle    bundlePallet = compPallet.appendBundle();

            bundlePallet.setDescriptiveName("Bundle describing 100 boxes with 5000 Brochures Contents total");
            bundlePallet.setTotalAmount(5000);
            bundlePallet.setBundleType(EnumBundleType.Pallet);
            JDFBundleItem biBoxes = bundlePallet.appendBundleItem();

            biBoxes.refElement(compBox);
            biBoxes.setAmount(100);

            JDFComponent compBrochure = (JDFComponent)compBox.addPartition(EnumPartIDKey.DeliveryUnit2, "Brochure");
            JDFBundle    bundleBox    = compBox.appendBundle();

            bundleBox.setDescriptiveName("Bundle describing 1 boxes with 50 Brochures Contents per box");
            bundleBox.setTotalAmount(50);
            bundleBox.setBundleType(EnumBundleType.Box);

            JDFBundleItem biBrochures = bundleBox.appendBundleItem();

            biBrochures.refElement(compBrochure);
            biBrochures.setAmount(50);

            JDFBundle bundleBrochure = compBrochure.appendBundle();

            bundleBrochure.setDescriptiveName("Dummy Bundle to inhibit inheritence of the box Bundle");
            d.write2File(sm_dirTestDataTemp + "MISFinAmount.jdf", 2, false);
        }
Ejemplo n.º 4
0
        public virtual void testLayerRunListIdentical()
        {
            JDFElement.setLongID(false);
            setUpDoc();
            setupRunList(2);
            setupLayout(true);

            n.setPartStatus(new JDFAttributeMap(EnumPartIDKey.PartVersion, "De"), EnumNodeStatus.Completed, null);
            JDFResourceLink rl = n.getLink(rlIn, null);

            rl.setPartition(EnumPartIDKey.PartVersion, "De");
            d.write2File(sm_dirTestDataTemp + "LayerListDeEuroIdentical.jdf", 2, false);

            JDFAttributeMap map = new JDFAttributeMap();

            map.put(EnumPartIDKey.PartVersion, "De");
            map.put(EnumPartIDKey.LayerIDs, "1 2");

            rl.setPartMap(map);

            rl.setDescriptiveName("Only Language + Currency, no bkg partversion is selected");
            d.write2File(sm_dirTestDataTemp + "LayerListDeEuroIdentical_BKG.jdf", 2, false);
        }
Ejemplo n.º 5
0
        public virtual void testLayerRunList()
        {
            JDFElement.setLongID(false);
            setUpDoc();
            JDFIntegerRangeList pageRange = new JDFIntegerRangeList(new JDFIntegerRange(0, -1, 16));

            rlIn.setDescriptiveName("Layers are just another partversion layer selection in the link is achieved using multiple partversions");

            JDFRunList rlAll = (JDFRunList)rlIn.addPartition(EnumPartIDKey.PartVersion, "CMYK");

            rlAll.setFileURL("background.pdf");
            rlAll.setPages(pageRange);

            JDFRunList rlEn = (JDFRunList)rlIn.addPartition(EnumPartIDKey.PartVersion, "FR");

            rlEn.setFileURL("Francais.pdf");
            rlEn.setPages(pageRange);
            rlEn.setLogicalPage(16);

            JDFRunList rlDe = (JDFRunList)rlIn.addPartition(EnumPartIDKey.PartVersion, "De");

            rlDe.setFileURL("deutsch.pdf");
            rlDe.setPages(pageRange);
            rlDe.setLogicalPage(16);

            setupLayout(false);

            n.setPartStatus(new JDFAttributeMap(EnumPartIDKey.PartVersion, "De"), EnumNodeStatus.Completed, null);
            JDFResourceLink rl = n.getLink(rlIn, null);

            rl.setPartition(EnumPartIDKey.PartVersion, "CMYK De");
            d.write2File(sm_dirTestDataTemp + "LayerList.jdf", 2, false);
            rl.setPartition(EnumPartIDKey.PartVersion, "De");
            rl.setDescriptiveName("Only DE, no bkg partversion is selected");
            d.write2File(sm_dirTestDataTemp + "LayerList_BKG.jdf", 2, false);
        }
Ejemplo n.º 6
0
        public virtual void testAmount()
        {
            rlComp.setAmount(20, null);
            rlComp.setDescriptiveName("The link points to 20 planned and 20 good + 2 Waste brochures");

            JDFMiscConsumable mc = (JDFMiscConsumable)n.appendMatchingResource(ElementName.MISCCONSUMABLE, EnumProcessUsage.AnyInput, null);

            mc.setResStatus(EnumResStatus.Available, false);
            mc.setConsumableType("FooBar");
            mc.setUnit("Fnarfs");
            mc.setDescriptiveName("FooBars are always measured in Fnarfs");
            JDFResourceLink rlmc = n.getLink(mc, null);

            rlmc.setAmount(42, null);
            rlmc.setDescriptiveName("The link points to 42 actual FooBars");

            JDFUsageCounter uc = (JDFUsageCounter)n.appendMatchingResource(ElementName.USAGECOUNTER, EnumProcessUsage.AnyInput, null);

            uc.setResStatus(EnumResStatus.Available, false);
            uc.setCounterTypes(new VString("Click", " "));
            JDFResourceLink rlu = n.getLink(uc, null);

            rlu.setAmount(200, null);
            rlu.setDescriptiveName("The link points to 200 actual clicks");

            rlMedia.setAmount(100, null);
            rlMedia.setDescriptiveName("The link points to 100 actual sheets");

            Thread.Sleep(1000);
            comp.setResStatus(EnumResStatus.Available, true);

            VElement vRL = new VElement();

            vRL.Add(rlComp);
            vRL.Add(rlu);
            vRL.Add(rlMedia);
            vRL.Add(rlmc);
            StatusUtil stUtil = new StatusUtil(n, null, vRL);

            stUtil.setDeviceID("MyDevice");
            stUtil.setTrackWaste(rlMedia, true);
            stUtil.setTrackWaste(rlComp, true);
            stUtil.setCopyResInResInfo(rlu, true);

            doc.write2File(sm_dirTestDataTemp + "DigiPrintAmount_initial.jdf", 2, false);

            AmountBag[] bags = new AmountBag[vRL.Count];
            bags[0] = new AmountBag(rlComp.getrRef());
            bags[1] = new AmountBag(rlu.getrRef());
            bags[2] = new AmountBag(rlMedia.getrRef());
            bags[3] = new AmountBag(rlmc.getrRef());
            stUtil.setPhase(EnumNodeStatus.InProgress, "Waste", EnumDeviceStatus.Running, null, bags);
            JDFDoc docStatusJMF = stUtil.getDocJMFPhaseTime();

            docStatusJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountStatus0.jmf", 2, false);
            JDFDoc docResJMF = stUtil.getDocJMFResource();

            docResJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountResource0.jmf", 2, false);

            bags[0].addPhase(0, 2, true);
            bags[1].addPhase(0, 20, true);
            bags[2].addPhase(0, 10, true);
            bags[3].addPhase(0, 0, true);
            stUtil.setPhase(EnumNodeStatus.InProgress, "Waste", EnumDeviceStatus.Running, null, bags);
            docStatusJMF = stUtil.getDocJMFPhaseTime();
            docStatusJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountStatus1.jmf", 2, false);
            docResJMF = stUtil.getDocJMFResource();
            docResJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountResource1.jmf", 2, false);

            bags[0].addPhase(15, 0, true);
            bags[1].addPhase(150, 0, true);
            bags[2].addPhase(75, 0, true);
            bags[3].addPhase(32, 0, true);
            stUtil.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null, bags);
            docStatusJMF = stUtil.getDocJMFPhaseTime();
            docStatusJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountStatus2.jmf", 2, false);
            docResJMF = stUtil.getDocJMFResource();
            docResJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountResource2.jmf", 2, false);

            bags[0].addPhase(5, 0, false);
            bags[1].addPhase(50, 0, false);
            bags[2].addPhase(25, 0, false);
            bags[3].addPhase(11, 0, false);
            stUtil.setPhase(EnumNodeStatus.InProgress, "Good", EnumDeviceStatus.Running, null, bags);
            docStatusJMF = stUtil.getDocJMFPhaseTime();
            docStatusJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountStatus3.jmf", 2, false);
            docResJMF = stUtil.getDocJMFResource();
            docResJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountResource3.jmf", 2, false);

            bags[0].addPhase(0, 0, true);
            bags[1].addPhase(0, 0, true);
            bags[2].addPhase(0, 0, true);
            bags[3].addPhase(0, 0, true);
            stUtil.setPhase(EnumNodeStatus.Completed, "Idle", EnumDeviceStatus.Idle, null, bags);
            docStatusJMF = stUtil.getDocJMFPhaseTime();
            docStatusJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountStatus4.jmf", 2, false);
            docResJMF = stUtil.getDocJMFResource();
            docResJMF.write2File(sm_dirTestDataTemp + "DigiPrintAmountResource4.jmf", 2, false);

            doc.write2File(sm_dirTestDataTemp + "DigiPrintAmount_final.jdf", 2, false);
        }