/**
         * * This will add both the RDF-indication which embedded file is Zugferd
         * and the neccessary PDF/A schema extension description to be able to add
         * this information to RDF
         *
         * @param metadata
         */
        private void addZugferdXMP(XMPMetadata metadata)
        {
            XMPSchemaZUGFeRD zf = new XMPSchemaZUGFeRD(metadata,
                                                       this.ZUGFeRDConformanceLevel);

            zf.setAbout(""); //$NON-NLS-1$
            metadata.addSchema(zf);

            XMPSchemaPDFAExtensions pdfaex = new XMPSchemaPDFAExtensions(metadata);

            pdfaex.setAbout(""); //$NON-NLS-1$
            metadata.addSchema(pdfaex);
        }
        private PDDocumentCatalog makeDocPDFA3compliant(String producer,
                                                        String creator, bool attachZugferdHeaders)
        {
            String fullProducer = producer + " (via mustangproject.org "
                                  + versionStr + ")";

            PDDocumentCatalog cat      = doc.getDocumentCatalog();
            PDMetadata        metadata = new PDMetadata(doc);

            cat.setMetadata(metadata);
            // we're using the jempbox org.apache.jempbox.xmp.XMPMetadata version,
            // not the xmpbox one
            XMPMetadata xmp = new XMPMetadata();

            XMPSchemaPDFAId pdfaid = new XMPSchemaPDFAId(xmp);

            pdfaid.setAbout(""); //$NON-NLS-1$
            xmp.addSchema(pdfaid);

            XMPSchemaDublinCore dc = xmp.addDublinCoreSchema();

            dc.addCreator(creator);
            dc.setAbout(""); //$NON-NLS-1$

            XMPSchemaBasic xsb = xmp.addBasicSchema();

            xsb.setAbout(""); //$NON-NLS-1$

            xsb.setCreatorTool(creator);
            xsb.setCreateDate(GregorianCalendar.getInstance());
            // PDDocumentInformation pdi=doc.getDocumentInformation();
            PDDocumentInformation pdi = new PDDocumentInformation();

            pdi.setProducer(fullProducer);
            pdi.setAuthor(creator);
            doc.setDocumentInformation(pdi);

            XMPSchemaPDF pdf = xmp.addPDFSchema();

            pdf.setProducer(fullProducer);
            pdf.setAbout(""); //$NON-NLS-1$

            /*
             * // Mandatory: PDF/A3-a is tagged PDF which has to be expressed using
             * a // MarkInfo dictionary (PDF A/3 Standard sec. 6.7.2.2) PDMarkInfo
             * markinfo = new PDMarkInfo(); markinfo.setMarked(true);
             * doc.getDocumentCatalog().setMarkInfo(markinfo);
             */
            /*
             *
             * To be on the safe side, we use level B without Markinfo because we
             * can not guarantee that the user correctly tagged the templates for
             * the PDF.
             */
            pdfaid.setConformance(conformanceLevel);//$NON-NLS-1$ //$NON-NLS-1$

            pdfaid.setPart(new java.lang.Integer(3));

            if (attachZugferdHeaders)
            {
                addZugferdXMP(xmp); /*
                                     * this is the only line where we do something
                                     * Zugferd-specific, i.e. add PDF metadata
                                     * specifically for Zugferd, not generically for
                                     * a embedded file
                                     */
            }

            metadata.importXMPMetadata(xmp);
            return(cat);
        }