Package org.apache.xmlgraphics.xmp
Class XMPSchemaRegistry
- java.lang.Object
-
- org.apache.xmlgraphics.xmp.XMPSchemaRegistry
-
public final class XMPSchemaRegistry extends java.lang.ObjectThis class is a registry of XMP schemas. It's implemented as a singleton.
-
-
Field Summary
Fields Modifier and Type Field Description private static XMPSchemaRegistryinstanceprivate java.util.Mapschemas
-
Constructor Summary
Constructors Modifier Constructor Description privateXMPSchemaRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSchema(XMPSchema schema)Adds an XMP schema to the registry.static XMPSchemaRegistrygetInstance()XMPSchemagetSchema(java.lang.String namespace)Returns the XMP schema object for a given namespace.private voidinit()
-
-
-
Field Detail
-
instance
private static XMPSchemaRegistry instance
-
schemas
private java.util.Map schemas
-
-
Method Detail
-
getInstance
public static XMPSchemaRegistry getInstance()
- Returns:
- the singleton instance of the XMP schema registry.
-
init
private void init()
-
addSchema
public void addSchema(XMPSchema schema)
Adds an XMP schema to the registry.- Parameters:
schema- the XMP schema
-
getSchema
public XMPSchema getSchema(java.lang.String namespace)
Returns the XMP schema object for a given namespace.- Parameters:
namespace- the namespace URI- Returns:
- the XMP schema or null if none is available
-
-