org.apache.xmpbox.schema

## 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 Summary

Constructors
Constructor and Description
`XMPSchemaFactory(String namespace, Class<? extends XMPSchema> schemaClass, PropertiesDescription propDef)` Factory Constructor for basic known schemas

### Method Summary

All Methods Instance Methods Concrete Methods
`XMPSchema` `createXMPSchema(XMPMetadata metadata, String prefix)` Create a schema that corresponding to this factory and add it to metadata
`String` `getNamespace()` Get namespace URI treated by this factory
`PropertiesDescription` `getPropertyDefinition()`
`PropertyType` `getPropertyType(String name)` Get type declared for the name property given

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### 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 Detail

#### 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()