Author: tilman
Date: Sun Dec 28 14:01:28 2025
New Revision: 1930922

Log:
PDFBOX-6133: remove deprecated

Modified:
   pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java

Modified: 
pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java
==============================================================================
--- pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java   
Sun Dec 28 13:54:04 2025        (r1930921)
+++ pdfbox/trunk/xmpbox/src/main/java/org/apache/xmpbox/type/TypeMapping.java   
Sun Dec 28 14:01:28 2025        (r1930922)
@@ -49,7 +49,6 @@ import org.apache.xmpbox.schema.XMPPageT
 import org.apache.xmpbox.schema.XMPRightsManagementSchema;
 import org.apache.xmpbox.schema.XMPSchema;
 import org.apache.xmpbox.schema.XMPSchemaFactory;
-import org.apache.xmpbox.schema.XmpSchemaException;
 
 public final class TypeMapping
 {
@@ -57,15 +56,6 @@ public final class TypeMapping
     // type -> property
     private Map<Types, PropertiesDescription> structuredMappings;
 
-    // ns -> type
-    // filled during init
-    @Deprecated
-    private Map<String, Types> structuredNamespaces;
-
-    // ns -> typeName
-    @Deprecated
-    private Map<String, String> definedStructuredNamespaces;
-
     // ns -> list of property descriptions
     private Map<String, List<PropertiesDescription>> 
definedStructuredNamespaces2;
 
@@ -93,7 +83,6 @@ public final class TypeMapping
     {
         // structured types
         structuredMappings = new EnumMap<>(Types.class);
-        structuredNamespaces = new HashMap<>();
         structuredNamespaces2 = new HashMap<>();
         for (Types type : Types.values())
         {
@@ -104,7 +93,6 @@ public final class TypeMapping
                 StructuredType st = clz.getAnnotation(StructuredType.class);
                 String ns = st.namespace();
                 PropertiesDescription pm = initializePropMapping(clz);
-                structuredNamespaces.put(ns, type);
                 List<Types> list = structuredNamespaces2.get(ns);
                 if (list != null)
                 {
@@ -121,7 +109,6 @@ public final class TypeMapping
         }
 
         // define structured types
-        definedStructuredNamespaces = new HashMap<>();
         definedStructuredMappings = new HashMap<>();
         definedStructuredNamespaces2 = new HashMap<>();
 
@@ -154,17 +141,9 @@ public final class TypeMapping
             list.add(pm);
             definedStructuredNamespaces2.put(ns, list);
         }
-        definedStructuredNamespaces.put(ns, typeName);
         definedStructuredMappings.put(typeName, pm);
     }
 
-    @Deprecated
-    public PropertiesDescription getDefinedDescriptionByNamespace(String 
namespace)
-    {
-        String dt = definedStructuredNamespaces.get(namespace);
-        return definedStructuredMappings.get(dt);
-    }
-
     /**
      * Get a property description based on namespace and field name. Both are 
needed because there
      * can be several property descriptions for one namespace.
@@ -283,37 +262,6 @@ public final class TypeMapping
         return structuredMappings.get(type);
     }
 
-    /**
-     * Return the specialized schema class representation if it's known 
(create and add it to metadata). In other cases,
-     * return null
-     * 
-     * @param metadata
-     *            Metadata to link the new schema
-     * @param namespace
-     *            The namespace URI
-     * @param prefix The namespace prefix
-     * @return Schema representation
-     * @throws XmpSchemaException
-     *             When Instancing specified Object Schema failed
-     *
-     * @deprecated This method will be removed in 4.0. If you need it, let us 
know.
-     */
-    @Deprecated
-    public XMPSchema getAssociatedSchemaObject(XMPMetadata metadata, String 
namespace, String prefix)
-            throws XmpSchemaException
-    {
-        if (schemaMap.containsKey(namespace))
-        {
-            XMPSchemaFactory factory = schemaMap.get(namespace);
-            return factory.createXMPSchema(metadata, prefix);
-        }
-        else
-        {
-            XMPSchemaFactory factory = getSchemaFactory(namespace);
-            return factory != null ? factory.createXMPSchema(metadata, prefix) 
: null;
-        }
-    }
-
     public XMPSchemaFactory getSchemaFactory(String namespace)
     {
         return schemaMap.get(namespace);

Reply via email to