Package org.apache.padaf.xmpbox.schema

Examples of org.apache.padaf.xmpbox.schema.XMPBasicSchema


  public void testBadSizeOfArrays() throws Exception {
    // 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.addToTitleValue("x-default", "XMPTitle");
    // AUTHOR
    dico.setAuthor("dicoAuthor");
    dc.addToCreatorValue("XMPAuthor");
    dc.addToCreatorValue("2ndCreator");
    // SUBJECT
    dico.setSubject("dicoSubj");
    dc.addToSubjectValue("XMPSubj");
    dc.addToSubjectValue("2ndSubj");
    // KEYWORDS
    dico.setKeywords("DicoKeywords");
    pdf.setKeywordsValue("XMPkeywords");
    // CREATOR
    dico.setCreator("DicoCreator");
    xmp.setCreatorToolValue("XMPCreator");
    // PRODUCER
    dico.setProducer("DicoProducer");
    pdf.setProducerValue("XMPProducer");
    // CREATION DATE
    dico.setCreationDate(Calendar.getInstance());
    GregorianCalendar XMPCreate = new GregorianCalendar(2008, 11, 05);
    xmp.setCreateDateValue(XMPCreate);
    // MODIFY DATE
    dico.setModificationDate(Calendar.getInstance());
    GregorianCalendar XMPModify = new GregorianCalendar(2009, 10, 15);
    xmp.setModifyDateValue(XMPModify);

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


  public void testAllInfoUnsynchronized() throws Exception {
    // 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.addToTitleValue("x-default", "XMPTitle");
    // AUTHOR
    dico.setAuthor("dicoAuthor");
    dc.addToCreatorValue("XMPAuthor");
    // SUBJECT
    dico.setSubject("dicoSubj");
    dc.addToSubjectValue("XMPSubj");
    // KEYWORDS
    dico.setKeywords("DicoKeywords");
    pdf.setKeywordsValue("XMPkeywords");
    // CREATOR
    dico.setCreator("DicoCreator");
    xmp.setCreatorToolValue("XMPCreator");
    // PRODUCER
    dico.setProducer("DicoProducer");
    pdf.setProducerValue("XMPProducer");
    // CREATION DATE
    dico.setCreationDate(Calendar.getInstance());
    GregorianCalendar XMPCreate = new GregorianCalendar(2008, 11, 05);
    xmp.setCreateDateValue(XMPCreate);
    // MODIFY DATE
    dico.setModificationDate(Calendar.getInstance());
    GregorianCalendar XMPModify = new GregorianCalendar(2009, 10, 15);
    xmp.setModifyDateValue(XMPModify);

    // Launching synchronization test
    try {
      ve = sync.validateMetadataSynchronization(doc, metadata);
      // Test unsychronized value
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.addToTitleValue("x-default", title);
    // AUTHOR
    dico.setAuthor(author);
    dc.addToCreatorValue(author);
    // SUBJECT
    dico.setSubject(subject);
    dc.addToDescriptionValue("x-default", subject);
    // KEYWORDS
    dico.setKeywords(keywords);
    pdf.setKeywordsValue(keywords);
    // CREATOR
    dico.setCreator(creator);
    xmp.setCreatorToolValue(creator);
    // PRODUCER
    dico.setProducer(producer);
    pdf.setProducerValue(producer);
    // CREATION DATE
    dico.setCreationDate(creationDate);
    xmp.setCreateDateValue(creationDate);
    // MODIFY DATE
    dico.setModificationDate(modifyDate);
    xmp.setModifyDateValue(modifyDate);

    // Launching synchronization test
    try {
      ve = sync.validateMetadataSynchronization(doc, metadata);
      // Checking all is synchronized
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.addToTitleValue("x-default", title);
    // AUTHOR
    dico.setAuthor(author);
    dc.addToCreatorValue(author);
    // SUBJECT
    dico.setSubject(subject);
    dc.addToDescriptionValue("x-default", subject);
    // KEYWORDS
    dico.setKeywords(keywords);
    pdf.setKeywordsValue(keywords);
    // CREATOR
    dico.setCreator(creator);
    xmp.setCreatorToolValue(creator);
    // PRODUCER
    dico.setProducer(producer);
    pdf.setProducerValue(producer);
    // CREATION DATE
    dico.setCreationDate(creationDate);
    xmp.setCreateDateValue(creationDate);
    // MODIFY DATE
    dico.setModificationDate(modifyDate);
    xmp.setModifyDateValue(modifyDate);

    // Launching synchronization test
    try {
      ve = sync.validateMetadataSynchronization(doc, metadata);
      for (ValidationError valid : ve) {
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.setCoverageValue("tmpcover");
    xmp2.setCreatorToolValue("tmpcreator");
    pdf2.setKeywordsValue("tmpkeys");

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

     * created schema to enter information
     *
     * @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

        // 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.padaf.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.