You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by je...@apache.org on 2006/06/19 21:22:04 UTC
svn commit: r415389 [2/2] - in /xmlgraphics/commons/trunk:
examples/java/xmp/ src/java/org/apache/xmlgraphics/util/
src/java/org/apache/xmlgraphics/xmp/
src/java/org/apache/xmlgraphics/xmp/merge/
src/java/org/apache/xmlgraphics/xmp/schemas/ src/java/or...
Added: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreAdapter.java?rev=415389&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreAdapter.java (added)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreAdapter.java Mon Jun 19 12:22:02 2006
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.xmp.schemas;
+
+import java.util.Date;
+
+import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.XMPSchemaAdapter;
+import org.apache.xmlgraphics.xmp.XMPSchemaRegistry;
+
+/**
+ * Schema adapter implementation for the Dublin Core schema.
+ */
+public class DublinCoreAdapter extends XMPSchemaAdapter {
+
+ /**
+ * Constructs a new adapter for Dublin Core around the given metadata object.
+ * @param meta the underlying metadata
+ */
+ public DublinCoreAdapter(Metadata meta) {
+ super(meta, XMPSchemaRegistry.getInstance().getSchema(DublinCoreSchema.NAMESPACE));
+ }
+
+ /**
+ * Adds a new entry to the list of creators (authors of the resource).
+ * @param value the new value
+ */
+ public void addCreator(String value) {
+ addStringToSeq("creator", value);
+ }
+
+ /** @return a String array of all creators */
+ public String[] getCreators() {
+ return getStringArray("creator");
+ }
+
+ /**
+ * Adds a new entry to the list of dates indicating points in time something interesting
+ * happened to the resource.
+ * @param value the date value
+ */
+ public void addDate(Date value) {
+ addDateToSeq("date", value);
+ }
+
+ /**
+ * Adds a new entry to the list of subjects (descriptive phrases or keywords that
+ * specify the topic of the content of the resource).
+ * @param value the new value
+ */
+ public void addSubject(String value) {
+ addStringToBag("subject", value);
+ }
+
+ /** @return a String array of all subjects */
+ public String[] getSubjects() {
+ return getStringArray("subject");
+ }
+
+ /**
+ * Sets the title of the resource (in the default language).
+ * @param value the new value
+ */
+ public void setTitle(String value) {
+ setTitle(null, value);
+ }
+
+ /**
+ * Sets the title of the resource.
+ * @param lang the language of the value ("x-default" or null for the default language)
+ * @param value the new value
+ */
+ public void setTitle(String lang, String value) {
+ setLangAlt("title", lang, value);
+ }
+
+ /** @return the title of the resource (in the default language) */
+ public String getTitle() {
+ return getTitle(null);
+ }
+
+ /**
+ * Returns the title of the resource in a language-dependant way.
+ * @param lang the language ("x-default" or null for the default language)
+ * @return the language-dependent value.
+ */
+ public String getTitle(String lang) {
+ return getLangAlt(lang, "title");
+ }
+
+}
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreAdapter.java
------------------------------------------------------------------------------
svn:keywords = Id
Added: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreSchema.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreSchema.java?rev=415389&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreSchema.java (added)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreSchema.java Mon Jun 19 12:22:02 2006
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.xmp.schemas;
+
+import org.apache.xmlgraphics.util.QName;
+import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.XMPConstants;
+import org.apache.xmlgraphics.xmp.XMPSchema;
+import org.apache.xmlgraphics.xmp.merge.ArrayAddPropertyMerger;
+import org.apache.xmlgraphics.xmp.merge.MergeRuleSet;
+
+/**
+ * Schema class for Dublin Core.
+ */
+public class DublinCoreSchema extends XMPSchema {
+
+ /** Namespace URI for Dublin Core */
+ public static final String NAMESPACE = XMPConstants.DUBLIN_CORE_NAMESPACE;
+
+ private static MergeRuleSet dcMergeRuleSet;
+
+ static {
+ dcMergeRuleSet = new MergeRuleSet();
+ //Dates are added up not replaced
+ dcMergeRuleSet.addRule(new QName(NAMESPACE, "date"), new ArrayAddPropertyMerger());
+ }
+
+ /** Creates a new schema instance for Dublin Core. */
+ public DublinCoreSchema() {
+ super(NAMESPACE, "dc");
+ }
+
+ /**
+ * Creates and returns an adapter for this schema around the given metadata object.
+ * @param meta the metadata object
+ * @return the newly instantiated adapter
+ */
+ public DublinCoreAdapter getAdapter(Metadata meta) {
+ return new DublinCoreAdapter(meta);
+ }
+
+ /** @see org.apache.xmlgraphics.xmp.XMPSchema#getDefaultMergeRuleSet() */
+ public MergeRuleSet getDefaultMergeRuleSet() {
+ return dcMergeRuleSet;
+ }
+
+}
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreSchema.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/DublinCoreSchema.java
------------------------------------------------------------------------------
svn:keywords = Id
Added: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicAdapter.java?rev=415389&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicAdapter.java (added)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicAdapter.java Mon Jun 19 12:22:02 2006
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.xmp.schemas;
+
+import java.util.Date;
+
+import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.XMPSchemaAdapter;
+import org.apache.xmlgraphics.xmp.XMPSchemaRegistry;
+
+/**
+ * Schema adapter implementation for the XMP Basic schema.
+ */
+public class XMPBasicAdapter extends XMPSchemaAdapter {
+
+ /**
+ * Constructs a new adapter for XMP Basic around the given metadata object.
+ * @param meta the underlying metadata
+ */
+ public XMPBasicAdapter(Metadata meta, String namespace) {
+ super(meta, XMPSchemaRegistry.getInstance().getSchema(namespace));
+ }
+
+ /**
+ * Sets the first known tool used to create the resource.
+ * @param value the creator tool
+ */
+ public void setCreatorTool(String value) {
+ setValue("CreatorTool", value);
+ }
+
+ /** @return the first known tool used to create the resource */
+ public String getCreatorTool() {
+ return getValue("CreatorTool");
+ }
+
+ /**
+ * Sets the date and time the resource was originally created.
+ * @param creationDate the creation date
+ */
+ public void setCreateDate(Date creationDate) {
+ setDateValue("CreateDate", creationDate);
+ }
+
+ /**
+ * Sets the date and time the resource was last modified.
+ * @param modifyDate the modification date
+ */
+ public void setModifyDate(Date modifyDate) {
+ setDateValue("ModifyDate", modifyDate);
+ }
+
+ /**
+ * Sets the date and time any metadata for this resource was last changed.
+ * @param metadataDate the modification date for the metadata
+ */
+ public void setMetadataDate(Date metadataDate) {
+ setDateValue("MetadataDate", metadataDate);
+ }
+}
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicAdapter.java
------------------------------------------------------------------------------
svn:keywords = Id
Added: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicSchema.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicSchema.java?rev=415389&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicSchema.java (added)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicSchema.java Mon Jun 19 12:22:02 2006
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.xmp.schemas;
+
+import org.apache.xmlgraphics.util.QName;
+import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.XMPConstants;
+import org.apache.xmlgraphics.xmp.XMPSchema;
+import org.apache.xmlgraphics.xmp.merge.MergeRuleSet;
+import org.apache.xmlgraphics.xmp.merge.NoReplacePropertyMerger;
+
+/**
+ * XMP schema for XMP Basic.
+ */
+public class XMPBasicSchema extends XMPSchema {
+
+ /** Namespace URI for XMP Basic */
+ public static final String NAMESPACE = XMPConstants.XMP_BASIC_NAMESPACE;
+
+ private static MergeRuleSet mergeRuleSet = new MergeRuleSet();
+
+ /** Creates a new schema instance for Dublin Core. */
+ public XMPBasicSchema() {
+ super(NAMESPACE, "xmp");
+ }
+
+ static {
+ //CreateDate shall be preserved if it exists
+ mergeRuleSet.addRule(new QName(NAMESPACE, "CreateDate"), new NoReplacePropertyMerger());
+ }
+
+ /**
+ * Creates and returns an adapter for this schema around the given metadata object.
+ * @param meta the metadata object
+ * @return the newly instantiated adapter
+ */
+ public static XMPBasicAdapter getAdapter(Metadata meta) {
+ return new XMPBasicAdapter(meta, NAMESPACE);
+ }
+
+ /** @see org.apache.xmlgraphics.xmp.XMPSchema#getDefaultMergeRuleSet() */
+ public MergeRuleSet getDefaultMergeRuleSet() {
+ return mergeRuleSet;
+ }
+
+}
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicSchema.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/XMPBasicSchema.java
------------------------------------------------------------------------------
svn:keywords = Id
Added: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFAdapter.java?rev=415389&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFAdapter.java (added)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFAdapter.java Mon Jun 19 12:22:02 2006
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.xmp.schemas.pdf;
+
+import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.XMPSchemaAdapter;
+import org.apache.xmlgraphics.xmp.XMPSchemaRegistry;
+
+/**
+ * Schema adapter implementation for the Adobe PDF schema.
+ */
+public class AdobePDFAdapter extends XMPSchemaAdapter {
+
+ /**
+ * Constructs a new adapter for Adobe PDF around the given metadata object.
+ * @param meta the underlying metadata
+ */
+ public AdobePDFAdapter(Metadata meta, String namespace) {
+ super(meta, XMPSchemaRegistry.getInstance().getSchema(namespace));
+ }
+
+ /** @return the keywords */
+ public String getKeywords() {
+ return getValue("Keywords");
+ }
+
+ /**
+ * Sets the keywords.
+ * @param value the keywords
+ */
+ public void setKeywords(String value) {
+ setValue("Keywords", value);
+ }
+
+ /** @return the PDF version */
+ public String getPDFVersion() {
+ return getValue("PDFVersion");
+ }
+
+ /**
+ * Sets the PDF version
+ * @param value the PDF version (ex. "1.4")
+ */
+ public void setPDFVersion(String value) {
+ setValue("PDFVersion", value);
+ }
+
+ /** @return the name of the tool that produced the PDF document */
+ public String getProducer() {
+ return getValue("Producer");
+ }
+
+ /**
+ * Sets the name of the tool that produced the PDF document
+ * @param value the producer
+ */
+ public void setProducer(String value) {
+ setValue("Producer", value);
+ }
+
+}
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFAdapter.java
------------------------------------------------------------------------------
svn:keywords = Id
Added: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFSchema.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFSchema.java?rev=415389&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFSchema.java (added)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFSchema.java Mon Jun 19 12:22:02 2006
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.xmp.schemas.pdf;
+
+import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.XMPConstants;
+import org.apache.xmlgraphics.xmp.XMPSchema;
+import org.apache.xmlgraphics.xmp.merge.MergeRuleSet;
+
+/**
+ * Adobe PDF XMP schema.
+ */
+public class AdobePDFSchema extends XMPSchema {
+
+ /** Namespace URI for the Adobe PDF XMP schema */
+ public static final String NAMESPACE = XMPConstants.ADOBE_PDF_NAMESPACE;
+
+ private static MergeRuleSet mergeRuleSet = new MergeRuleSet();
+
+ /** Creates a new schema instance for Dublin Core. */
+ public AdobePDFSchema() {
+ super(NAMESPACE, "pdf");
+ }
+
+ /**
+ * Creates and returns an adapter for this schema around the given metadata object.
+ * @param meta the metadata object
+ * @return the newly instantiated adapter
+ */
+ public static AdobePDFAdapter getAdapter(Metadata meta) {
+ return new AdobePDFAdapter(meta, NAMESPACE);
+ }
+
+ /** @see org.apache.xmlgraphics.xmp.XMPSchema#getDefaultMergeRuleSet() */
+ public MergeRuleSet getDefaultMergeRuleSet() {
+ return mergeRuleSet;
+ }
+
+}
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFSchema.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/AdobePDFSchema.java
------------------------------------------------------------------------------
svn:keywords = Id
Added: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAAdapter.java?rev=415389&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAAdapter.java (added)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAAdapter.java Mon Jun 19 12:22:02 2006
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed 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.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.xmp.schemas.pdf;
+
+import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.XMPSchemaAdapter;
+import org.apache.xmlgraphics.xmp.XMPSchemaRegistry;
+
+/**
+ * Schema adapter implementation for the old (deprecated) PDF/A schema. This is still needed to
+ * make Adobe Acrobat happy.
+ */
+public class PDFAAdapter extends XMPSchemaAdapter {
+
+ /**
+ * Constructs a new adapter for Dublin Core around the given metadata object.
+ * @param meta the underlying metadata
+ */
+ public PDFAAdapter(Metadata meta, String namespace) {
+ super(meta, XMPSchemaRegistry.getInstance().getSchema(namespace));
+ }
+
+ /**
+ * Sets the PDF/A version identifier ("part").
+ * @param value the version identifier ("1" for PDF/A-1)
+ */
+ public void setPart(int value) {
+ setValue("part", Integer.toString(value));
+ }
+
+ /** @return the PDF/A version identifier */
+ public int getPart() {
+ return Integer.parseInt(getValue("part"));
+ }
+
+ /**
+ * Sets the PDF/A amendment identifier ("amd").
+ * @param value the amendment identifiert
+ */
+ public void setAmendment(String value) {
+ setValue("amd", value);
+ }
+
+ /** @return the PDF/A amendment identifier */
+ public String getAmendment() {
+ return getValue("amd");
+ }
+
+ /**
+ * Sets the PDF/A conformance level.
+ * @param value the conformance level ("A" or "B" for PDF/A-1)
+ */
+ public void setConformance(String value) {
+ setValue("conformance", value);
+ }
+
+ /** @return the PDF/A conformance level */
+ public String getConformance() {
+ return getValue("conformance");
+ }
+
+}
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAAdapter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAAdapter.java
------------------------------------------------------------------------------
svn:keywords = Id
Added: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAOldXMPSchema.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAOldXMPSchema.java?rev=415389&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAOldXMPSchema.java (added)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAOldXMPSchema.java Mon Jun 19 12:22:02 2006
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.xmp.schemas.pdf;
+
+import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.XMPConstants;
+import org.apache.xmlgraphics.xmp.XMPSchema;
+import org.apache.xmlgraphics.xmp.merge.MergeRuleSet;
+
+/**
+ * XMP Schema for PDF/A (ISO 19005-1). This schema uses a namespace URI used in a draft version
+ * of the ISO standard which is still necessary because of a bug in Adobe Acrobat.
+ */
+public class PDFAOldXMPSchema extends XMPSchema {
+
+ /** Namespace URI for Dublin Core */
+ public static final String NAMESPACE = XMPConstants.PDF_A_IDENTIFICATION_OLD;
+
+ private static MergeRuleSet mergeRuleSet = new MergeRuleSet();
+
+ /** Creates a new schema instance for Dublin Core. */
+ public PDFAOldXMPSchema() {
+ super(NAMESPACE, "pdfaid_1");
+ }
+
+ /**
+ * Creates and returns an adapter for this schema around the given metadata object.
+ * @param meta the metadata object
+ * @return the newly instantiated adapter
+ */
+ public static PDFAAdapter getAdapter(Metadata meta) {
+ return new PDFAAdapter(meta, NAMESPACE);
+ }
+
+ /** @see org.apache.xmlgraphics.xmp.XMPSchema#getDefaultMergeRuleSet() */
+ public MergeRuleSet getDefaultMergeRuleSet() {
+ return mergeRuleSet;
+ }
+
+
+}
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAOldXMPSchema.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAOldXMPSchema.java
------------------------------------------------------------------------------
svn:keywords = Id
Added: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAXMPSchema.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAXMPSchema.java?rev=415389&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAXMPSchema.java (added)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAXMPSchema.java Mon Jun 19 12:22:02 2006
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/* $Id$ */
+
+package org.apache.xmlgraphics.xmp.schemas.pdf;
+
+import org.apache.xmlgraphics.xmp.Metadata;
+import org.apache.xmlgraphics.xmp.XMPConstants;
+import org.apache.xmlgraphics.xmp.XMPSchema;
+import org.apache.xmlgraphics.xmp.merge.MergeRuleSet;
+
+/**
+ * XMP Schema for PDF/A (ISO 19005-1).
+ */
+public class PDFAXMPSchema extends XMPSchema {
+
+ /** Namespace URI for Dublin Core */
+ public static final String NAMESPACE = XMPConstants.PDF_A_IDENTIFICATION;
+
+ private static MergeRuleSet mergeRuleSet = new MergeRuleSet();
+
+ /** Creates a new schema instance for Dublin Core. */
+ public PDFAXMPSchema() {
+ super(NAMESPACE, "pdfaid");
+ }
+
+ /**
+ * Creates and returns an adapter for this schema around the given metadata object.
+ * @param meta the metadata object
+ * @return the newly instantiated adapter
+ */
+ public static PDFAAdapter getAdapter(Metadata meta) {
+ return new PDFAAdapter(meta, NAMESPACE);
+ }
+
+ /** @see org.apache.xmlgraphics.xmp.XMPSchema#getDefaultMergeRuleSet() */
+ public MergeRuleSet getDefaultMergeRuleSet() {
+ return mergeRuleSet;
+ }
+
+}
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAXMPSchema.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/xmp/schemas/pdf/PDFAXMPSchema.java
------------------------------------------------------------------------------
svn:keywords = Id
---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org