Example #1
0
        public virtual void testIntegerEvaluation()
        {
            JDFDoc d = new JDFDoc(ElementName.INTEGEREVALUATION);
            JDFIntegerEvaluation ie = (JDFIntegerEvaluation)d.getRoot();

            ie.appendValueList(1);
            Assert.AreEqual("1", ie.getAttribute(AttributeName.VALUELIST));
            ie.appendValueList(3);
            Assert.AreEqual("1 3", ie.getAttribute(AttributeName.VALUELIST));
            ie.appendValueList(4);
            Assert.AreEqual("1 3 ~ 4", ie.getAttribute(AttributeName.VALUELIST));
            ie.appendValueList(5);
            Assert.AreEqual("1 3 ~ 5", ie.getAttribute(AttributeName.VALUELIST));
            ie.appendValueList(int.MaxValue);
            Assert.AreEqual("1 3 ~ 5 INF", ie.getAttribute(AttributeName.VALUELIST));
            Assert.AreEqual(new JDFIntegerRangeList("1 3 ~ 5 INF"), ie.getValueList());
        }
Example #2
0
        protected internal virtual void appendBWSeparationAction()
        {
            JDFAction a = aPool.appendActionSetTest(EnumTerm.StringEvaluation, EnumTerm.IntegerEvaluation, false);

            a.setSeverity(EnumSeverity.Error);

            JDFStringEvaluation numSeparations = (JDFStringEvaluation)((JDFnot)a.getTestTerm()).getTerm(null, 0);

            numSeparations.appendBasicPreflightTest("SeparationList");
            a.setDescriptiveName("separation to black only on page 1 and 2");
            numSeparations.appendValueValue("Black");

            JDFIntegerEvaluation setEval = (JDFIntegerEvaluation)a.getPreflightActionSetTerm();

            setEval.appendBasicPreflightTest("PageNumber");
            setEval.appendValueList(1);
            setEval.appendValueList(2);
        }
Example #3
0
        protected internal virtual void appendSeparationAction()
        {
            {
                JDFAction a = aPool.appendActionSetTest(EnumTerm.StringEvaluation, EnumTerm.IntegerEvaluation, false);
                a.setSeverity(EnumSeverity.Error);

                JDFStringEvaluation   numSeparations = (JDFStringEvaluation)((JDFnot)a.getTestTerm()).getTerm(null, 0);
                JDFBasicPreflightTest testSeps       = numSeparations.appendBasicPreflightTest("SeparationList");
                a.setDescriptiveName("set number of separations to 6 on page 0 and 3");
                testSeps.setMinOccurs(6);
                testSeps.setMaxOccurs(6);
                testSeps.setListType(EnumListType.UniqueList);

                JDFIntegerEvaluation setEval = (JDFIntegerEvaluation)a.getPreflightActionSetTerm();
                setEval.appendBasicPreflightTest("PageNumber");
                setEval.appendValueList(0);
                setEval.appendValueList(3);
            }
        }
Example #4
0
 protected internal virtual void appendNumPagesAction()
 {
     {
         JDFAction a = aPool.appendActionTest(EnumTerm.IntegerEvaluation, false);
         a.setSeverity(EnumSeverity.Error);
         JDFIntegerEvaluation numPages = (JDFIntegerEvaluation)((JDFnot)a.getTestTerm()).getTerm(null, 0);
         numPages.appendBasicPreflightTest("NumberOfPages");
         numPages.appendValueList(4);
         a.setDescriptiveName("set number of pages to 4");
     }
 }