예제 #1
0
        ///
        ///	 * <param name="icsLevel"> </param>
        ///
        protected internal override JDFNodeInfo initNodeInfo()
        {
            JDFNodeInfo ni = base.initNodeInfo();

            if (theParentNode == null)
            {
                JDFEmployee emp = ni.appendEmployee();
                emp.setPersonalID("personalID1");
                emp.setRoles(new VString("CSR", null));
                if (returnURL != null)
                {
                    ni.setTargetRoute(returnURL);
                }

                if (jmfICSLevel >= 1 && misICSLevel >= 2 || misURL != null)
                {
                    JDFJMF jmf = ni.appendJMF();
                    jmf.setSenderID("MISGTSender");
                    JDFQuery q = jmf.appendQuery(EnumType.Status);
                    q.setID(q.getID() + (System.DateTime.Now.Ticks - 621355968000000000) / 10000 % 100000);

                    //ORIGINAL LINE: final JDFStatusQuParams statusQuParams = q.appendStatusQuParams();
                    JDFStatusQuParams statusQuParams = q.appendStatusQuParams();
                    statusQuParams.setJobID(theNode.getJobID(true));
                    statusQuParams.setJobPartID(theNode.getJobPartID(false));
                    statusQuParams.setJobDetails(EnumJobDetails.Brief);

                    //ORIGINAL LINE: final JDFSubscription subscription = q.appendSubscription();
                    JDFSubscription subscription = q.appendSubscription();
                    subscription.setRepeatTime(600);
                    subscription.setURL(misURL == null ? "http://MIS.printer.com/JMFSignal" : misURL);
                }
            }
            return(ni);
        }
예제 #2
0
        public virtual void testContentData()
        {
            d = new JDFDoc("JDF");
            n = d.getJDFRoot();
            n.setType(EnumType.Approval);
            JDFRunList rl = (JDFRunList)n.addResource(ElementName.RUNLIST, EnumUsage.Input);

            pl = rl.appendPageList();
            pl.makeRootResource("PageList", null, true);

            cl = pl.appendContentList();
            cl.makeRootResource("ContentList", null, true);
            JDFContentData cd0 = cl.appendContentData();

            cd0.setAttribute(AttributeName.CONTENTLISTINDEX, "1 2 3");
            KElement book = cd0.appendElement("ContentMetaData");

            book.setAttribute("ISBN", "0123456789");
            JDFComment abstrakt = (JDFComment)book.appendElement("Comment");

            abstrakt.setName("Abstract");
            abstrakt.setText("Abstract of the book\nin english");
            JDFEmployee editor = (JDFEmployee)book.appendElement(ElementName.EMPLOYEE);

            editor.appendPerson().setFamilyName("authorName");
            editor.setRoles(new VString("Editor", null));
            book.setAttribute("Title", "book thing");
            int p = 1;

            for (int i = 1; i < 4; i++)
            {
                JDFContentData cd = cl.appendContentData();
                cd.setAttribute("ID", "CD_" + i);
                KElement chap = cd.appendElement("ContentMetaData");
                chap.setAttribute("Title", "Chapter " + i);
                JDFEmployee author = (JDFEmployee)chap.appendElement(ElementName.EMPLOYEE);
                author.appendPerson().setFamilyName("authorName" + i);
                author.setRoles(new VString("Author", null));

                JDFPageData         pd = pl.appendPageData();
                JDFIntegerRangeList integerRangeList = new JDFIntegerRangeList();
                integerRangeList.Append(p, p + i);
                p += i + 1;
                pd.setAttribute("PageIndex", integerRangeList.ToString());
                JDFPageElement pe = pd.appendPageElement();
                pe.setAttribute("ContentDataRefs", cd.getID());
            }
            pl.setXMLComment("Note that multiple page elements may but need not be specified\nit is also possible to reference only on pageEleemnt that spans the entire book");

            d.write2File(sm_dirTestDataTemp + "ContentMetaData.jdf", 2, false);
        }
