You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2025/12/26 18:42:25 UTC

svn commit: r1930875 - in pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox: type xml

Author: tilman
Date: Fri Dec 26 18:42:25 2025
New Revision: 1930875

Log:
PDFBOX-5660: rename parameters for clarity

Modified:
   pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java
   pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java

Modified: pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java
==============================================================================
--- pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java	Fri Dec 26 18:42:20 2025	(r1930874)
+++ pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java	Fri Dec 26 18:42:25 2025	(r1930875)
@@ -277,23 +277,23 @@ public final class TypeMapping
     /**
      * Give type of specified property in specified schema (given by its namespaceURI)
      * 
-     * @param name
+     * @param qName
      *            the property Qualified Name
      * @return Property type declared for namespace specified, null if unknown
      * @throws org.apache.xmpbox.type.BadFieldValueException if the name was not found.
      */
-    public PropertyType getSpecifiedPropertyType(QName name) throws BadFieldValueException
+    public PropertyType getSpecifiedPropertyType(QName qName) throws BadFieldValueException
     {
-        XMPSchemaFactory factory = getSchemaFactory(name.getNamespaceURI());
+        XMPSchemaFactory factory = getSchemaFactory(qName.getNamespaceURI());
         if (factory != null)
         {
             // found in schema
-            return factory.getPropertyType(name.getLocalPart());
+            return factory.getPropertyType(qName.getLocalPart());
         }
         else
         {
             // try in structured
-            Types st = structuredNamespaces.get(name.getNamespaceURI());
+            Types st = structuredNamespaces.get(qName.getNamespaceURI());
             if (st != null)
             {
                 return createPropertyType(st, Cardinality.Simple);
@@ -301,11 +301,11 @@ public final class TypeMapping
             else
             {
                 // try in defined
-                String dt = definedStructuredNamespaces.get(name.getNamespaceURI());
+                String dt = definedStructuredNamespaces.get(qName.getNamespaceURI());
                 if (dt == null)
                 {
                     // not found
-                    throw new BadFieldValueException("No descriptor found for " + name);
+                    throw new BadFieldValueException("No descriptor found for " + qName);
                 }
                 else
                 {

Modified: pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java
==============================================================================
--- pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java	Fri Dec 26 18:42:20 2025	(r1930874)
+++ pdfbox/branches/3.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java	Fri Dec 26 18:42:25 2025	(r1930875)
@@ -1103,29 +1103,29 @@ public class DomXmpParser
         }
     }
 
-    private PropertyType checkPropertyDefinition(XMPMetadata xmp, QName prop) throws XmpParsingException
+    private PropertyType checkPropertyDefinition(XMPMetadata xmp, QName qName) throws XmpParsingException
     {
         TypeMapping tm = xmp.getTypeMapping();
         // test if namespace is set in xml
-        String nsuri = prop.getNamespaceURI();
+        String nsuri = qName.getNamespaceURI();
         if (!nsFinder.containsNamespace(nsuri))
         {
             throw new XmpParsingException(ErrorType.NoSchema, "Schema is not set in this document : "
-                    + nsuri + ", property: " + prop.getPrefix() + ":" + prop.getLocalPart());
+                    + nsuri + ", property: " + qName.getPrefix() + ":" + qName.getLocalPart());
         }
         // test if namespace is defined
         if (!tm.isDefinedNamespace(nsuri))
         {
             throw new XmpParsingException(ErrorType.NoSchema, "Cannot find a definition for the namespace "
-                    + nsuri + ", property: " + prop.getPrefix() + ":" + prop.getLocalPart());
+                    + nsuri + ", property: " + qName.getPrefix() + ":" + qName.getLocalPart());
         }
         try
         {
-            return tm.getSpecifiedPropertyType(prop);
+            return tm.getSpecifiedPropertyType(qName);
         }
         catch (BadFieldValueException e)
         {
-            throw new XmpParsingException(ErrorType.InvalidType, "Failed to retrieve property definition for " + prop, e);
+            throw new XmpParsingException(ErrorType.InvalidType, "Failed to retrieve property definition for " + qName, e);
         }
     }