Class XMPSchemaFactory

java.lang.Object
org.apache.xmpbox.schema.XMPSchemaFactory

public class XMPSchemaFactory extends Object
A factory for each kind of schemas
Author:
a183132
  • Constructor Details

    • XMPSchemaFactory

      public XMPSchemaFactory(String namespace, Class<? extends XMPSchema> schemaClass, PropertiesDescription propDef)
      Factory Constructor for basic known schemas
      Parameters:
      namespace - namespace URI to treat
      schemaClass - Class representation associated to this URI
      propDef - Properties Types list associated
  • Method Details

    • getNamespace

      public String getNamespace()
      Get namespace URI treated by this factory
      Returns:
      The namespace URI
    • getPropertyType

      public PropertyType getPropertyType(String name)
      Get type declared for the name property given
      Parameters:
      name - The property name
      Returns:
      null if property name is unknown
    • createXMPSchema

      public XMPSchema createXMPSchema(XMPMetadata metadata, String prefix) throws XmpSchemaException
      Create a schema that corresponding to this factory and add it to metadata
      Parameters:
      metadata - Metadata to attach the Schema created
      prefix - The namespace prefix (optional)
      Returns:
      the schema created and added to metadata
      Throws:
      XmpSchemaException - When Instancing specified Object Schema failed
    • getPropertyDefinition

      public PropertiesDescription getPropertyDefinition()