Added: pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/ComplexMetadataPropertyTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/ComplexMetadataPropertyTest.java?rev=1150371&view=auto ============================================================================== --- pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/ComplexMetadataPropertyTest.java (added) +++ pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/ComplexMetadataPropertyTest.java Sun Jul 24 13:57:39 2011 @@ -0,0 +1,151 @@ +/***************************************************************************** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +package org.apache.padaf.xmpbox.type; + + +import org.apache.padaf.xmpbox.XMPMetadata; +import org.apache.padaf.xmpbox.schema.XMPSchema; +import org.apache.padaf.xmpbox.type.BadFieldValueException; +import org.apache.padaf.xmpbox.type.ComplexProperty; +import org.apache.padaf.xmpbox.type.ComplexPropertyContainer; +import org.apache.padaf.xmpbox.type.TextType; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * Test MetaData Objects for complex properties + * + * @author a183132 + * + */ +public class ComplexMetadataPropertyTest { + + protected XMPMetadata metadata; + protected XMPSchema tmpSchem; + + @Before + public void resetDocument() throws Exception { + metadata = new XMPMetadata(); + tmpSchem = metadata.createAndAddDefaultSchema("test", + "http://www.test.org/test/"); + + } + + /** + * Check if Array building works (complexproperty) + * + * @throws Exception + */ + @Test + public void testBuildAndCompareArray() throws Exception { + // Build a bag with one rdf:li + ComplexProperty bag = new ComplexProperty(metadata, "test", "TESTBAG", + ComplexProperty.UNORDERED_ARRAY); + TextType litmp = new TextType(metadata, "rdf", "li", "TestValue"); + bag.getContainer().addProperty(litmp); + // bag.getContainer().addProperty(new TextType(metadata.getFuturOwner(), + // "rdf", "li", "TestValue")); + + Assert + .assertTrue(bag.getContainer().getAllProperties().contains( + litmp)); + // Assert.assertEquals(litmp.getElement(), + // bag.getContainer().getElement().getFirstChild()); + + // Build a bag with 2 rdf:li + ComplexProperty seq = new ComplexProperty(metadata, + "http://www.test.org/test/", "test", "TESTSEQNS", + ComplexProperty.ORDERED_ARRAY); + TextType li1 = new TextType(metadata, "rdf", "li", "TestValue1"); + TextType li2 = new TextType(metadata, "rdf", "li", "TestValue2"); + seq.getContainer().addProperty(li1); + seq.getContainer().addProperty(li2); + + // Comparing content + Assert.assertTrue(seq.isSameProperty(seq)); + Assert.assertFalse(seq.isSameProperty(bag)); + + ComplexProperty seqBis = new ComplexProperty(metadata, + "http://www.test.org/test/", "test", "TESTSEQNS", + ComplexProperty.ORDERED_ARRAY); + TextType lis1 = new TextType(metadata, "rdf", "li", "TestValue"); + seqBis.getContainer().addProperty(lis1); + Assert.assertFalse(seq.isSameProperty(seqBis)); + + tmpSchem.addProperty(bag); + tmpSchem.addProperty(seq); + // SaveMetadataHelper.serialize(metadata, true, System.out); + } + + /** + * Check if Complex property container building works (used directly for + * complex rdf:li) + * + * @throws Exception + */ + @Test + public void testBuildingComplexRDFLi() throws Exception { + // Build a bag with one rdf:li + ComplexPropertyContainer complexLi = new ComplexPropertyContainer( + metadata, "http://www.test.org/test/", "rdf", "li"); + + TextType li1 = new TextType(metadata, "test", "value1", "ValueOne"); + TextType li2 = new TextType(metadata, "test", "value2", "ValueTwo"); + TextType li3 = new TextType(metadata, "test", "value3", "ValueThree"); + + complexLi.addProperty(li1); + // Test removing during adding + complexLi.addProperty(li1); + complexLi.addProperty(li2); + complexLi.addProperty(li3); + + // Test contains checking + Assert.assertTrue(complexLi.containsProperty(li1)); + complexLi.removeProperty(li1); + Assert.assertFalse(complexLi.containsProperty(li1)); + + tmpSchem.addProperty(complexLi); + // SaveMetadataHelper.serialize(metadata, true, System.out); + } + + /** + * Throw BadFieldValueException + * + * @throws BadFieldValueException + */ + @Test(expected = BadFieldValueException.class) + public void testBadFieldValueExceptionWithCause() throws Exception { + throw new BadFieldValueException("TEST", new Throwable()); + } + + /** + * Throw BadFieldValueException + * + * @throws BadFieldValueException + */ + @Test(expected = BadFieldValueException.class) + public void badFieldValuetestException() throws Exception { + throw new BadFieldValueException("TEST"); + } + +}
Propchange: pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/ComplexMetadataPropertyTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/SimpleMetadataPropertyTest.java URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/SimpleMetadataPropertyTest.java?rev=1150371&view=auto ============================================================================== --- pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/SimpleMetadataPropertyTest.java (added) +++ pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/SimpleMetadataPropertyTest.java Sun Jul 24 13:57:39 2011 @@ -0,0 +1,287 @@ +/***************************************************************************** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +package org.apache.padaf.xmpbox.type; + +import java.util.Calendar; +import java.util.List; + + +import org.apache.padaf.xmpbox.XMPMetadata; +import org.apache.padaf.xmpbox.type.Attribute; +import org.apache.padaf.xmpbox.type.BooleanType; +import org.apache.padaf.xmpbox.type.DateType; +import org.apache.padaf.xmpbox.type.IntegerType; +import org.apache.padaf.xmpbox.type.RealType; +import org.apache.padaf.xmpbox.type.TextType; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.w3c.dom.Element; + +/** + * Test MetaData Objects for simple properties + * + * @author a183132 + * + */ +public class SimpleMetadataPropertyTest { + + protected XMPMetadata parent; + + @Before + public void resetDocument() throws Exception { + parent = new XMPMetadata(); + } + + /** + * Check the detection of a bad type + * + * @throws InappropriateTypeException + */ + @Test(expected = IllegalArgumentException.class) + public void testBooleanBadTypeDetection() { + new BooleanType(parent, "test", "booleen", "Not a Boolean"); + } + + /** + * Check the detection of a bad type + * + * @throws InappropriateTypeException + */ + @Test(expected = IllegalArgumentException.class) + public void testDateBadTypeDetection() { + new DateType(parent, "test", "date", "Bad Date"); + } + + /** + * Check the detection of a bad type + * + * @throws InappropriateTypeException + */ + @Test(expected = IllegalArgumentException.class) + public void testIntegerBadTypeDetection() { + new IntegerType(parent, "test", "integer", "Not an int"); + } + + /** + * Check the detection of a bad type + * + * @throws InappropriateTypeException + */ + @Test(expected = IllegalArgumentException.class) + public void testRealBadTypeDetection() throws Exception { + new RealType(parent, "test", "real", "Not a real"); + } + + /** + * Check the detection of a bad type + * + * @throws InappropriateTypeException + */ + @Test(expected = IllegalArgumentException.class) + public void testTextBadTypeDetection() throws Exception { + new TextType(parent, "test", "text", Calendar.getInstance()); + } + + /** + * Check if information between objects and the elment generated are equals + * + * @throws Exception + */ + @Test + public void testElementAndObjectSynchronization() throws Exception { + boolean boolv = true; + Calendar datev = Calendar.getInstance(); + int integerv = 1; + float realv = Float.parseFloat("1.69"); + String textv = "TEXTCONTENT"; + BooleanType bool = new BooleanType(parent, "test", "booleen", boolv); + DateType date = new DateType(parent, "test", "date", datev); + IntegerType integer = new IntegerType(parent, "test", "integer", + integerv); + RealType real = new RealType(parent, "test", "real", realv); + TextType text = new TextType(parent, "test", "text", textv); + + Assert.assertEquals(bool.getNamespace(), bool.getElement() + .getNamespaceURI()); + Assert.assertEquals(bool.getPrefix() + ":" + bool.getPropertyName(), + bool.getElement().getNodeName()); + Assert.assertEquals(bool.getQualifiedName(), bool.getElement() + .getNodeName()); + Assert.assertEquals(boolv, bool.getValue()); + Assert.assertEquals(datev, date.getValue()); + Assert.assertEquals(integerv, integer.getValue()); + Assert.assertEquals(realv, real.getValue(), 0); + Assert.assertEquals(textv, text.getStringValue()); + + } + + /** + * Check Object creation from corresponding Java type + * + * @throws Exception + */ + @Test + public void testObjectCreationFromJavaType() throws Exception { + BooleanType bool = new BooleanType(parent, "test", "booleen", true); + DateType date = new DateType(parent, "test", "date", Calendar + .getInstance()); + IntegerType integer = new IntegerType(parent, "test", "integer", 1); + RealType real = new RealType(parent, "test", "real", (float) 1.6); + TextType text = new TextType(parent, "test", "text", "TEST"); + + Element e = parent.getFuturOwner().createElement("TEST"); + parent.getFuturOwner().appendChild(e); + e.appendChild(bool.getElement()); + e.appendChild(date.getElement()); + e.appendChild(integer.getElement()); + e.appendChild(real.getElement()); + e.appendChild(text.getElement()); + + // XMLUtil.save(parent.getFuturOwner(), System.out, "UTF-8"); + + } + + /** + * Check the creation from string attributes + * + * @throws Exception + */ + @Test + public void testCreationFromString() throws Exception { + String boolv = "False"; + String datev = "2010-03-22T14:33:11+01:00"; + String integerv = "10"; + String realv = "1.92"; + String textv = "text"; + + BooleanType bool = new BooleanType(parent, "test", "booleen", boolv); + DateType date = new DateType(parent, "test", "date", datev); + IntegerType integer = new IntegerType(parent, "test", "integer", + integerv); + RealType real = new RealType(parent, "test", "real", realv); + TextType text = new TextType(parent, "test", "text", textv); + + Assert.assertEquals(boolv, bool.getStringValue()); + Assert.assertEquals(datev, date.getStringValue()); + Assert.assertEquals(integerv, integer.getStringValue()); + Assert.assertEquals(realv, real.getStringValue()); + Assert.assertEquals(textv, text.getStringValue()); + } + + /** + * Check creation when a namespace is specified + * + * @throws Exception + */ + @Test + public void testObjectCreationWithNamespace() throws Exception { + String ns = "http://www.test.org/pdfa/"; + BooleanType bool = new BooleanType(parent, ns, "test", "booleen", true); + DateType date = new DateType(parent, ns, "test", "date", Calendar + .getInstance()); + IntegerType integer = new IntegerType(parent, ns, "test", "integer", 1); + RealType real = new RealType(parent, ns, "test", "real", (float) 1.6); + TextType text = new TextType(parent, ns, "test", "text", "TEST"); + + Assert.assertEquals(ns, bool.getNamespace()); + Assert.assertEquals(ns, date.getNamespace()); + Assert.assertEquals(ns, integer.getNamespace()); + Assert.assertEquals(ns, real.getNamespace()); + Assert.assertEquals(ns, text.getNamespace()); + + Element e = parent.getFuturOwner().createElement("TEST"); + parent.getFuturOwner().appendChild(e); + e.appendChild(bool.getElement()); + e.appendChild(date.getElement()); + e.appendChild(integer.getElement()); + e.appendChild(real.getElement()); + e.appendChild(text.getElement()); + + // XMLUtil.save(parent.getFuturOwner(), System.out, "UTF-8"); + + } + + /** + * Throw InappropriateType Exception + * + * @throws InappropriateTypeException + */ + @Test(expected = IllegalArgumentException.class) + public void testExceptionWithCause() throws Exception { + throw new IllegalArgumentException("TEST", new Throwable()); + } + + /** + * Check if attributes management works + * + * @throws Exception + */ + @Test + public void testAttribute() throws Exception { + + IntegerType integer = new IntegerType(parent, "test", "integer", 1); + Attribute value = new Attribute("http://www.test.org/test/", "test", + "value1", "StringValue1"); + Attribute value2 = new Attribute(null, "test", "value2", "StringValue2"); + + integer.setAttribute(value); + + // System.out.println(value.getQualifiedName()); + + Assert.assertEquals(value, integer.getAttribute(value + .getQualifiedName())); + Assert.assertTrue(integer.containsAttribute(value.getQualifiedName())); + + // Replacement check + + integer.setAttribute(value2); + Assert.assertEquals(value2, integer.getAttribute(value2 + .getQualifiedName())); + + integer.removeAttribute(value2.getQualifiedName()); + Assert + .assertFalse(integer.containsAttribute(value2 + .getQualifiedName())); + + // Attribute with namespace Creation checking + Attribute valueNS = new Attribute("http://www.tefst2.org/test/", + "test2", "value2", "StringValue.2"); + integer.setAttribute(valueNS); + Attribute valueNS2 = new Attribute("http://www.test2.org/test/", + "test2", "value2", "StringValueTwo"); + integer.setAttribute(valueNS2); + + List<Attribute> atts = integer.getAllAttributes(); + /* + * for (Attribute attribute : atts) { + * System.out.println(attribute.getLocalName + * ()+" :"+attribute.getValue()); } + */ + Assert.assertFalse(atts.contains(valueNS)); + Assert.assertTrue(atts.contains(valueNS2)); + + parent.getFuturOwner().appendChild(integer.getElement()); + // XMLUtil.save(parent.getFuturOwner(), System.out, "UTF-8"); + } + +} Propchange: pdfbox/trunk/xmpbox/src/test/java/org/apache/padaf/xmpbox/type/SimpleMetadataPropertyTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/AltBagSeqTest.xml URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/AltBagSeqTest.xml?rev=1150371&view=auto ============================================================================== --- pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/AltBagSeqTest.xml (added) +++ pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/AltBagSeqTest.xml Sun Jul 24 13:57:39 2011 @@ -0,0 +1,109 @@ +<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> +<x:xmpmeta xmlns:x="adobe:ns:meta/"> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> +<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:format>application/pdf</dc:format><dc:description><rdf:Alt><rdf:li>sujet</rdf:li></rdf:Alt></dc:description><dc:title><rdf:Alt><rdf:li>titre</rdf:li></rdf:Alt></dc:title><dc:subject><rdf:Bag><rdf:li>sujet</rdf:li></rdf:Bag></dc:subject><dc:creator><rdf:Seq><rdf:li>createur</rdf:li></rdf:Seq></dc:creator></rdf:Description> +<rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/"><pdf:Producer>producer</pdf:Producer><pdf:Keywords>mots clefs</pdf:Keywords></rdf:Description> +<rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/"><xmp:CreateDate>2010-03-10T14:14:45+01:00</xmp:CreateDate><xmp:ModifyDate>2010-03-10T14:14:45+01:00</xmp:ModifyDate><xmp:CreatorTool>Outil de creation</xmp:CreatorTool></rdf:Description> +<rdf:Description rdf:about="" xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"><pdfaid:conformance>B</pdfaid:conformance><pdfaid:part>1</pdfaid:part></rdf:Description> +<rdf:Description rdf:about="" xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" +xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" +xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#"> +<pdfaExtension:schemas> + <rdf:Bag> + <rdf:li rdf:parseType="Resource"> + <pdfaSchema:property> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>nom</pdfaProperty:name> + <pdfaProperty:valueType>Text</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Nom de la personne concernée par la demande</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>prenom</pdfaProperty:name> + <pdfaProperty:valueType>seq Text</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Prenom de la personne concernée par la demande</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>dateNaissance</pdfaProperty:name> + <pdfaProperty:valueType>Date</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Date de naissance de la personne concernée par la demande</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>codePays</pdfaProperty:name> + <pdfaProperty:valueType>Text</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Code du pays de la personne concernée</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>pays</pdfaProperty:name> + <pdfaProperty:valueType>Text</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Pays de la personne concernée</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>cdp</pdfaProperty:name> + <pdfaProperty:valueType>Text</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Code postal de la personne concernée</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>ville</pdfaProperty:name> + <pdfaProperty:valueType>Text</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Nom de la ville de la personne concernée</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>dpt</pdfaProperty:name> + <pdfaProperty:valueType>Text</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Departement de la personne concernée</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>bagTest</pdfaProperty:name> + <pdfaProperty:valueType>bag Text</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Test bag</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>LangAltTest</pdfaProperty:name> + <pdfaProperty:valueType>Lang Alt</pdfaProperty:valueType> + <pdfaProperty:category>external</pdfaProperty:category> + <pdfaProperty:description>Test Lang alt</pdfaProperty:description> + </rdf:li> + </rdf:Seq> + </pdfaSchema:property> + <pdfaSchema:schema>Schema Acte de naissance</pdfaSchema:schema> + <pdfaSchema:namespaceURI>http://test.apache.com/xap/adn/</pdfaSchema:namespaceURI> + <pdfaSchema:prefix>adn</pdfaSchema:prefix> + </rdf:li> + </rdf:Bag> +</pdfaExtension:schemas></rdf:Description> +<rdf:Description rdf:about="" xmlns:adn="http://test.apache.com/xap/adn/"><adn:cdp>59183</adn:cdp><adn:nom>Spécimen</adn:nom><adn:dateNaissance>1985-01-05</adn:dateNaissance><adn:ville>Dunkerque</adn:ville><adn:dpt>59</adn:dpt><adn:codePays>FR</adn:codePays><adn:pays>France</adn:pays><adn:prenom><rdf:Seq><rdf:li>Natacha</rdf:li><rdf:li>Marguerite</rdf:li><rdf:li>Suzanne</rdf:li></rdf:Seq></adn:prenom> +<adn:bagTest><rdf:Bag><rdf:li>bagval1</rdf:li><rdf:li>bagval2</rdf:li></rdf:Bag></adn:bagTest> +<adn:LangAltTest><rdf:Alt><rdf:li xml:lang="x-default">Default information</rdf:li><rdf:li xml:lang="fr-FR">Infos français</rdf:li></rdf:Alt></adn:LangAltTest> +</rdf:Description> +</rdf:RDF></x:xmpmeta> + + + + + + + + + + + + + + + + + + + + +<?xpacket end="w"?> Propchange: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/AltBagSeqTest.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/ThumbisartorStyle.xml URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/ThumbisartorStyle.xml?rev=1150371&view=auto ============================================================================== --- pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/ThumbisartorStyle.xml (added) +++ pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/ThumbisartorStyle.xml Sun Jul 24 13:57:39 2011 @@ -0,0 +1,92 @@ +<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> + <x:xmpmeta xmlns:x="adobe:ns:meta/" > + <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > + <rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"> + <xmpMM:DocumentID>uuid:09C78666-2F91-3A9C-92AF-3691A6D594F7</xmpMM:DocumentID> + </rdf:Description> + <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" > + <xmp:ModifyDate>2008-01-18T16:59:54+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2008-01-18T16:59:54+01:00</xmp:MetadataDate> + <xmp:CreateDate>2008-01-18T16:59:54+01:00</xmp:CreateDate> + <xmp:Thumbnails xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/"> + <rdf:Alt> + <rdf:li rdf:parseType="Resource"> + <xapGImg:height>162</xapGImg:height> + <xapGImg:width>216</xapGImg:width> + <xapGImg:format>JPEG</xapGImg:format> + <xapGImg:image>/9j/4AAQSkZJRgABAgEASABIAAD</xapGImg:image> + </rdf:li> + </rdf:Alt> + </xmp:Thumbnails> + + </rdf:Description > + <rdf:Description rdf:about="" xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type#" xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field#"> + <pdfaExtension:schemas> + <rdf:Bag> + <rdf:li rdf:parseType="Resource"> + <pdfaSchema:schema>ACME E-Mail Schema</pdfaSchema:schema> + <pdfaSchema:namespaceURI>http://www.acme.com/ns/email/1/</pdfaSchema:namespaceURI> + <pdfaSchema:prefix>acmeemail</pdfaSchema:prefix> + <pdfaSchema:property> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>Delivery-Date</pdfaProperty:name> + <pdfaProperty:valueType>Date</pdfaProperty:valueType> + <pdfaProperty:category>internal</pdfaProperty:category> + <pdfaProperty:description>date of email delivery</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>From</pdfaProperty:name> + <pdfaProperty:valueType>mailaddress</pdfaProperty:valueType> + <pdfaProperty:category>internal</pdfaProperty:category> + <pdfaProperty:description>sender email address</pdfaProperty:description> + </rdf:li> + </rdf:Seq> + </pdfaSchema:property> +<pdfaSchema:valueType> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaType:type>mailaddress</pdfaType:type> + <pdfaType:namespaceURI>http://www.acme.com/ns/email/1/mailaddress/</pdfaType:namespaceURI> + <pdfaType:description>mailaddress value</pdfaType:description> + <pdfaType:prefix>add</pdfaType:prefix> + <pdfaType:field> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaField:name>name</pdfaField:name> + <pdfaField:valueType>Text</pdfaField:valueType> + <pdfaField:description>plaintext name</pdfaField:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaField:name>mailto</pdfaField:name> + <pdfaField:valueType>Text</pdfaField:valueType> + <pdfaField:description>email address</pdfaField:description> + </rdf:li> + </rdf:Seq> + </pdfaType:field> + </rdf:li> + </rdf:Seq> + </pdfaSchema:valueType> + </rdf:li> + </rdf:Bag> + </pdfaExtension:schemas> + </rdf:Description> + <rdf:Description rdf:about="" xmlns:acmeemail="http://www.acme.com/ns/email/1/" xmlns:add="http://www.acme.com/ns/email/1/mailaddress/"> + <acmeemail:Delivery-Date>2007-11-09T09:55:36+01:00</acmeemail:Delivery-Date> + <acmeemail:From rdf:parseType="Resource"> + <add:name>John Doe</add:name> + <add:mailto>j...@acme.com</add:mailto> + </acmeemail:From> + </rdf:Description> + <rdf:Description rdf:about="" xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"> + <pdfaid:part>1</pdfaid:part> + <pdfaid:conformance>B</pdfaid:conformance> + <pdfaid:amd>1:2005</pdfaid:amd> + </rdf:Description> + <rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/"> + <pdf:Producer>PDFlib Personalization Server 7.0.2p5 (Win32)</pdf:Producer> + </rdf:Description> + </rdf:RDF> + </x:xmpmeta> +<?xpacket end="r"?> + Propchange: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/ThumbisartorStyle.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/isartorStyleXMPOK.xml URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/isartorStyleXMPOK.xml?rev=1150371&view=auto ============================================================================== --- pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/isartorStyleXMPOK.xml (added) +++ pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/isartorStyleXMPOK.xml Sun Jul 24 13:57:39 2011 @@ -0,0 +1,81 @@ +<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?> + <x:xmpmeta xmlns:x="adobe:ns:meta/"> + <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"> + <xmpMM:DocumentID>uuid:09C78666-2F91-3A9C-92AF-3691A6D594F7</xmpMM:DocumentID> + </rdf:Description> + <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/"> + <xmp:ModifyDate>2008-01-18T16:59:54+01:00</xmp:ModifyDate> + <xmp:MetadataDate>2008-01-18T16:59:54+01:00</xmp:MetadataDate> + <xmp:CreateDate>2008-01-18T16:59:54+01:00</xmp:CreateDate> + </rdf:Description> + <rdf:Description rdf:about="" xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/" xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#" xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type#" xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field#"> + <pdfaExtension:schemas> + <rdf:Bag> + <rdf:li rdf:parseType="Resource"> + <pdfaSchema:schema>ACME E-Mail Schema</pdfaSchema:schema> + <pdfaSchema:namespaceURI>http://www.acme.com/ns/email/1/</pdfaSchema:namespaceURI> + <pdfaSchema:prefix>acmeemail</pdfaSchema:prefix> + <pdfaSchema:property> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>Delivery-Date</pdfaProperty:name> + <pdfaProperty:valueType>Date</pdfaProperty:valueType> + <pdfaProperty:category>internal</pdfaProperty:category> + <pdfaProperty:description>date of email delivery</pdfaProperty:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaProperty:name>From</pdfaProperty:name> + <pdfaProperty:valueType>mailaddress</pdfaProperty:valueType> + <pdfaProperty:category>internal</pdfaProperty:category> + <pdfaProperty:description>sender email address</pdfaProperty:description> + </rdf:li> + </rdf:Seq> + </pdfaSchema:property> +<pdfaSchema:valueType> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaType:type>mailaddress</pdfaType:type> + <pdfaType:namespaceURI>http://www.acme.com/ns/email/1/mailaddress/</pdfaType:namespaceURI> + <pdfaType:description>mailaddress value</pdfaType:description> + <pdfaType:prefix>add</pdfaType:prefix> + <pdfaType:field> + <rdf:Seq> + <rdf:li rdf:parseType="Resource"> + <pdfaField:name>name</pdfaField:name> + <pdfaField:valueType>Text</pdfaField:valueType> + <pdfaField:description>plaintext name</pdfaField:description> + </rdf:li> + <rdf:li rdf:parseType="Resource"> + <pdfaField:name>mailto</pdfaField:name> + <pdfaField:valueType>Text</pdfaField:valueType> + <pdfaField:description>email address</pdfaField:description> + </rdf:li> + </rdf:Seq> + </pdfaType:field> + </rdf:li> + </rdf:Seq> + </pdfaSchema:valueType> + </rdf:li> + </rdf:Bag> + </pdfaExtension:schemas> + </rdf:Description> + <rdf:Description rdf:about="" xmlns:acmeemail="http://www.acme.com/ns/email/1/" xmlns:add="http://www.acme.com/ns/email/1/mailaddress/"> + <acmeemail:Delivery-Date>2007-11-09T09:55:36+01:00</acmeemail:Delivery-Date> + <acmeemail:From rdf:parseType="Resource"> + <add:name>John Doe</add:name> + <add:mailto>j...@acme.com</add:mailto> + </acmeemail:From> + </rdf:Description> + <rdf:Description rdf:about="" xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"> + <pdfaid:part>1</pdfaid:part> + <pdfaid:conformance>B</pdfaid:conformance> + <pdfaid:amd>1:2005</pdfaid:amd> + </rdf:Description> + <rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/"> + <pdf:Producer>PDFlib Personalization Server 7.0.2p5 (Win32)</pdf:Producer> + </rdf:Description> + </rdf:RDF> + </x:xmpmeta> +<?xpacket end='r'?> + Propchange: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/parser/isartorStyleXMPOK.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/propertiesDescription.xml URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/propertiesDescription.xml?rev=1150371&view=auto ============================================================================== --- pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/propertiesDescription.xml (added) +++ pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/propertiesDescription.xml Sun Jul 24 13:57:39 2011 @@ -0,0 +1,23 @@ +<!-- File generated with /net/awl/edoc/xmp/utils/XMLPropertiesDescriptionManager --> +<PropertiesDescriptions> + <PropertyDescription> + <propName>firstname</propName> + <propDesc>Sample of firstname description</propDesc> + </PropertyDescription> + <PropertyDescription> + <propName>lastname</propName> + <propDesc>Sample of lastname description</propDesc> + </PropertyDescription> + <PropertyDescription> + <propName>birth-place</propName> + <propDesc>Sample of birth-place description</propDesc> + </PropertyDescription> + <PropertyDescription> + <propName>birth-date</propName> + <propDesc>Sample of birth-date description</propDesc> + </PropertyDescription> + <PropertyDescription> + <propName>birth-country</propName> + <propDesc>Sample of birth-country description</propDesc> + </PropertyDescription> +</PropertiesDescriptions> Propchange: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/propertiesDescription.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/valueTypeDescription.xml URL: http://svn.apache.org/viewvc/pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/valueTypeDescription.xml?rev=1150371&view=auto ============================================================================== --- pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/valueTypeDescription.xml (added) +++ pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/valueTypeDescription.xml Sun Jul 24 13:57:39 2011 @@ -0,0 +1,24 @@ +<!-- File generated with /net/awl/edoc/xmp/utils/XMLValueTypeDescriptionManager + +--> + +<ValueTypesDescriptions> + <ValueTypeDescription> + <type>mailaddress</type> + <namespaceURI>http://test.withfield.com/vt/</namespaceURI> + <prefix>madn</prefix> + <description>mailaddress value</description> + <fields> + <FieldDescription> + <name>name</name> + <valueType>Text</valueType> + <description>personal name</description> + </FieldDescription> + <FieldDescription> + <name>domain</name> + <valueType>Text</valueType> + <description>domain value</description> + </FieldDescription> + </fields> + </ValueTypeDescription> +</ValueTypesDescriptions> Propchange: pdfbox/trunk/xmpbox/src/test/resources/org/apache/padaf/xmpbox/valueTypeDescription.xml ------------------------------------------------------------------------------ svn:eol-style = native