You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ju...@apache.org on 2008/06/22 21:09:18 UTC

svn commit: r670399 [4/6] - in /incubator/pdfbox/trunk/jempbox: ./ lib/ licenses/ licenses/checkstyle/ licenses/jempbox/ licenses/junit/ src/ src/org/ src/org/jempbox/ src/org/jempbox/impl/ src/org/jempbox/xmp/ src/org/jempbox/xmp/pdfa/ src/test/ src/t...

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaDublinCore.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaDublinCore.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaDublinCore.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaDublinCore.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,545 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp;
+
+import java.io.IOException;
+import java.util.Calendar;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties used with the Dublin Core specification.
+ * 
+ * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
+ * @version $Revision: 1.3 $
+ */
+public class XMPSchemaDublinCore extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://purl.org/dc/elements/1.1/";
+    /**
+     * Construct a new blank Dublin Core schema.
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaDublinCore( XMPMetadata parent )
+    {
+        super( parent, "dc", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaDublinCore( Element element, String prefix )
+    {
+        super( element, prefix );
+    }
+    
+    /**
+     * Remove a contributor from the list of contributors.
+     *
+     * @param contributor The contributor to remove.
+     */
+    public void removeContributor( String contributor )
+    {
+        removeBagValue( prefix + ":contributor", contributor );
+    }
+    
+    /**
+     * Add a contributor to the list of contributors.  A contributor is someone other than an author.
+     *
+     * @param contributor The name of the contributor.
+     */
+    public void addContributor( String contributor )
+    {
+        addBagValue( prefix + ":contributor", contributor );
+    }
+    
+    /**
+     * Get the complete list of contributors.
+     *
+     * @return The list of contributors.
+     */
+    public List getContributors()
+    {
+        return getBagList( prefix + ":contributor" );
+    }
+    
+    /**
+     * Set the coverage property.
+     *
+     * @param coverage The extend or scope of the resource.
+     */
+    public void setCoverage( String coverage )
+    {
+        setTextProperty( prefix + ":coverage", coverage );
+    }
+    
+    /**
+     * Get the coverage property.
+     *
+     * @return The extent or scope of the resource.
+     */
+    public String getCoverage()
+    {
+        return getTextProperty( prefix + ":coverage" );
+    }
+    
+    /**
+     * Remove a creator from the list of creators.
+     *
+     * @param creator The author of the resource.
+     */
+    public void removeCreator( String creator )
+    {
+        removeSequenceValue( prefix + ":creator", creator );
+    }
+    
+    /**
+     * Add a creator.
+     *
+     * @param creator The author of the resource.
+     */
+    public void addCreator( String creator )
+    {
+        addSequenceValue( prefix + ":creator", creator );
+    }
+    
+    /**
+     * Get a complete list of creators.
+     *
+     * @return A list of java.lang.String objects.
+     */
+    public List getCreators()
+    {
+        return getSequenceList( prefix + ":creator" );
+    }
+    
+    /**
+     * Remove a date from the list of 'interesting' dates.
+     *
+     * @param date The date to remove.
+     */
+    public void removeDate( Calendar date )
+    {
+        removeSequenceDateValue( prefix + ":date", date );
+    }
+    
+    /**
+     * Add a date of interest to this schema.
+     *
+     * @param date The date to add to the schema.
+     */
+    public void addDate( Calendar date )
+    {
+        addSequenceDateValue( prefix + ":date", date );
+    }
+    
+    /**
+     * Get a list of all dates of interest to this resource.
+     *
+     * @return A list of java.util.Calendar objects.
+     *
+     * @throws IOException If there is an error creating the date object.
+     */
+    public List getDates() throws IOException
+    {
+        return getSequenceDateList( prefix + ":date" );
+    }
+    
+    /**
+     * Set the default value for the description.
+     *
+     * @param description The description of this resource.
+     */
+    public void setDescription( String description )
+    {
+        setLanguageProperty( prefix + ":description", null, description );
+    }
+    
+    /**
+     * Get the default value for the description.
+     *
+     * @return The description of this resource.
+     */
+    public String getDescription()
+    {
+        return getLanguageProperty( prefix + ":description", null );
+    }
+    
+    /**
+     * Set the description of this resource in a specific language.
+     *
+     * @param language The language code.
+     * @param description The description in a specific language.
+     */
+    public void setDescription( String language, String description )
+    {
+        setLanguageProperty( prefix + ":description", language, description );
+    }
+    
+    /**
+     * Get the description in a specific language.
+     *
+     * @param language The language code to get the description for.
+     *
+     * @return The description in the specified language or null if it does not exist.
+     */
+    public String getDescription( String language )
+    {
+        return getLanguageProperty( prefix + ":description", language );
+    }
+    
+    /**
+     * Get a list of all languages that a description exists for.
+     *
+     * @return A non-null list of languages, potentially an empty list.
+     */
+    public List getDescriptionLanguages()
+    {
+        return getLanguagePropertyLanguages( prefix + ":description" );
+    }
+    
+    /**
+     * Set the format property.
+     *
+     * @param format The mime-type of the saved resource.
+     */
+    public void setFormat( String format )
+    {
+        setTextProperty( prefix + ":format", format );
+    }
+    
+    /**
+     * Get the format property.
+     *
+     * @return The mime-type of the resource.
+     */
+    public String getFormat()
+    {
+        return getTextProperty( prefix + ":format" );
+    }
+    
+    /**
+     * Set the resource identifier.
+     *
+     * @param id An id to the resource.
+     */
+    public void setIdentifier( String id )
+    {
+        setTextProperty( prefix + ":identifier", id );
+    }
+    
+    /**
+     * Get the resource id.
+     *
+     * @return A key that identifies this resource.
+     */
+    public String getIdentifier()
+    {
+        return getTextProperty( prefix + ":identifier" );
+    }
+    
+    /**
+     * Remove a language from the list of languages.
+     *
+     * @param language The language to remove.
+     */
+    public void removeLanguage( String language )
+    {
+        removeBagValue( prefix + ":language", language );
+    }
+    
+    /**
+     * Add a language to the list of languages.  
+     *
+     * @param language The name of the language.
+     */
+    public void addLanguage( String language )
+    {
+        addBagValue( prefix + ":language", language );
+    }
+    
+    /**
+     * Get the complete list of languages.
+     *
+     * @return The list of languages.
+     */
+    public List getLanguages()
+    {
+        return getBagList( prefix + ":language" );
+    }
+    
+    /**
+     * Remove a publisher from the list of publishers.
+     *
+     * @param publisher The publisher to remove.
+     */
+    public void removePublisher( String publisher )
+    {
+        removeBagValue( prefix + ":publisher", publisher );
+    }
+    
+    /**
+     * Add a publisher to the list of publishers.  
+     *
+     * @param publisher The name of the publisher.
+     */
+    public void addPublisher( String publisher )
+    {
+        addBagValue( prefix + ":publisher", publisher );
+    }
+    
+    /**
+     * Get the complete list of publishers.
+     *
+     * @return The list of publishers.
+     */
+    public List getPublishers()
+    {
+        return getBagList( prefix + ":publisher" );
+    }
+    
+    /**
+     * Remove a relation from the list of relationships.  
+     * A relationship to another resource.
+     *
+     * @param relation The publisher to remove.
+     */
+    public void removeRelation( String relation )
+    {
+        removeBagValue( prefix + ":relation", relation );
+    }
+    
+    /**
+     * Add a relation to the list of relationships.
+     * A relationship to another resource.  
+     *
+     * @param relation The relation to the other resource.
+     */
+    public void addRelation( String relation )
+    {
+        addBagValue( prefix + ":relation", relation );
+    }
+    
+    /**
+     * Get the complete list of relationships.
+     *
+     * @return The list of relationships.
+     */
+    public List getRelationships()
+    {
+        return getBagList( prefix + ":relation" );
+    }
+    
+    /**
+     * Set the default value for the rights of this document.  This property
+     * specifies informal rights of the document.
+     *
+     * @param rights The rights for this resource.
+     */
+    public void setRights( String rights )
+    {
+        setLanguageProperty( prefix + ":rights", null, rights );
+    }
+    
+    /**
+     * Get the default value for the rights of this document.
+     *
+     * @return The informal rights for this resource.
+     */
+    public String getRights()
+    {
+        return getLanguageProperty( prefix + ":rights", null );
+    }
+    
+    /**
+     * Set the rights for this resource in a specific language.
+     *
+     * @param language The language code.
+     * @param rights The rights in a specific language.
+     */
+    public void setRights( String language, String rights )
+    {
+        setLanguageProperty( prefix + ":rights", language, rights );
+    }
+    
+    /**
+     * Get the rights in a specific language.
+     *
+     * @param language The language code to get the description for.
+     *
+     * @return The rights in the specified language or null if it does not exist.
+     */
+    public String getRights( String language )
+    {
+        return getLanguageProperty( prefix + ":rights", language );
+    }
+    
+    /**
+     * Get a list of all languages that a rights description exists for.
+     *
+     * @return A non-null list of languages, potentially an empty list.
+     */
+    public List getRightsLanguages()
+    {
+        return getLanguagePropertyLanguages( prefix + ":rights" );
+    }
+    
+    /**
+     * Set the resource source identifier.
+     *
+     * @param id An id to the resource source.
+     */
+    public void setSource( String id )
+    {
+        setTextProperty( prefix + ":source", id );
+    }
+    
+    /**
+     * Get the resource source id.
+     *
+     * @return A key that identifies this source of this resource.
+     */
+    public String getSource()
+    {
+        return getTextProperty( prefix + ":source" );
+    }
+    
+    /**
+     * Remove a subject from the list of subjects.
+     *
+     * @param subject The subject to remove.
+     */
+    public void removeSubject( String subject )
+    {
+        removeBagValue( prefix + ":subject", subject );
+    }
+    
+    /**
+     * Add a subject to the list of subjects.
+     *
+     * @param subject The subject of this resource.
+     */
+    public void addSubject( String subject )
+    {
+        addBagValue( prefix + ":subject", subject );
+    }
+    
+    /**
+     * Get the complete list of subjects.
+     *
+     * @return The list of subjects.
+     */
+    public List getSubjects()
+    {
+        return getBagList( prefix + ":subject" );
+    }
+    
+    /**
+     * Set the default value for the title.
+     *
+     * @param title The title of this resource.
+     */
+    public void setTitle( String title )
+    {
+        setLanguageProperty( prefix + ":title", null, title );
+    }
+    
+    /**
+     * Get the default value for the title.
+     *
+     * @return The title of this resource.
+     */
+    public String getTitle()
+    {
+        return getLanguageProperty( prefix + ":title", null );
+    }
+    
+    /**
+     * Set the title of this resource in a specific language.
+     *
+     * @param language The language code.
+     * @param title The title in a specific language.
+     */
+    public void setTitle( String language, String title )
+    {
+        setLanguageProperty( prefix + ":title", language, title );
+    }
+    
+    /**
+     * Get the title in a specific language.
+     *
+     * @param language The language code to get the description for.
+     *
+     * @return The title in the specified language or null if it does not exist.
+     */
+    public String getTitle( String language )
+    {
+        return getLanguageProperty( prefix + ":title", language );
+    }
+    
+    /**
+     * Get a list of all languages that a title exists for.
+     *
+     * @return A non-null list of languages, potentially an empty list.
+     */
+    public List getTitleLanguages()
+    {
+        return getLanguagePropertyLanguages( prefix + ":title" );
+    }
+    
+    /**
+     * Add a type to the bag of types of this resource.
+     *
+     * @param type The type of resource to add (poem, novel).
+     */
+    public void addType( String type )
+    {
+        addBagValue(prefix + ":type", type );
+    }
+    
+    /**
+     * Get the list of types for this resource.
+     *
+     * @return A list of types for this resource.
+     */
+    public List getTypes()
+    {
+        return getBagList(prefix + ":type" );
+    }
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaDynamicMedia.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaDynamicMedia.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaDynamicMedia.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaDynamicMedia.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,67 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp;
+
+import org.w3c.dom.Element;
+
+/**
+ * Dynamic Media schema.
+ * 
+ * @author Karsten Krieg (kkrieg@intarsys.de)
+ * @version $Revision: 1.2 $
+ */
+public class XMPSchemaDynamicMedia extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://ns.adobe.com/xmp/1.0/DynamicMedia/";
+    
+    /**
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaDynamicMedia( XMPMetadata parent )
+    {
+        super( parent, "xmpDM", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaDynamicMedia( Element element, String prefix)
+    {
+        super( element , prefix);
+    }   
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaIptc4xmpCore.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaIptc4xmpCore.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaIptc4xmpCore.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaIptc4xmpCore.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,328 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties used with IPTC specification.
+ * 
+ * @author $Author: benlitchfield $
+ * @version $Revision: 1.3 $
+ */
+public class XMPSchemaIptc4xmpCore extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/";
+
+    /**
+     * Construct a new blank IPTC schema.
+     * 
+     * @param metadata The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaIptc4xmpCore(XMPMetadata metadata)
+    {
+        super(metadata, "Iptc4xmpCore", NAMESPACE);
+    }
+
+    /**
+     * Constructor from an existing element.
+     * 
+     * @param element The XML element.
+     * @param aPrefix The XML prefix; Iptc4xmpCore.
+     */
+    public XMPSchemaIptc4xmpCore(Element element, String aPrefix)
+    {
+        super(element, aPrefix);
+    }
+
+    /**
+     * Contact Info Address City.
+     * 
+     * @param city The city name.
+     */
+    public void setCiAdrCity( String city )
+    {
+        setTextProperty(prefix + ":CiAdrCity", city);
+    }
+    
+    /**
+     * Contact Info Address City.
+     * 
+     * @return The city.
+     */
+    public String getCiAdrCity()
+    {
+        return getTextProperty(prefix + ":CiAdrCity");
+    }
+    
+    /**
+     * Contact Info country.
+     * 
+     * @param country The CI country.
+     */
+    public void setCiAdrCtry( String country )
+    {
+        setTextProperty(prefix + ":CiAdrCtry", country);
+    }
+
+    /**
+     * Contact Info country.
+     * 
+     * @return The CI country.
+     */
+    public String getCiAdrCtry()
+    {
+        return getTextProperty(prefix + ":CiAdrCtry");
+    }
+
+    /**
+     * Contact Info Extended Address(company name).
+     * 
+     * @param adr Address info.
+     */
+    public void setCiAdrExtadr( String adr )
+    {
+        setTextProperty(prefix + ":CiAdrExtadr", adr);
+    }
+
+    /**
+     * Contact Info Extended Address(company name).
+     * 
+     * @return The extended address info.
+     */
+    public String getCiAdrExtadr()
+    {
+        return getTextProperty(prefix + ":CiAdrExtadr");
+    }
+
+    /**
+     * Postal code.
+     * 
+     * @param po The postal code.
+     */
+    public void setCiAdrPcode( String po )
+    {
+        setTextProperty(prefix + ":CiAdrPcode", po);
+    }
+
+    /**
+     * Postal code.
+     * 
+     * @return The postal code.
+     */
+    public String getCiAdrPcode()
+    {
+        return getTextProperty(prefix + ":CiAdrPcode");
+    }
+
+    /**
+     * Postal region or state.
+     * 
+     * @param state The postal region
+     */
+    public void setCiAdrRegion( String state )
+    {
+        setTextProperty(prefix + ":CiAdrRegion", state);
+    }
+
+    /**
+     * Postal region or state.
+     * 
+     * @return The postal state.
+     */
+    public String getCiAdrRegion()
+    {
+        return getTextProperty(prefix + ":CiAdrRegion");
+    }
+
+    /**
+     * Work email.
+     * 
+     * @param email The work email.
+     */
+    public void setCiEmailWork( String email )
+    {
+        setTextProperty(prefix + ":CiEmailWork", email);
+    }
+
+    /**
+     * Work email.
+     * 
+     * @return The work email.
+     */
+    public String getCiEmailWork()
+    {
+        return getTextProperty(prefix + ":CiEmailWork");
+    }
+
+    /**
+     * Work telephone.
+     * 
+     * @param tel The work telephone.
+     */
+    public void setCiTelWork( String tel )
+    {
+        setTextProperty(prefix + ":CiTelWork", tel);
+    }
+
+    /**
+     * Work Telephone.
+     * 
+     * @return The work telephone.
+     */
+    public String getCiTelWork()
+    {
+        return getTextProperty(prefix + ":CiTelWork");
+    }
+
+    /**
+     * Work URL.
+     * 
+     * @param url The work URL.
+     */
+    public void setCiUrlWork( String url )
+    {
+        setTextProperty(prefix + ":CiUrlWork", url);
+    }
+
+    /**
+     * Work URL.
+     * 
+     * @return work URL.
+     */
+    public String getCiUrlWork()
+    {
+        return getTextProperty(prefix + ":CiUrlWork");
+    }
+
+    /**
+     * Name of location that the content is focussing on.
+     * 
+     * @param loc The location.
+     */
+    public void setLocation( String loc )
+    {
+        setTextProperty(prefix + ":Location", loc);
+    }
+
+    /**
+     * Name of location that the content is focussing on.
+     * @return The location.
+     */
+    public String getLocation()
+    {
+        return getTextProperty(prefix + ":Location");
+    }
+
+    /**
+     * The IPTC scene.
+     * 
+     * @param scene The IPTC scene.
+     */
+    public void addScene( String scene )
+    {
+        addBagValue(prefix + ":Scene", scene);
+    }
+
+    /**
+     * A list of all the scenes.
+     * 
+     * @return The list of scenes.
+     */
+    public List getScenes()
+    {
+        return getBagList(prefix + ":Scene");
+    }
+
+    /**
+     * Add IPTC subject code.
+     * @param subject The IPTC subject.
+     */
+    public void addSubjectCode( String subject )
+    {
+        addBagValue(prefix + ":SubjectCode", subject);
+    }
+
+    /**
+     * Get a list of all IPTC subject codes.
+     * 
+     * @return All IPTC subject codes.
+     */
+    public List getSubjectCodes()
+    {
+        return getBagList(prefix + ":SubjectCode");
+    }
+
+    /**
+     * Nature of a news object.
+     * 
+     * @param genre The news genre.
+     */
+    public void setIntellectualGenre( String genre )
+    {
+        setTextProperty(prefix + ":IntellectualGenre", genre);
+    }
+
+    /**
+     * Nature of a news object.
+     * 
+     * @return The news genre.
+     */
+    public String getIntellectualGenre()
+    {
+        return getTextProperty(prefix + ":IntellectualGenre");
+    }
+
+    /**
+     * ISO Country Code.
+     * 
+     * @param code The country code.
+     */
+    public void setCountryCode( String code )
+    {
+        setTextProperty(prefix + ":CountryCode", code);
+    }
+
+    /**
+     * ISO Country Code.
+     * 
+     * @return The country code.
+     */
+    public String getCountryCode()
+    {
+        return getTextProperty(prefix + ":CountryCode");
+    }
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaMediaManagement.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaMediaManagement.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaMediaManagement.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaMediaManagement.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,297 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp;
+
+import java.util.List;
+
+import org.jempbox.impl.XMLUtil;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+/**
+ * Define XMP properties that are related to digital asset management.
+ * 
+ * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
+ * @version $Revision: 1.2 $
+ */
+public class XMPSchemaMediaManagement extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://ns.adobe.com/xap/1.0/mm/";
+    
+    /**
+     * Construct a new blank PDF schema.
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaMediaManagement( XMPMetadata parent )
+    {
+        super( parent, "xmpMM", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaMediaManagement( Element element, String prefix )
+    {
+        super( element, prefix );
+    }
+    
+    /**
+     * Get a reference to the original document that this document is
+     * derived from.
+     * 
+     * @return A reference to the derived document, or null if one does not exist.
+     */
+    public ResourceRef getDerivedFrom()
+    {
+        ResourceRef retval = null;
+        NodeList nodes = schema.getElementsByTagName( prefix + ":DerivedFrom" );
+        if( nodes.getLength() > 0 )
+        {
+            Element derived = (Element)nodes.item( 0 );
+            retval = new ResourceRef(derived);
+        }
+        else
+        {
+            //the old name was RenditionOf, this is now deprecated but lets
+            //try to find it in case of older XMP documents.
+            NodeList deprecatedNodes = schema.getElementsByTagName( "xmpMM:RenditionOf" );
+            if( deprecatedNodes.getLength() > 0 )
+            {
+                Element derived = (Element)deprecatedNodes.item( 0 );
+                retval = new ResourceRef(derived);
+            }            
+        }
+        return retval;
+    }
+    
+    /**
+     * Create a new Derived From resource ref that can be populated.  You
+     * will still need to call setDerivedFrom after this is created.
+     * 
+     * @return A new blank derived from instance.
+     */
+    public ResourceRef createDerivedFrom()
+    {
+        Element node = schema.getOwnerDocument().createElement( prefix + ":DerivedFrom" );
+        ResourceRef ref = new ResourceRef( node );
+        return ref;
+    }
+    
+    /**
+     * Set or clear the derived from value.
+     * 
+     * @param resource The resource reference to set.
+     * 
+     * @see XMPSchemaMediaManagement#createDerivedFrom()
+     */
+    public void setDerivedFrom( ResourceRef resource )
+    {
+        XMLUtil.setElementableValue( schema, prefix + ":DerivedFrom", resource );
+    }
+    
+    /**
+     * Set the common identifier to all versions of this document.  It should
+     * be based on a UUID.
+     *
+     * @param id An identifier for the document.
+     */
+    public void setDocumentID( String id )
+    {
+        setTextProperty( prefix + ":DocumentID", id );
+    }
+    
+    /**
+     * Get id that identifies all versions of this document.
+     *
+     * @return The document id.
+     */
+    public String getDocumentID()
+    {
+        return getTextProperty( prefix + ":DocumentID" );
+    }
+    
+    /**
+     *
+     * @param id An identifier for the current version.
+     */
+    public void setVersionID( String id )
+    {
+        setTextProperty( prefix + ":VersionID", id );
+    }
+    
+    /**
+     *
+     * @return The current version id.
+     */
+    public String getVersionID()
+    {
+        return getTextProperty( prefix + ":VersionID" );
+    }
+
+    /**
+     * Get a list of all historical events that have occured for this resource.
+     * 
+     * @return A list of ResourceEvent objects or null.
+     */
+    public List getHistory()
+    {
+        return getEventSequenceList( prefix + ":History" );
+    }
+    
+    /**
+     * Remove an event from the list of events.
+     * 
+     * @param event The event to remove.
+     */
+    public void removeHistory( ResourceEvent event )
+    {
+        removeSequenceValue( prefix + ":History", event );
+    }
+    
+    /**
+     * Add a new historical event.
+     * 
+     * @param event The event to add to the list of history.
+     */
+    public void addHistory( ResourceEvent event )
+    {
+        addSequenceValue( prefix + ":History", event );
+    }
+    
+    /**
+     * Get a reference to the document prior to it being managed.
+     * 
+     * @return A reference to the managed document.
+     */
+    public ResourceRef getManagedFrom()
+    {
+        ResourceRef retval = null;
+        NodeList nodes = schema.getElementsByTagName( prefix + ":ManagedFrom" );
+        if( nodes.getLength() > 0 )
+        {
+            Element derived = (Element)nodes.item( 0 );
+            retval = new ResourceRef(derived);
+        }
+        return retval;
+    }
+    
+    /**
+     * Create a new Managed From resource ref that can be populated.  You
+     * will still need to call setManagedFrom after this is created.
+     * 
+     * @return A new blank managed from instance.
+     */
+    public ResourceRef createManagedFrom()
+    {
+        Element node = schema.getOwnerDocument().createElement( prefix + ":ManagedFrom" );
+        ResourceRef ref = new ResourceRef( node );
+        return ref;
+    }
+    
+    /**
+     * Set or clear the managed from value.
+     * 
+     * @param resource The resource reference to set.
+     * 
+     * @see XMPSchemaMediaManagement#createManagedFrom()
+     */
+    public void setManagedFrom( ResourceRef resource )
+    {
+        XMLUtil.setElementableValue( schema, prefix + ":DerivedFrom", resource );
+    }
+    
+    /**
+     * Set the asset management system that manages this resource.
+     *
+     * @param manager The name of the asset management system.
+     */
+    public void setManager( String manager )
+    {
+        setTextProperty( prefix + ":Manager", manager );
+    }
+    
+    /**
+     * Get the name of the asset management system that manages this resource.
+     *
+     * @return The name of the asset management system.
+     */
+    public String getManager()
+    {
+        return getTextProperty( prefix + ":Manager" );
+    }
+    
+    /**
+     * Set the URI identifying the managed resource.
+     *
+     * @param uri URI to the managed resource.
+     */
+    public void setManageTo( String uri )
+    {
+        setTextProperty( prefix + ":ManageTo", uri );
+    }
+    
+    /**
+     * Get the URI to the managed resource.
+     *
+     * @return The managed resource URI.
+     */
+    public String getManageTo()
+    {
+        return getTextProperty( prefix + ":ManageTo" );
+    }
+    
+    /**
+     * Set the URI identifying information about the managed resource.
+     *
+     * @param uri URI to the managed resource info.
+     */
+    public void setManageUI( String uri )
+    {
+        setTextProperty( prefix + ":ManageUI", uri );
+    }
+    
+    /**
+     * Get the URI to the managed resource information.
+     *
+     * @return The managed resource information URI.
+     */
+    public String getManageUI()
+    {
+        return getTextProperty( prefix + ":ManageUI" );
+    }
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPDF.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPDF.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPDF.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPDF.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,128 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp;
+
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties used with Adobe PDF documents.
+ * 
+ * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
+ * @version $Revision: 1.2 $
+ */
+public class XMPSchemaPDF extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://ns.adobe.com/pdf/1.3/";
+    
+    /**
+     * Construct a new blank PDF schema.
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaPDF( XMPMetadata parent )
+    {
+        super( parent, "pdf", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaPDF( Element element, String prefix )
+    {
+        super( element, prefix );
+    }
+    
+    /**
+     * PDF Keywords.
+     *
+     * @param keywords The PDF keywords.
+     */
+    public void setKeywords( String keywords )
+    {
+        setTextProperty( prefix + ":Keywords", keywords );
+    }
+    
+    /**
+     * Get the PDF keywords.
+     *
+     * @return The PDF keywords.
+     */
+    public String getKeywords()
+    {
+        return getTextProperty( prefix + ":Keywords" );
+    }
+    
+    /**
+     * Set the PDF file version.  1.2,1.3,...
+     *
+     * @param pdfVersion The version of the PDF file format.
+     */
+    public void setPDFVersion( String pdfVersion )
+    {
+        setTextProperty( prefix + ":PDFVersion", pdfVersion );
+    }
+    
+    /**
+     * Get the PDF version.
+     *
+     * @return The value of the PDF version property.
+     */
+    public String getPDFVersion()
+    {
+        return getTextProperty( prefix + ":PDFVersion" );
+    }
+    
+    /**
+     * Set the PDF producer.
+     *
+     * @param producer The tool that created the PDF.
+     */
+    public void setProducer( String producer )
+    {
+        setTextProperty( prefix + ":Producer", producer );
+    }
+    
+    /**
+     * Get the value of the producer property.
+     *
+     * @return The producer property.
+     */
+    public String getProducer()
+    {
+        return getTextProperty( prefix + ":Producer" );
+    }
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPagedText.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPagedText.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPagedText.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPagedText.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,67 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp;
+
+import org.w3c.dom.Element;
+
+/**
+ * Paged Text Schema.
+ * 
+ * @author Karsten Krieg (kkrieg@intarsys.de)
+ * @version $Revision: 1.2 $
+ */
+public class XMPSchemaPagedText extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://ns.adobe.com/xap/1.0/t/pg/";
+    
+    /**
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaPagedText( XMPMetadata parent )
+    {
+        super( parent, "xmpTPg", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The XML prefix.
+     */
+    public XMPSchemaPagedText( Element element, String prefix )
+    {
+        super( element , prefix);
+    }   
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPhotoshop.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPhotoshop.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPhotoshop.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaPhotoshop.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,372 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties used with Adobe Photoshop documents.
+ * 
+ * @author $Author: benlitchfield $
+ * @version $Revision: 1.2 $
+ */
+public class XMPSchemaPhotoshop extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://ns.adobe.com/photoshop/1.0/";
+
+    /**
+     * Construct a new blank Photoshop schema.
+     * 
+     * @param parent
+     *            The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaPhotoshop(XMPMetadata parent)
+    {
+        super(parent, "photoshop", NAMESPACE);
+    }
+
+    /**
+     * Constructor for existing XML element.
+     * 
+     * @param element The XML element.
+     * @param aPrefix The XML prefix; photoshop.
+     */
+    public XMPSchemaPhotoshop(Element element, String aPrefix)
+    {
+        super(element, aPrefix);
+    }
+
+    /**
+     * By-line title.
+     * 
+     * @param s The authors position.
+     */
+    public void setAuthorsPosition( String s )
+    {
+        setTextProperty(prefix + ":AuthorsPosition", s);
+    }
+
+    /**
+     * By-line title.
+     * 
+     * @return The authors position.
+     */
+    public String getAuthorsPosition()
+    {
+        return getTextProperty(prefix + ":AuthorsPosition");
+    }
+
+    /**
+     * Writer/editor.
+     * 
+     * @param s The caption writer.
+     */
+    public void setCaptionWriter( String s )
+    {
+        setTextProperty(prefix + ":CaptionWriter", s);
+    }
+
+    /**
+     * Writer/editor.
+     * 
+     * @return The caption writer.
+     */
+    public String getCaptionWriter()
+    {
+        return getTextProperty(prefix + ":CaptionWriter");
+    }
+
+    /**
+     * Category; limited to 3 7-bit characters.
+     * @param s The category.
+     */
+    public void setCategory( String s )
+    {
+        if( s != null && s.length() > 3 )
+        {
+            throw new RuntimeException( "Error: photoshop:Category is limited to three characters value='" + s + "'" );
+        }
+        setTextProperty(prefix + ":Category", s);
+    }
+
+    /**
+     * The category.
+     * 
+     * @return The category.
+     */
+    public String getCategory()
+    {
+        return getTextProperty(prefix + ":Category");
+    }
+
+    /**
+     * The city.
+     * 
+     * @param s The city.
+     */
+    public void setCity( String s )
+    {
+        setTextProperty(prefix + ":City", s);
+    }
+
+    /**
+     * The city.
+     * 
+     * @return The city.
+     */
+    public String getCity()
+    {
+        return getTextProperty(prefix + ":City");
+    }
+
+    /**
+     * The country.
+     * 
+     * @param s The country.
+     */
+    public void setCountry( String s )
+    {
+        setTextProperty(prefix + ":Country", s);
+    }
+
+    /**
+     * The country.
+     * 
+     * @return The country.
+     */
+    public String getCountry()
+    {
+        return getTextProperty(prefix + ":Country");
+    }
+
+    /**
+     * Credit.
+     * 
+     * @param s The credit property.
+     */
+    public void setCredit( String s )
+    {
+        setTextProperty(prefix + ":Credit", s);
+    }
+
+    /**
+     * The credit property.
+     * 
+     * @return The credit property.
+     */
+    public String getCredit()
+    {
+        return getTextProperty(prefix + ":Credit");
+    }
+
+    /**
+     * Date created; creation date of the source document which may be
+     * earlier than the digital representation.
+     * 
+     * @param s The date created.
+     */
+    public void setDateCreated( String s )
+    {
+        setTextProperty(prefix + ":DateCreated", s);
+    }
+
+    /**
+     * Creation date.
+     * 
+     * @return The creation date.
+     */
+    public String getDateCreated()
+    {
+        return getTextProperty(prefix + ":DateCreated");
+    }
+
+    /**
+     * The headline.
+     * 
+     * @param s The headline.
+     */
+    public void setHeadline( String s )
+    {
+        setTextProperty(prefix + ":Headline", s);
+    }
+
+    /**
+     * Headline.
+     * 
+     * @return The headline.
+     */
+    public String getHeadline()
+    {
+        return getTextProperty(prefix + ":Headline");
+    }
+
+    /**
+     * Instructions.
+     * 
+     * @param s The instructions.
+     */
+    public void setInstructions( String s )
+    {
+        setTextProperty(prefix + ":Instructions", s);
+    }
+
+    /**
+     * The instructions.
+     * 
+     * @return The instructions.
+     */
+    public String getInstructions()
+    {
+        return getTextProperty(prefix + ":Instructions");
+    }
+
+    /**
+     * The source.
+     * 
+     * @param s The source.
+     */
+    public void setSource( String s )
+    {
+        setTextProperty(prefix + ":Source", s);
+    }
+
+    /**
+     * The source.
+     * 
+     * @return The source.
+     */
+    public String getSource()
+    {
+        return getTextProperty(prefix + ":Source");
+    }
+
+    /**
+     * The state.
+     * 
+     * @param s The state.
+     */
+    public void setState( String s )
+    {
+        setTextProperty(prefix + ":State", s);
+    }
+
+    /**
+     * The state.
+     * 
+     * @return The state.
+     */
+    public String getState()
+    {
+        return getTextProperty(prefix + ":State");
+    }
+
+    /**
+     * Add a new supplemental category.
+     * 
+     * @param s The supplemental category.
+     */
+    public void addSupplementalCategory( String s )
+    {
+        addBagValue(prefix + ":SupplementalCategories", s);
+    }
+
+    /**
+     * Get a list of all supplemental categories.
+     * 
+     * @return The supplemental categories.
+     */
+    public List getSupplementalCategories()
+    {
+        return getBagList(prefix + ":SupplementalCategories");
+    }
+
+    /**
+     * Remove a supplemental category.
+     * 
+     * @param s The supplemental category.
+     */
+    public void removeSupplementalCategory( String s )
+    {
+        removeBagValue(prefix + ":SupplementalCategories", s);
+    }
+
+    /**
+     * The transmission reference.
+     *  
+     * @param s The transmission reference.
+     */
+    public void setTransmissionReference( String s )
+    {
+        setTextProperty(prefix + ":TransmissionReference", s);
+    }
+
+    /**
+     * The transmission reference.
+     * 
+     * @return The transmission reference.
+     */
+    public String getTransmissionReference()
+    {
+        return getTextProperty(prefix + ":TransmissionReference");
+    }
+
+    /**
+     * The urgency.
+     * 
+     * @param s The urgency.
+     */
+    public void setUrgency( Integer s )
+    {
+        if( s != null )
+        {
+            if( s.intValue() < 1 || s.intValue() > 8 )
+            {
+                throw new RuntimeException( "Error: photoshop:Urgency must be between 1 and 8.  value=" + s );
+            }
+        }
+        setIntegerProperty(prefix + ":Urgency", s);
+    }
+
+    /**
+     * The urgency.
+     * 
+     * @return The urgency.
+     */
+    public Integer getUrgency()
+    {
+        return getIntegerProperty(prefix + ":Urgency");
+    }
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaRightsManagement.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaRightsManagement.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaRightsManagement.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/XMPSchemaRightsManagement.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,234 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties that are related to rights management.
+ * 
+ * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
+ * @version $Revision: 1.6 $
+ */
+public class XMPSchemaRightsManagement extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://ns.adobe.com/xap/1.0/rights/";
+
+    /**
+     * Construct a new blank PDF schema.
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaRightsManagement(XMPMetadata parent)
+    {
+        super(parent, "xmpRights", NAMESPACE);
+    }
+
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaRightsManagement(Element element, String prefix)
+    {
+        super(element, prefix);
+    }
+
+    /**
+     * The online rights management certificate.
+     *
+     * @param certificate The URL to the rights cert.
+     */
+    public void setCertificateURL( String certificate )
+    {
+        setTextProperty("xmpRights:Certificate", certificate);
+    }
+
+    /**
+     * Get the URL of the rights managment certificate.
+     *
+     * @return The rights management certificate URL.
+     */
+    public String getCertificateURL()
+    {
+        return getTextProperty(prefix + ":Certificate");
+    }
+
+    /**
+     * Flag indicating if this is a rights managed resource.
+     *
+     * @param marked The marked value.
+     */
+    public void setMarked( Boolean marked )
+    {
+        setBooleanProperty(prefix + ":Marked", marked);
+    }
+
+    /**
+     * Get the flag that indicates if this is a marked resource..
+     *
+     * @return The value of the marked flag.
+     */
+    public Boolean getMarked()
+    {
+        Boolean b = getBooleanProperty(prefix + ":Marked");
+        return b != null ? b : Boolean.FALSE;
+    }
+
+    /**
+     * Remove an owner from the list.
+     *
+     * @param owner The owner to remove.
+     */
+    public void removeOwner( String owner )
+    {
+        removeBagValue(prefix + ":Owner", owner);
+    }
+
+    /**
+     * Add an owner to the list.
+     *
+     * @param owner A new legal owner to this resource.
+     */
+    public void addOwner( String owner )
+    {
+        addBagValue(prefix + ":Owner", owner);
+    }
+
+    /**
+     * Get the complete list of legal owners.
+     *
+     * @return The list of owners.
+     */
+    public List getOwners()
+    {
+        return getBagList(prefix + ":Owner");
+    }
+
+    /**
+     * Set the default usage terms for this resource.
+     *
+     * @param terms The resource usage terms. 
+     */
+    public void setUsageTerms( String terms )
+    {
+        setLanguageProperty(prefix + ":UsageTerms", null, terms);
+    }
+
+    /**
+     * Get the default usage terms for the document.
+     *
+     * @return The terms for this resource.
+     */
+    public String getUsageTerms()
+    {
+        return getLanguageProperty(prefix + ":UsageTerms", null);
+    }
+
+    /**
+     * Set the usage terms of this resource in a specific language.
+     *
+     * @param language The language code.
+     * @param terms The terms of this resource.
+     */
+    public void setDescription( String language, String terms )
+    {
+        setLanguageProperty(prefix + ":UsageTerms", language, terms);
+    }
+
+    /**
+     * Get the usage terms in a specific language.
+     *
+     * @param language The language code to get the description for.
+     *
+     * @return The usage terms in the specified language or null if it does not exist.
+     */
+    public String getUsageTerms( String language )
+    {
+        return getLanguageProperty(prefix + ":UsageTerms", language);
+    }
+
+    /**
+     * Get a list of all languages that a usage term exists for.
+     *
+     * @return A non-null list of languages, potentially an empty list.
+     */
+    public List getUsageTermsLanguages()
+    {
+        return getLanguagePropertyLanguages(prefix + ":UsageTerms");
+    }
+
+    /**
+     * Set the external link that describes the owners/rights of this resource.
+     *
+     * @param webStatement The URL to a terms site.
+     */
+    public void setWebStatement( String webStatement )
+    {
+        setTextProperty(prefix + ":WebStatement", webStatement);
+    }
+
+    /**
+     * Get the URL that describes the terms of this resource.
+     *
+     * @return The usage rights URL.
+     */
+    public String getWebStatement()
+    {
+        return getTextProperty(prefix + ":WebStatement");
+    }
+
+    /**
+     * Set the copyright information.
+     *
+     * @param copyright The copyright information.
+     */
+    public void setCopyright( String copyright )
+    {
+        setTextProperty(prefix + ":Copyright", copyright);
+    }
+
+    /**
+     * Get the copyright information.
+     *
+     * @return The copyright information.
+     */
+    public String getCopyright()
+    {
+        return getTextProperty(prefix + ":Copyright");
+    }
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/package.html
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/package.html?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/package.html (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/package.html Sun Jun 22 12:09:15 2008
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+
+</head>
+<body>
+This package holds data access classes for XMP data structures.
+</body>
+</html>

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPMetadataPDFA.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPMetadataPDFA.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPMetadataPDFA.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPMetadataPDFA.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,205 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp.pdfa;
+
+import java.io.IOException;
+
+import org.jempbox.impl.XMLUtil;
+import org.jempbox.xmp.XMPMetadata;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+/**
+ * PDFA Metadata.
+ * 
+ * @author <a href="mailto:ben@benlitchfield.com">Ben Litchfield</a>
+ * @version $Revision: 1.2 $
+ */
+public class XMPMetadataPDFA extends XMPMetadata 
+{
+
+    /**
+     * Constructor.
+     * 
+     * @throws IOException If there is an error creating this metadata.
+     */
+    public XMPMetadataPDFA() throws IOException 
+    {
+        super();
+        init();
+    }
+
+    /**
+     * Constructor.
+     * 
+     * @param doc The XML document that maps to the metadata.
+     */
+    public XMPMetadataPDFA(Document doc) 
+    {
+        super(doc);
+        init();
+    }
+
+    private void init()
+    {
+        // PDFA specific schemas
+        nsMappings.put( XMPSchemaPDFAField.NAMESPACE, XMPSchemaPDFAField.class );
+        nsMappings.put( XMPSchemaPDFAId.NAMESPACE, XMPSchemaPDFAId.class );
+        nsMappings.put( XMPSchemaPDFAProperty.NAMESPACE, XMPSchemaPDFAProperty.class );
+        nsMappings.put( XMPSchemaPDFASchema.NAMESPACE, XMPSchemaPDFASchema.class );
+        nsMappings.put( XMPSchemaPDFAType.NAMESPACE, XMPSchemaPDFAType.class );
+    }
+
+    /**
+     * Load a a PDFA metadata.
+     * 
+     * @param is An XML input stream
+     * @return A PDFA metadata.
+     * @throws IOException If there is an error loading the XML document.
+     */
+    public static XMPMetadata load( InputSource is ) throws IOException
+    {
+        return new XMPMetadataPDFA( XMLUtil.parse( is ) );
+    }
+
+    /**
+     * Get the PDFAField schema.
+     * 
+     * @return A PDFAField schema.
+     * 
+     * @throws IOException If there is an error finding the scheam.
+     */
+    public XMPSchemaPDFAField getPDFAFieldSchema() throws IOException 
+    {        
+        return (XMPSchemaPDFAField) getSchemaByClass(XMPSchemaPDFAField.class);
+    }
+    
+    /**
+     * Add a new PDFAField schema.
+     * 
+     * @return The newly added PDFA schema.
+     */
+    public XMPSchemaPDFAField addPDFAFieldSchema() 
+    {
+        XMPSchemaPDFAField schema = new XMPSchemaPDFAField(this);        
+        return (XMPSchemaPDFAField) basicAddSchema(schema);
+    }
+    
+    /**
+     * Get the PDFA ID schema.
+     * @return The PDFA ID schema.
+     * @throws IOException If there is an error accessing the PDFA id schema.
+     */
+    public XMPSchemaPDFAId getPDFAIdSchema() throws IOException 
+    {        
+        return (XMPSchemaPDFAId) getSchemaByClass(XMPSchemaPDFAId.class);
+    }
+    
+    /**
+     * Add a PDFA Id schema and return the result.
+     * 
+     * @return The newly created PDFA Id schema.
+     */
+    public XMPSchemaPDFAId addPDFAIdSchema() 
+    {
+        XMPSchemaPDFAId schema = new XMPSchemaPDFAId(this);        
+        return (XMPSchemaPDFAId) basicAddSchema(schema);
+    }
+
+    /**
+     * Get the PDFA property schema.
+     * 
+     * @return The PDFA property schema.
+     * 
+     * @throws IOException If there is an error accessing the PDFA property schema.
+     */
+    public XMPSchemaPDFAProperty getPDFAPropertySchema() throws IOException 
+    {        
+        return (XMPSchemaPDFAProperty) getSchemaByClass(XMPSchemaPDFAProperty.class);
+    }
+    
+    /**
+     * Create a PDFA property schema.
+     * 
+     * @return The newly created property schema.
+     */
+    public XMPSchemaPDFAProperty addPDFAPropertySchema() 
+    {
+        XMPSchemaPDFAProperty schema = new XMPSchemaPDFAProperty(this);        
+        return (XMPSchemaPDFAProperty) basicAddSchema(schema);
+    }
+
+    /**
+     * Get the PDFA schema.
+     * 
+     * @return The PDFA schema.
+     * 
+     * @throws IOException If there is an error getting the PDFA schema.
+     */
+    public XMPSchemaPDFASchema getPDFASchema() throws IOException 
+    {        
+        return (XMPSchemaPDFASchema) getSchemaByClass(XMPSchemaPDFASchema.class);
+    }
+
+    /**
+     * Add a PDFA schema.
+     * 
+     * @return The newly created PDFA schema.
+     */
+    public XMPSchemaPDFASchema addPDFASchema() 
+    {
+        XMPSchemaPDFASchema schema = new XMPSchemaPDFASchema(this);        
+        return (XMPSchemaPDFASchema) basicAddSchema(schema);
+    }
+
+    /**
+     * Get the PDFA type schema.
+     * 
+     * @return The PDFA type schema.
+     * 
+     * @throws IOException If there is an error accessing the PDFA type schema.
+     */
+    public XMPSchemaPDFAType getPDFATypeSchema() throws IOException 
+    {        
+        return (XMPSchemaPDFAType) getSchemaByClass(XMPSchemaPDFAType.class);
+    }
+    
+    /**
+     * Add a new PDFA type schema.
+     * 
+     * @return The newly created PDFA type schema.
+     */
+    public XMPSchemaPDFAType addPDFATypeSchema() 
+    {
+        XMPSchemaPDFAType schema = new XMPSchemaPDFAType(this);        
+        return (XMPSchemaPDFAType) basicAddSchema(schema);
+    }
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAField.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAField.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAField.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAField.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp.pdfa;
+
+import org.jempbox.xmp.XMPMetadata;
+import org.jempbox.xmp.XMPSchema;
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties used PDFA extension schema description schemas.
+ * TODO 2 naked so far, implement
+ * 
+ * @author Karsten Krieg (kkrieg@intarsys.de)
+ * 
+ * @version $Revision: 1.1 $
+ */
+public class XMPSchemaPDFAField extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://www.aiim.org/pdfa/ns/field";
+    
+    /**
+     * Construct a new blank PDFA schema.
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaPDFAField( XMPMetadata parent )
+    {
+        super( parent, "pdfaField", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaPDFAField( Element element , String prefix)
+    {
+        super( element , prefix);
+    }   
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAId.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAId.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAId.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAId.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,133 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp.pdfa;
+
+import org.jempbox.xmp.XMPMetadata;
+import org.jempbox.xmp.XMPSchema;
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties used PDFA extension schema description schemas.
+ * TODO 2 naked so far, implement
+ * 
+ * @author Karsten Krieg (kkrieg@intarsys.de)
+ * @version $Revision: 1.1 $
+ */
+public class XMPSchemaPDFAId extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     * This is the future amendment of the PDFA Spec with the trailing slash at end
+     */    
+    public static final String NAMESPACE = "http://www.aiim.org/pdfa/ns/id/";
+    
+    /**
+     * Construct a new blank PDFA schema.
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaPDFAId( XMPMetadata parent )
+    {
+        super( parent, "pdfaType", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaPDFAId( Element element , String prefix)
+    {
+        super( element , prefix);
+    }   
+    
+    /**
+     * Get the ISO19005 part number.
+     * 
+     * @return The ISO 19005 part number.
+     */
+    public Integer getPart()
+    {
+        return getIntegerProperty( prefix+":part" );
+    }
+    
+    /**
+     * Set the ISO19005 part number.
+     * 
+     * @param part The ISO 19005 part number.
+     */
+    public void setPart( Integer part )
+    {
+        setIntegerProperty( prefix+":part", part);
+    }
+    
+    /**
+     * Set the amendment idenitifier.
+     *
+     * @param amd The amendment idenitifier.
+     */
+    public void setAmd( String amd )
+    {
+        setTextProperty( prefix+":amd", amd);
+    }
+    
+    /**
+     * Get the amendment idenitifier.
+     *
+     * @return The amendment idenitifier.
+     */
+    public String getAmd()
+    {
+        return getTextProperty( prefix+":amd" );
+    }
+
+    /**
+     * Set the conformance level.
+     *
+     * @param conformance The conformance level.
+     */
+    public void setConformance( String conformance )
+    {
+        setTextProperty( prefix+":conformance", conformance);
+    }
+    
+    /**
+     * Get the conformance level.
+     *
+     * @return The conformance level.
+     */
+    public String getConformance()
+    {
+        return getTextProperty( prefix+":conformance" );
+    }
+
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAProperty.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAProperty.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAProperty.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAProperty.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,71 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp.pdfa;
+
+import org.jempbox.xmp.XMPMetadata;
+import org.jempbox.xmp.XMPSchema;
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties used PDFA extension schema description schemas.
+ * TODO 2 naked so far, implement
+ * 
+ * @author Karsten Krieg (kkrieg@intarsys.de)
+ * @version $Revision: 1.1 $
+ */
+public class XMPSchemaPDFAProperty extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://www.aiim.org/pdfa/ns/property";
+    
+    /**
+     * Construct a new blank PDFA schema.
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaPDFAProperty( XMPMetadata parent )
+    {
+        super( parent, "pdfaProperty", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaPDFAProperty( Element element , String prefix)
+    {
+        super( element , prefix);
+    }   
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFASchema.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFASchema.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFASchema.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFASchema.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,112 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp.pdfa;
+
+import org.jempbox.xmp.XMPMetadata;
+import org.jempbox.xmp.XMPSchema;
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties used PDFA extension schema description schemas.
+ * 
+ * @author Karsten Krieg (kkrieg@intarsys.de)
+ * @version $Revision: 1.1 $
+ */
+public class XMPSchemaPDFASchema extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://www.aiim.org/pdfa/ns/schema";
+    
+    /**
+     * Construct a new blank PDFA schema.
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaPDFASchema( XMPMetadata parent )
+    {
+        super( parent, "pdfaSchema", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaPDFASchema( Element element, String prefix )
+    {
+        super( element , prefix);
+    }
+    
+    /**
+     * PDFA schema.
+     *
+     * @param schema The optional description of schema.
+     */
+    public void setSchema( String schema )
+    {
+        setTextProperty( "pdfaSchema:schema", schema);
+    }
+    
+    /**
+     * Get the PDFA schema.
+     *
+     * @return The optional description of schema.
+     */
+    public String getSchema()
+    {
+        return getTextProperty( "pdfaSchema:schema" );
+    }
+
+    /**
+     * PDFA Schema prefix.
+     *
+     * @param prefix Preferred schema namespace prefix.
+     */
+    public void setPrefix( String prefix)
+    {
+        setTextProperty( "pdfaSchema:prefix", prefix);
+    }
+    
+    /**
+     * Get the PDFA Schema prefix.
+     *
+     * @return Preferred schema namespace prefix.
+     */
+    public String getPrefix()
+    {
+        return getTextProperty( "pdfaSchema:prefix" );
+    }
+
+
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAType.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAType.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAType.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/XMPSchemaPDFAType.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,71 @@
+/**
+ * Copyright (c) 2006, www.jempbox.org
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 3. Neither the name of pdfbox; nor the names of its
+ *    contributors may be used to endorse or promote products derived from this
+ *    software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * http://www.jempbox.org
+ *
+ */
+package org.jempbox.xmp.pdfa;
+
+import org.jempbox.xmp.XMPMetadata;
+import org.jempbox.xmp.XMPSchema;
+import org.w3c.dom.Element;
+
+/**
+ * Define XMP properties used PDFA extension schema description schemas.
+ * TODO 2 naked so far, implement
+ * 
+ * @author Karsten Krieg (kkrieg@intarsys.de)
+ * @version $Revision: 1.1 $
+ */
+public class XMPSchemaPDFAType extends XMPSchema
+{
+    /**
+     * The namespace for this schema.
+     */
+    public static final String NAMESPACE = "http://www.aiim.org/pdfa/ns/type";
+    
+    /**
+     * Construct a new blank PDFA schema.
+     *
+     * @param parent The parent metadata schema that this will be part of.
+     */
+    public XMPSchemaPDFAType( XMPMetadata parent )
+    {
+        super( parent, "pdfaType", NAMESPACE );
+    }
+    
+    /**
+     * Constructor from existing XML element.
+     * 
+     * @param element The existing element.
+     * @param prefix The schema prefix.
+     */
+    public XMPSchemaPDFAType( Element element, String prefix )
+    {
+        super( element , prefix);
+    }   
+}
\ No newline at end of file

Added: incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/package.html
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/package.html?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/package.html (added)
+++ incubator/pdfbox/trunk/jempbox/src/org/jempbox/xmp/pdfa/package.html Sun Jun 22 12:09:15 2008
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+
+</head>
+<body>
+This package holds data access classes for XMP PDFA data structures.
+</body>
+</html>

Added: incubator/pdfbox/trunk/jempbox/src/test/jempbox/xmp/AllTests.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/jempbox/src/test/jempbox/xmp/AllTests.java?rev=670399&view=auto
==============================================================================
--- incubator/pdfbox/trunk/jempbox/src/test/jempbox/xmp/AllTests.java (added)
+++ incubator/pdfbox/trunk/jempbox/src/test/jempbox/xmp/AllTests.java Sun Jun 22 12:09:15 2008
@@ -0,0 +1,38 @@
+package test.jempbox.xmp;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Suite for all tests in test.jempbox.xmp.
+ * 
+ * @author $Author: coezbek $
+ * @version $Revision: 1.1 $ ($Date: 2006/12/30 17:27:46 $)
+ * 
+ */
+public class AllTests
+{
+
+    /**
+     * Hide constructor.
+     */
+    protected AllTests()
+    {
+    }
+
+    /**
+     * Method returns a test representing all tests in the package
+     * test.jempbox.xmp.
+     * 
+     * @return The test representing all tests in the current package.
+     */
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite("Test for test.jempbox.xmp");
+        // $JUnit-BEGIN$
+        suite.addTestSuite(XMPSchemaTest.class);
+        // $JUnit-END$
+        return suite;
+    }
+
+}