Exemplo n.º 1
0
        public virtual void testObjectTagsMetadata()
        {
            KElement tagMap = rl.appendElement(METADATA_MAP);

            tagMap.setXMLComment("This tagmap specifies The path for the NMTOKEN \"ObjectTag\"");
            tagMap.setAttribute("Name", "ObjectTags");
            tagMap.setAttribute(AttributeName.VALUEFORMAT, "%s");
            tagMap.setAttribute(AttributeName.CONTEXT, "Object");
            tagMap.setAttribute(AttributeName.DATATYPE, "NMTOKEN");
            tagMap.setAttribute(AttributeName.VALUETEMPLATE, "AnyName1");
            tagMap.addNameSpace("TIFFXMP", "http://ns.adobe.com/tiff/1.0");
            string[] ss = new string[] { "Acme", "Bcme", "Ccme" };
            for (int i = 0; i < ss.Length; i++)
            {
                string   s      = ss[i];
                KElement tagSet = tagMap.appendElement(EXPR);
                tagSet.setAttribute("Name", "AnyName1");
                tagSet.setAttribute("Value", s);

                JDFStringEvaluation eval = (JDFStringEvaluation)tagSet.appendElement(ElementName.STRINGEVALUATION);
                eval.setAttribute("Path", "TIFFXMP:Make");
                eval.setRegExp("(.*)" + s + "(.*)");
                eval.setXMLComment("Any acme camera is mapped to \"" + s + "\"");
            }
            JDFColorSpaceConversionParams csp = (JDFColorSpaceConversionParams)root.addResource(ElementName.COLORSPACECONVERSIONPARAMS, EnumUsage.Input);

            csp.setXMLComment("This ColorSpaceConversionParams treats Acme and Bcme cameras the same but differentiates for Ccme");
            JDFColorSpaceConversionOp op1 = csp.appendColorSpaceConversionOp();

            op1.setAttribute("ObjectTags", "Acme Bcme");
            JDFColorSpaceConversionOp op2 = csp.appendColorSpaceConversionOp();

            op2.setAttribute("ObjectTags", "Ccme");
            doc.write2File(sm_dirTestDataTemp + "objectTags.jdf", 2, false);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
            }
        }