Author: tilman
Date: Fri Dec 26 18:42:20 2025
New Revision: 1930874
Log:
PDFBOX-5660: rename parameters for clarity
Modified:
pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java
pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java
Modified:
pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java
==============================================================================
---
pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java
Fri Dec 26 18:42:16 2025 (r1930873)
+++
pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java
Fri Dec 26 18:42:20 2025 (r1930874)
@@ -318,23 +318,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);
@@ -342,11 +342,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/2.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java
==============================================================================
---
pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java
Fri Dec 26 18:42:16 2025 (r1930873)
+++
pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java
Fri Dec 26 18:42:20 2025 (r1930874)
@@ -1078,29 +1078,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);
}
}