Skip to content

Commit b40cbef

Browse files
committed
PDFBOX-5660: rename parameters for clarity
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1930873 13f79535-47bb-0310-9956-ffa450edef68
1 parent d4480ae commit b40cbef

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,35 +245,35 @@ public boolean isDefinedNamespace(String namespace)
245245
/**
246246
* Give type of specified property in specified schema (given by its namespaceURI)
247247
*
248-
* @param name
248+
* @param qName
249249
* the property Qualified Name
250250
* @return Property type declared for namespace specified, null if unknown
251251
* @throws org.apache.xmpbox.type.BadFieldValueException if the name was not found.
252252
*/
253-
public PropertyType getSpecifiedPropertyType(QName name) throws BadFieldValueException
253+
public PropertyType getSpecifiedPropertyType(QName qName) throws BadFieldValueException
254254
{
255-
XMPSchemaFactory factory = getSchemaFactory(name.getNamespaceURI());
255+
XMPSchemaFactory factory = getSchemaFactory(qName.getNamespaceURI());
256256
if (factory != null)
257257
{
258258
// found in schema
259-
return factory.getPropertyType(name.getLocalPart());
259+
return factory.getPropertyType(qName.getLocalPart());
260260
}
261261
else
262262
{
263263
// try in structured
264-
Types st = structuredNamespaces.get(name.getNamespaceURI());
264+
Types st = structuredNamespaces.get(qName.getNamespaceURI());
265265
if (st != null)
266266
{
267267
return createPropertyType(st, Cardinality.Simple);
268268
}
269269
else
270270
{
271271
// try in defined
272-
String dt = definedStructuredNamespaces.get(name.getNamespaceURI());
272+
String dt = definedStructuredNamespaces.get(qName.getNamespaceURI());
273273
if (dt == null)
274274
{
275275
// not found
276-
throw new BadFieldValueException("No descriptor found for " + name);
276+
throw new BadFieldValueException("No descriptor found for " + qName);
277277
}
278278
else
279279
{

xmpbox/src/main/java/org/apache/xmpbox/xml/DomXmpParser.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,29 +1103,29 @@ else if (type.isDefined())
11031103
}
11041104
}
11051105

1106-
private PropertyType checkPropertyDefinition(XMPMetadata xmp, QName prop) throws XmpParsingException
1106+
private PropertyType checkPropertyDefinition(XMPMetadata xmp, QName qName) throws XmpParsingException
11071107
{
11081108
TypeMapping tm = xmp.getTypeMapping();
11091109
// test if namespace is set in xml
1110-
String nsuri = prop.getNamespaceURI();
1110+
String nsuri = qName.getNamespaceURI();
11111111
if (!nsFinder.containsNamespace(nsuri))
11121112
{
11131113
throw new XmpParsingException(ErrorType.NoSchema, "Schema is not set in this document : "
1114-
+ nsuri + ", property: " + prop.getPrefix() + ":" + prop.getLocalPart());
1114+
+ nsuri + ", property: " + qName.getPrefix() + ":" + qName.getLocalPart());
11151115
}
11161116
// test if namespace is defined
11171117
if (!tm.isDefinedNamespace(nsuri))
11181118
{
11191119
throw new XmpParsingException(ErrorType.NoSchema, "Cannot find a definition for the namespace "
1120-
+ nsuri + ", property: " + prop.getPrefix() + ":" + prop.getLocalPart());
1120+
+ nsuri + ", property: " + qName.getPrefix() + ":" + qName.getLocalPart());
11211121
}
11221122
try
11231123
{
1124-
return tm.getSpecifiedPropertyType(prop);
1124+
return tm.getSpecifiedPropertyType(qName);
11251125
}
11261126
catch (BadFieldValueException e)
11271127
{
1128-
throw new XmpParsingException(ErrorType.InvalidType, "Failed to retrieve property definition for " + prop, e);
1128+
throw new XmpParsingException(ErrorType.InvalidType, "Failed to retrieve property definition for " + qName, e);
11291129
}
11301130
}
11311131

0 commit comments

Comments
 (0)