summaryrefslogtreecommitdiff
path: root/java/XMPCore/src/com/adobe/xmp/impl
diff options
context:
space:
mode:
Diffstat (limited to 'java/XMPCore/src/com/adobe/xmp/impl')
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/Base64.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/ByteBuffer.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/CountOutputStream.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/FixASCIIControlsReader.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/ISO8601Converter.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/Latin1Converter.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/ParameterAsserts.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/ParseRDF.java33
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/QName.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/Utils.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPDateTimeImpl.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPIteratorImpl.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPMetaImpl.java16
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPMetaParser.java33
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPNode.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPNodeUtils.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPNormalizer.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPSchemaRegistryImpl.java52
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerHelper.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerRDF.java29
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/XMPUtilsImpl.java6
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPath.java2
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathParser.java8
-rw-r--r--java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathSegment.java2
24 files changed, 116 insertions, 95 deletions
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/Base64.java b/java/XMPCore/src/com/adobe/xmp/impl/Base64.java
index c47d08c..a327876 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/Base64.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/Base64.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2001-2005 Adobe Systems Incorporated
+// Copyright 2001 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/ByteBuffer.java b/java/XMPCore/src/com/adobe/xmp/impl/ByteBuffer.java
index c8ef03f..22cbc4b 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/ByteBuffer.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/ByteBuffer.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/CountOutputStream.java b/java/XMPCore/src/com/adobe/xmp/impl/CountOutputStream.java
index c70b653..ded1296 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/CountOutputStream.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/CountOutputStream.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/FixASCIIControlsReader.java b/java/XMPCore/src/com/adobe/xmp/impl/FixASCIIControlsReader.java
index d248e0d..c6ac7d4 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/FixASCIIControlsReader.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/FixASCIIControlsReader.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/ISO8601Converter.java b/java/XMPCore/src/com/adobe/xmp/impl/ISO8601Converter.java
index 71fc7df..b38bb16 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/ISO8601Converter.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/ISO8601Converter.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/Latin1Converter.java b/java/XMPCore/src/com/adobe/xmp/impl/Latin1Converter.java
index a8707a5..118d77d 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/Latin1Converter.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/Latin1Converter.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/ParameterAsserts.java b/java/XMPCore/src/com/adobe/xmp/impl/ParameterAsserts.java
index 51c156a..78ae5d6 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/ParameterAsserts.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/ParameterAsserts.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/ParseRDF.java b/java/XMPCore/src/com/adobe/xmp/impl/ParseRDF.java
index 93e3ef0..2b96550 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/ParseRDF.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/ParseRDF.java
@@ -1092,24 +1092,12 @@ public class ParseRDF implements XMPError, XMPConst
throws XMPException
{
boolean isLang = XML_LANG.equals(name);
- boolean isCompact = "pxmp:compact".equals(name);
XMPNode newQual = null;
- if (isCompact)
- {
- if (xmpParent.getOptions().isCompositeProperty())
- {
- throw new XMPException("Only structs and arrays can be compact", BADXMP);
- }
- xmpParent.getOptions().setCompact(true);
- }
- else
- {
- // normalize value of language qualifiers
- newQual = new XMPNode(name, isLang ? Utils.normalizeLangValue(value) : value, null);
- xmpParent.addQualifier(newQual);
- }
+ // normalize value of language qualifiers
+ newQual = new XMPNode(name, isLang ? Utils.normalizeLangValue(value) : value, null);
+ xmpParent.addQualifier(newQual);
return newQual;
}
@@ -1162,20 +1150,7 @@ public class ParseRDF implements XMPError, XMPConst
for (int i = 2; i <= xmpParent.getChildrenLength(); i++)
{
XMPNode qualifier = xmpParent.getChild(i);
-
- if ("pxmp:compact".equals(qualifier.getName()))
- {
- // Compactness is an option bit, not an actual qualifier.
- if (!xmpParent.getOptions().isCompositeProperty())
- {
- throw new XMPException("Only structs and arrays can be compact", BADXMP);
- }
- xmpParent.getOptions().setCompact(true);
- }
- else
- {
- xmpParent.addQualifier(qualifier);
- }
+ xmpParent.addQualifier(qualifier);
}
// Move the options and value last, other checks need the parent's original options.
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/QName.java b/java/XMPCore/src/com/adobe/xmp/impl/QName.java
index 0e9e868..783f792 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/QName.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/QName.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/Utils.java b/java/XMPCore/src/com/adobe/xmp/impl/Utils.java
index 1f4088b..7ca3b27 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/Utils.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/Utils.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPDateTimeImpl.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPDateTimeImpl.java
index ededcd4..f3a17e7 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPDateTimeImpl.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPDateTimeImpl.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPIteratorImpl.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPIteratorImpl.java
index 53ea83e..22ddebb 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPIteratorImpl.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPIteratorImpl.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPMetaImpl.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPMetaImpl.java
index 5f14e74..a97de99 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPMetaImpl.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPMetaImpl.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@@ -23,6 +23,7 @@ import com.adobe.xmp.XMPUtils;
import com.adobe.xmp.impl.xpath.XMPPath;
import com.adobe.xmp.impl.xpath.XMPPathParser;
import com.adobe.xmp.options.IteratorOptions;
+import com.adobe.xmp.options.ParseOptions;
import com.adobe.xmp.options.PropertyOptions;
import com.adobe.xmp.properties.XMPProperty;
@@ -1258,6 +1259,19 @@ public class XMPMetaImpl implements XMPMeta, XMPConst
/**
+ * @see XMPMeta#normalize(ParseOptions)
+ */
+ public void normalize(ParseOptions options) throws XMPException
+ {
+ if (options == null)
+ {
+ options = new ParseOptions();
+ }
+ XMPNormalizer.process(this, options);
+ }
+
+
+ /**
* @return Returns the root node of the XMP tree.
*/
public XMPNode getRoot()
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPMetaParser.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPMetaParser.java
index a09f8cf..40c0ce2 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPMetaParser.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPMetaParser.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@@ -16,6 +16,7 @@ import java.io.Reader;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
+import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -47,8 +48,7 @@ public class XMPMetaParser
private static final Object XMP_RDF = new Object();
/** the DOM Parser Factory, options are set */
private static DocumentBuilderFactory factory = createDocumentBuilderFactory();
-
-
+
/**
* Hidden constructor, initialises the SAX parser handler.
*/
@@ -84,7 +84,16 @@ public class XMPMetaParser
{
XMPMetaImpl xmp = ParseRDF.parse((Node) result[0]);
xmp.setPacketHeader((String) result[2]);
- return XMPNormalizer.process(xmp, options);
+
+ // Check if the XMP object shall be normalized
+ if (!options.getOmitNormalization())
+ {
+ return XMPNormalizer.process(xmp, options);
+ }
+ else
+ {
+ return xmp;
+ }
}
else
{
@@ -181,7 +190,8 @@ public class XMPMetaParser
}
catch (XMPException e)
{
- if (e.getErrorCode() == XMPError.BADXML)
+ if (e.getErrorCode() == XMPError.BADXML ||
+ e.getErrorCode() == XMPError.BADSTREAM)
{
if (options.getAcceptLatin1())
{
@@ -384,7 +394,18 @@ public class XMPMetaParser
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
factory.setIgnoringComments(true);
- factory.setExpandEntityReferences(true);
+
+ try
+ {
+ // honor System parsing limits, e.g.
+ // System.setProperty("entityExpansionLimit", "10");
+ factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
+ }
+ catch (Exception e)
+ {
+ // Ignore IllegalArgumentException and ParserConfigurationException
+ // in case the configured XML-Parser does not implement the feature.
+ }
return factory;
}
} \ No newline at end of file
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPNode.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPNode.java
index 3342514..9170efe 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPNode.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPNode.java
@@ -1,6 +1,6 @@
//=================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPNodeUtils.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPNodeUtils.java
index 1bb5eda..8537469 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPNodeUtils.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPNodeUtils.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPNormalizer.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPNormalizer.java
index 043bc0a..d51d7de 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPNormalizer.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPNormalizer.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPSchemaRegistryImpl.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPSchemaRegistryImpl.java
index 926bedf..1b8430d 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPSchemaRegistryImpl.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPSchemaRegistryImpl.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@@ -295,10 +295,42 @@ public final class XMPSchemaRegistryImpl implements XMPSchemaRegistry, XMPConst
/**
- * @see XMPSchemaRegistry#registerAlias(String, String, String, String,
- * AliasOptions)
+ * Associates an alias name with an actual name.
+ * <p>
+ * Define a alias mapping from one namespace/property to another. Both
+ * property names must be simple names. An alias can be a direct mapping,
+ * where the alias and actual have the same data type. It is also possible
+ * to map a simple alias to an item in an array. This can either be to the
+ * first item in the array, or to the 'x-default' item in an alt-text array.
+ * Multiple alias names may map to the same actual, as long as the forms
+ * match. It is a no-op to reregister an alias in an identical fashion.
+ * Note: This method is not locking because only called by registerStandardAliases
+ * which is only called by the constructor.
+ * Note2: The method is only package-private so that it can be tested with unittests
+ *
+ * @param aliasNS
+ * The namespace URI for the alias. Must not be null or the empty
+ * string.
+ * @param aliasProp
+ * The name of the alias. Must be a simple name, not null or the
+ * empty string and not a general path expression.
+ * @param actualNS
+ * The namespace URI for the actual. Must not be null or the
+ * empty string.
+ * @param actualProp
+ * The name of the actual. Must be a simple name, not null or the
+ * empty string and not a general path expression.
+ * @param aliasForm
+ * Provides options for aliases for simple aliases to array
+ * items. This is needed to know what kind of array to create if
+ * set for the first time via the simple alias. Pass
+ * <code>XMP_NoOptions</code>, the default value, for all
+ * direct aliases regardless of whether the actual data type is
+ * an array or not (see {@link AliasOptions}).
+ * @throws XMPException
+ * for inconsistant aliases.
*/
- public synchronized void registerAlias(String aliasNS, String aliasProp, final String actualNS,
+ synchronized void registerAlias(String aliasNS, String aliasProp, final String actualNS,
final String actualProp, final AliasOptions aliasForm) throws XMPException
{
ParameterAsserts.assertSchemaNS(aliasNS);
@@ -389,17 +421,7 @@ public final class XMPSchemaRegistryImpl implements XMPSchemaRegistry, XMPConst
aliasMap.put(key, aliasInfo);
}
-
- /**
- * @see XMPSchemaRegistry#deleteAlias(String, String)
- */
- public synchronized void deleteAlias(String aliasNS, String aliasProp)
- {
- String aliasPrefix = getNamespacePrefix(aliasNS);
- aliasMap.remove(aliasPrefix + aliasProp);
- }
-
-
+
/**
* @see XMPSchemaRegistry#getAliases()
*/
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerHelper.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerHelper.java
index 9b6c7af..ba43f01 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerHelper.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerHelper.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerRDF.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerRDF.java
index 24cafd3..b00877f 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerRDF.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPSerializerRDF.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@@ -512,8 +512,7 @@ public class XMPSerializerRDF
write('<');
write(elemName);
- boolean isCompact = node.getOptions().isCompact();
- boolean hasGeneralQualifiers = isCompact; // Might also become true later.
+ boolean hasGeneralQualifiers = false;
boolean hasRDFResourceQual = false;
for (Iterator iq = node.iterateQualifier(); iq.hasNext();)
@@ -538,7 +537,7 @@ public class XMPSerializerRDF
// Process the property according to the standard patterns.
if (hasGeneralQualifiers)
{
- serializeCompactRDFGeneralQualifier(indent, node, isCompact);
+ serializeCompactRDFGeneralQualifier(indent, node);
}
else
{
@@ -739,11 +738,10 @@ public class XMPSerializerRDF
* Serializes the general qualifier.
* @param node the root node of the subtree
* @param indent the current indent level
- * @param isCompact flag if qual shall be renderen in compact form.
* @throws IOException Forwards all writer exceptions.
* @throws XMPException If qualifier and element fields are mixed.
*/
- private void serializeCompactRDFGeneralQualifier(int indent, XMPNode node, boolean isCompact)
+ private void serializeCompactRDFGeneralQualifier(int indent, XMPNode node)
throws IOException, XMPException
{
// The node has general qualifiers, ones that can't be
@@ -756,14 +754,6 @@ public class XMPSerializerRDF
serializePrettyRDFProperty(node, true, indent + 1);
- if (isCompact)
- {
- // Emit a "pxmp:compact" fake qualifier.
- writeIndent(1);
- write("<pxmp:compact/>");
- writeNewline();
- }
-
for (Iterator iq = node.iterateQualifier(); iq.hasNext();)
{
XMPNode qualifier = (XMPNode) iq.next();
@@ -980,8 +970,7 @@ public class XMPSerializerRDF
write('<');
write(elemName);
- boolean isCompact = node.getOptions().isCompact();
- boolean hasGeneralQualifiers = isCompact; // Might also become true later.
+ boolean hasGeneralQualifiers = false;
boolean hasRDFResourceQual = false;
for (Iterator it = node.iterateQualifier(); it.hasNext();)
@@ -1025,14 +1014,6 @@ public class XMPSerializerRDF
serializePrettyRDFProperty(node, true, indent + 1);
- if (isCompact)
- {
- // Emit a "pxmp:compact" fake qualifier.
- writeIndent(indent);
- write("<pxmp:compact/>");
- writeNewline();
- }
-
for (Iterator it = node.iterateQualifier(); it.hasNext();)
{
XMPNode qualifier = (XMPNode) it.next();
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/XMPUtilsImpl.java b/java/XMPCore/src/com/adobe/xmp/impl/XMPUtilsImpl.java
index d9b86cd..ab36996 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/XMPUtilsImpl.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/XMPUtilsImpl.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@@ -715,7 +715,7 @@ public class XMPUtilsImpl implements XMPConst
XMPNode sourceItem = (XMPNode) is.next();
boolean match = false;
- for (Iterator id = sourceNode.iterateChildren(); id.hasNext();)
+ for (Iterator id = destNode.iterateChildren(); id.hasNext();)
{
XMPNode destItem = (XMPNode) id.next();
if (itemValuesMatch(sourceItem, destItem))
@@ -803,7 +803,7 @@ public class XMPUtilsImpl implements XMPConst
XMPNode leftItem = (XMPNode) il.next();
boolean match = false;
- for (Iterator ir = leftNode.iterateChildren(); ir.hasNext();)
+ for (Iterator ir = rightNode.iterateChildren(); ir.hasNext();)
{
XMPNode rightItem = (XMPNode) ir.next();
if (itemValuesMatch(leftItem, rightItem))
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPath.java b/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPath.java
index d6979a5..ff810dc 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPath.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPath.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathParser.java b/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathParser.java
index 2f01ad3..9936c06 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathParser.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathParser.java
@@ -1,3 +1,11 @@
+// =================================================================================================
+// ADOBE SYSTEMS INCORPORATED
+// Copyright 2006 Adobe Systems Incorporated
+// All Rights Reserved
+//
+// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
+// of the Adobe license agreement accompanying it.
+// =================================================================================================
package com.adobe.xmp.impl.xpath;
diff --git a/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathSegment.java b/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathSegment.java
index b025170..88b42a1 100644
--- a/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathSegment.java
+++ b/java/XMPCore/src/com/adobe/xmp/impl/xpath/XMPPathSegment.java
@@ -1,6 +1,6 @@
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
-// Copyright 2006-2007 Adobe Systems Incorporated
+// Copyright 2006 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms