Class XMPSchemaFactory


  • public class XMPSchemaFactory
    extends java.lang.Object
    A factory for each kind of schemas
    • Field Detail

      • namespace

        private final java.lang.String namespace
      • schemaClass

        private final java.lang.Class<? extends XMPSchema> schemaClass
      • nsName

        private java.lang.String nsName
    • Constructor Detail

      • XMPSchemaFactory

        public XMPSchemaFactory​(java.lang.String namespace,
                                java.lang.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 java.lang.String getNamespace()
        Get namespace URI treated by this factory
        Returns:
        The namespace URI
      • getPropertyType

        public PropertyType getPropertyType​(java.lang.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,
                                         java.lang.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