示例#1
0
文件: WebTest.cs 项目: cip4/JDFLibNet
        public virtual void testDirectImage()
        {
            JDFElement.setLongID(false);
            doc  = new JDFDoc("JDF");
            node = doc.getJDFRoot();
            node.setType(EnumType.Combined);
            VString vTypes = new VString("ImageSetting ConventionalPrinting", " ");

            node.setTypes(vTypes);
            nodeInfo = node.appendNodeInfo();
            nodeInfo.setResStatus(EnumResStatus.Available, true);
            JDFRunList rl = (JDFRunList)node.appendMatchingResource(ElementName.RUNLIST, EnumProcessUsage.AnyInput, null);
            JDFByteMap bm = rl.appendByteMap();

            bm.appendFileSpec().setURL("FileInfo:///foo.tif");
            JDFExposedMedia xm = (JDFExposedMedia)node.appendMatchingResource(ElementName.EXPOSEDMEDIA, EnumProcessUsage.Plate, null);

            xm.setDescriptiveName("Real Plate");
            xm.appendMedia();
            JDFExposedMedia xmCyl = (JDFExposedMedia)node.appendMatchingResource(ElementName.EXPOSEDMEDIA, EnumProcessUsage.Cylinder, null);

            xmCyl.setDescriptiveName("Optional cylinder");
            node.linkMatchingResource(xmCyl, EnumProcessUsage.AnyOutput, null);
            Assert.AreEqual(3, node.getResourceLinkPool().numChildElements("ExposedMediaLink", null), "2 for cylinder one for plate");
            doc.write2File(sm_dirTestDataTemp + "webDirect.jdf", 2, false);
        }