Package org.apache.xmpbox.schema

Examples of org.apache.xmpbox.schema.XMPBasicSchema


                AdobePDFSchema pdfSchema = metadata.createAndAddAdobePDFSchema();
                pdfSchema.setKeywords( info.getKeywords() );
                pdfSchema.setProducer( info.getProducer() );

                XMPBasicSchema basicSchema = metadata.createAndAddXMPBasicSchema();
                basicSchema.setModifyDate( info.getModificationDate() );
                basicSchema.setCreateDate( info.getCreationDate() );
                basicSchema.setCreatorTool( info.getCreator() );
                basicSchema.setMetadataDate( new GregorianCalendar() );

                DublinCoreSchema dcSchema = metadata.createAndAddDublinCoreSchema();
                dcSchema.setTitle( info.getTitle() );
                dcSchema.addCreator( "PDFBox" );
                dcSchema.setDescription( info.getSubject() );
View Full Code Here


     *
     * @return schema added in order to work on it
     */
    public XMPBasicSchema createAndAddXMPBasicSchema()
    {
        XMPBasicSchema xmpB = new XMPBasicSchema(this);
        xmpB.setAboutAsSimple("");
        addSchema(xmpB);
        return xmpB;
    }
View Full Code Here

                            display("Keywords:", pdf.getKeywords());
                            display("PDF Version:", pdf.getPDFVersion());
                            display("PDF Producer:", pdf.getProducer());
                        }

                        XMPBasicSchema basic = metadata.getXMPBasicSchema();
                        if (basic != null)
                        {
                            display("Create Date:", basic.getCreateDate());
                            display("Modify Date:", basic.getModifyDate());
                            display("Creator Tool:", basic.getCreatorTool());
                        }
                    }
                    catch (XmpParsingException e)
                    {
                        System.err.println("An error ouccred when parsing the meta data: "
View Full Code Here

        Assert.assertEquals("GPL Ghostscript 8.64", pdf.getProducer());

        DublinCoreSchema dc = meta.getDublinCoreSchema();
        Assert.assertEquals("application/pdf", dc.getFormat());

        XMPBasicSchema basic = meta.getXMPBasicSchema();
        Assert.assertNotNull(basic.getCreateDate());

    }
View Full Code Here

    {
        // building temporary XMP metadata

        DublinCoreSchema dc = metadata.createAndAddDublinCoreSchema();
        AdobePDFSchema pdf = metadata.createAndAddAdobePDFSchema();
        XMPBasicSchema xmp = metadata.createAndAddXMPBasicSchema();

        // Writing info in XMP and Document Information dictionary
        // TITLE
        dico.setTitle("dicoTitle");
        dc.setTitle("x-default", "XMPTitle");
        // AUTHOR
        dico.setAuthor("dicoAuthor");
        dc.addCreator("XMPAuthor");
        dc.addCreator("2ndCreator");
        // SUBJECT
        dico.setSubject("dicoSubj");
        dc.addSubject("XMPSubj");
        dc.addSubject("2ndSubj");
        // KEYWORDS
        dico.setKeywords("DicoKeywords");
        pdf.setKeywords("XMPkeywords");
        // CREATOR
        dico.setCreator("DicoCreator");
        xmp.setCreatorTool("XMPCreator");
        // PRODUCER
        dico.setProducer("DicoProducer");
        pdf.setProducer("XMPProducer");
        // CREATION DATE
        dico.setCreationDate(Calendar.getInstance());
        GregorianCalendar XMPCreate = new GregorianCalendar(2008, 11, 05);
        xmp.setCreateDate(XMPCreate);
        // MODIFY DATE
        dico.setModificationDate(Calendar.getInstance());
        GregorianCalendar XMPModify = new GregorianCalendar(2009, 10, 15);
        xmp.setModifyDate(XMPModify);

        // Launching synchronization test
        try
        {
            ve = sync.validateMetadataSynchronization(doc, metadata);
View Full Code Here

    {
        // building temporary XMP metadata

        DublinCoreSchema dc = metadata.createAndAddDublinCoreSchema();
        AdobePDFSchema pdf = metadata.createAndAddAdobePDFSchema();
        XMPBasicSchema xmp = metadata.createAndAddXMPBasicSchema();

        // Writing info in XMP and Document Information dictionary
        // TITLE
        dico.setTitle("dicoTitle");
        dc.setTitle("x-default", "XMPTitle");
        // AUTHOR
        dico.setAuthor("dicoAuthor");
        dc.addCreator("XMPAuthor");
        // SUBJECT
        dico.setSubject("dicoSubj");
        dc.addSubject("XMPSubj");
        // KEYWORDS
        dico.setKeywords("DicoKeywords");
        pdf.setKeywords("XMPkeywords");
        // CREATOR
        dico.setCreator("DicoCreator");
        xmp.setCreatorTool("XMPCreator");
        // PRODUCER
        dico.setProducer("DicoProducer");
        pdf.setProducer("XMPProducer");
        // CREATION DATE
        dico.setCreationDate(Calendar.getInstance());
        GregorianCalendar XMPCreate = new GregorianCalendar(2008, 11, 05);
        xmp.setCreateDate(XMPCreate);
        // MODIFY DATE
        dico.setModificationDate(Calendar.getInstance());
        GregorianCalendar XMPModify = new GregorianCalendar(2009, 10, 15);
        xmp.setModifyDate(XMPModify);

        // Launching synchronization test
        try
        {
            ve = sync.validateMetadataSynchronization(doc, metadata);
View Full Code Here

        creationDate = Calendar.getInstance();
        modifyDate = Calendar.getInstance();

        // building temporary XMP metadata
        DublinCoreSchema dc = metadata.createAndAddDublinCoreSchema();
        XMPBasicSchema xmp = metadata.createAndAddXMPBasicSchema();
        AdobePDFSchema pdf = metadata.createAndAddAdobePDFSchema();
        // Writing info in XMP and Document Information dictionary
        // TITLE
        dico.setTitle(title);
        dc.setTitle("x-default", title);
        // AUTHOR
        dico.setAuthor(author);
        dc.addCreator(author);
        // SUBJECT
        dico.setSubject(subject);
        dc.addDescription("x-default", subject);
        // KEYWORDS
        dico.setKeywords(keywords);
        pdf.setKeywords(keywords);
        // CREATOR
        dico.setCreator(creator);
        xmp.setCreatorTool(creator);
        // PRODUCER
        dico.setProducer(producer);
        pdf.setProducer(producer);
        // CREATION DATE
        dico.setCreationDate(creationDate);
        xmp.setCreateDate(creationDate);
        // MODIFY DATE
        dico.setModificationDate(modifyDate);
        xmp.setModifyDate(modifyDate);

        // Launching synchronization test
        try
        {
            ve = sync.validateMetadataSynchronization(doc, metadata);
View Full Code Here

        modifyDate = Calendar.getInstance();

        // building temporary XMP metadata
        DublinCoreSchema dc = new DublinCoreSchema(metadata, "dctest");
        metadata.addSchema(dc);
        XMPBasicSchema xmp = new XMPBasicSchema(metadata, "xmptest");
        metadata.addSchema(xmp);
        AdobePDFSchema pdf = new AdobePDFSchema(metadata, "pdftest");
        metadata.addSchema(pdf);

        // Writing info in XMP and Document Information dictionary
        // TITLE
        dico.setTitle(title);
        dc.setTitle("x-default", title);
        // AUTHOR
        dico.setAuthor(author);
        dc.addCreator(author);
        // SUBJECT
        dico.setSubject(subject);
        dc.addDescription("x-default", subject);
        // KEYWORDS
        dico.setKeywords(keywords);
        pdf.setKeywords(keywords);
        // CREATOR
        dico.setCreator(creator);
        xmp.setCreatorTool(creator);
        // PRODUCER
        dico.setProducer(producer);
        pdf.setProducer(producer);
        // CREATION DATE
        dico.setCreationDate(creationDate);
        xmp.setCreateDate(creationDate);
        // MODIFY DATE
        dico.setModificationDate(modifyDate);
        xmp.setModifyDate(modifyDate);

        // Launching synchronization test
        try
        {
            ve = sync.validateMetadataSynchronization(doc, metadata);
View Full Code Here

        // building temporary XMP metadata
        DublinCoreSchema dc = metadata.createAndAddDublinCoreSchema();
        DublinCoreSchema dc2 = new DublinCoreSchema(metadata, "dctest");
        metadata.addSchema(dc2);
        XMPBasicSchema xmp = metadata.createAndAddXMPBasicSchema();
        XMPBasicSchema xmp2 = new XMPBasicSchema(metadata, "xmptest");
        metadata.addSchema(xmp2);
        AdobePDFSchema pdf = metadata.createAndAddAdobePDFSchema();
        AdobePDFSchema pdf2 = new AdobePDFSchema(metadata, "pdftest");
        metadata.addSchema(pdf2);

        // write some temp info in 'false' schemas
        dc2.setCoverage("tmpcover");
        xmp2.setCreatorTool("tmpcreator");
        pdf2.setKeywords("tmpkeys");

        // Writing info in XMP and Document Information dictionary
        // TITLE
        dico.setTitle(title);
View Full Code Here

                // KEYWORDS
                analyzeKeywordsProperty(dico, pdf, ve);
                // PRODUCER
                analyzeProducerProperty(dico, pdf, ve);

                XMPBasicSchema xmp = metadata.getXMPBasicSchema();

                // CREATOR TOOL
                analyzeCreatorToolProperty(dico, xmp, ve);

                // CREATION DATE
View Full Code Here

TOP

Related Classes of org.apache.xmpbox.schema.XMPBasicSchema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.