コード例 #1
0
        ///
        ///     <summary> *  </summary>
        ///
        protected internal virtual JDFDevice initDevice(JDFNode previousNode)
        {
            JDFDevice dev = (JDFDevice)theNode.getResource(ElementName.DEVICE, EnumUsage.Input, 0);

            if (dev == null && devID != null)
            {
                JDFResourceLink rl = null;
                dev = (JDFDevice)(theParentNode != null ? theParentNode.getResource(ElementName.DEVICE, EnumUsage.Input, 0) : null);
                if (dev == null)
                {
                    dev = (JDFDevice)theNode.getCreateResource(ElementName.DEVICE, EnumUsage.Input, 0);
                    dev.setDeviceID(devID);
                    rl = theNode.getLink(dev, EnumUsage.Input);
                }
                else
                {
                    rl = theNode.getLink(dev, EnumUsage.Input);
                    if (rl == null)
                    {
                        rl = theNode.linkResource(dev, EnumUsage.Input, null);
                    }
                }
            }
            return(dev);
        }
コード例 #2
0
        ///
        ///	 * <param name="icsLevel"> </param>
        ///
        protected internal virtual JDFComponent initOutputComponent(JDFNode node, JDFLayoutIntent li, string productType)
        {
            JDFComponent outComp = (JDFComponent)node.getCreateResource(ElementName.COMPONENT, EnumUsage.Output, 0);

            if (productType == null)
            {
                outComp.setComponentType(EnumComponentType.FinalProduct, EnumComponentType.Sheet);
            }
            else
            {
                outComp.setComponentType(EnumComponentType.PartialProduct, EnumComponentType.Sheet);
                outComp.setProductType(productType);
            }
            theNode.getResource(ElementName.LAYOUTINTENT, null, 0);
            JDFShape s = li.getFinishedDimensions().getActual();

            outComp.setDimensions(s);
            if (theNode != node)
            {
                theNode.getResourcePool().moveElement(outComp, null);
                theNode.linkResource(outComp, EnumUsage.Output, null);
            }
            return(outComp);
        }