예제 #3
0
        ///
        ///     <summary> * Get all Employee from the current element
        ///     *  </summary>
        ///     * <returns> Collection<JDFEmployee> </returns>
        ///
        public virtual ICollection <JDFEmployee> getAllEmployee()
        {
            List <JDFEmployee> v = new List <JDFEmployee>();

            JDFEmployee kElem = (JDFEmployee)getFirstChildElement(ElementName.EMPLOYEE, null);

            while (kElem != null)
            {
                v.Add(kElem);

                kElem = (JDFEmployee)kElem.getNextSiblingElement(ElementName.EMPLOYEE, null);
            }

            return(v);
        }
예제 #4
0
        public override void setUp()
        {
            d       = creatXMDoc();
            n       = d.getJDFRoot();
            xpMedia = (JDFExposedMedia)n.getMatchingResource("ExposedMedia", null, null, 0);
            JDFResourceLink rlxp = n.getLink(xpMedia, null);

            rlxp.setAmount(100, null);
            sc       = new StatusCounter(n, null, null);
            deviceID = "Status-counter-TestDevice";
            sc.setDeviceID(deviceID);
            resID = xpMedia.getID();
            sc.setFirstRefID(resID);
            sc.addPhase(resID, 200, 0, true);
            employee = (JDFEmployee) new JDFDoc("Employee").getRoot();
            employee.setPersonalID("P1");
            base.setUp();
        }
예제 #5
0
        public virtual void testSetPhase()
        {
            JDFPhaseTime p1 = myAuditPool.setPhase(EnumNodeStatus.Setup, null, null, null);

            Assert.IsNotNull(p1);
            Assert.AreEqual(1, myAuditPool.getChildElementVector(ElementName.PHASETIME, null, null, true, 0, true).Count);
            JDFPhaseTime p2 = myAuditPool.setPhase(EnumNodeStatus.Setup, "foobar", null, null);

            Assert.IsNotNull(p2);
            Assert.AreNotEqual(p1, p2);
            Assert.AreEqual(2, myAuditPool.getChildElementVector(ElementName.PHASETIME, null, null, true, 0, true).Count);
            p2 = myAuditPool.setPhase(EnumNodeStatus.Setup, "foobar", null, null);
            Assert.IsNotNull(p2);
            Assert.AreEqual(2, myAuditPool.getChildElementVector(ElementName.PHASETIME, null, null, true, 0, true).Count);
            p2 = myAuditPool.setPhase(EnumNodeStatus.Ready, "foobar", null, null);
            Assert.IsNotNull(p2);
            Assert.AreEqual(3, myAuditPool.getChildElementVector(ElementName.PHASETIME, null, null, true, 0, true).Count);
            p1 = myAuditPool.setPhase(EnumNodeStatus.InProgress, null, null, null);
            Assert.IsNotNull(p1);
            Assert.AreEqual(4, myAuditPool.getChildElementVector(ElementName.PHASETIME, null, null, true, 0, true).Count);
            p2 = myAuditPool.setPhase(EnumNodeStatus.InProgress, null, null, null);
            Assert.IsNotNull(p2);
            Assert.AreEqual(p1, p2);
            Assert.AreEqual(4, myAuditPool.getChildElementVector(ElementName.PHASETIME, null, null, true, 0, true).Count);
            VElement    vEmpl = new VElement();
            JDFEmployee emp   = (JDFEmployee) new JDFDoc(ElementName.EMPLOYEE).getRoot();

            emp.setPersonalID("p1");
            vEmpl.Add(emp);
            p2 = myAuditPool.setPhase(EnumNodeStatus.InProgress, null, null, vEmpl);
            Assert.IsNotNull(p2);
            Assert.AreNotEqual(p1, p2);
            Assert.IsTrue(p2.getEmployee(0).isEqual(emp));
            emp.setPersonalID("p2");
            p2 = myAuditPool.setPhase(EnumNodeStatus.InProgress, null, null, vEmpl);
            Assert.IsNotNull(p2);
            Assert.AreNotEqual(p1, p2);
            Assert.AreEqual("p2", p2.getEmployee(0).getPersonalID());
        }
예제 #6
0
 ///
 ///      <summary> * (31) create inter-resource link to refTarget </summary>
 ///      * <param name="refTarget"> the element that is referenced </param>
 ///
 public virtual void refEmployee(JDFEmployee refTarget)
 {
     refElement(refTarget);
 }