Package org.apache.xmpbox.schema
Class XMPSchemaFactory
java.lang.Object
org.apache.xmpbox.schema.XMPSchemaFactory
A factory for each kind of schemas
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private String
private final PropertiesDescription
-
Constructor Summary
ConstructorsConstructorDescriptionXMPSchemaFactory
(String namespace, Class<? extends XMPSchema> schemaClass, PropertiesDescription propDef) Factory Constructor for basic known schemas -
Method Summary
Modifier and TypeMethodDescriptioncreateXMPSchema
(XMPMetadata metadata, String prefix) Create a schema that corresponding to this factory and add it to metadataGet namespace URI treated by this factorygetPropertyType
(String name) Get type declared for the name property given
-
Field Details
-
namespace
-
schemaClass
-
propDef
-
nsName
-
-
Constructor Details
-
XMPSchemaFactory
public XMPSchemaFactory(String namespace, Class<? extends XMPSchema> schemaClass, PropertiesDescription propDef) Factory Constructor for basic known schemas- Parameters:
namespace
- namespace URI to treatschemaClass
- Class representation associated to this URIpropDef
- Properties Types list associated
-
-
Method Details
-
getNamespace
Get namespace URI treated by this factory- Returns:
- The namespace URI
-
getPropertyType
Get type declared for the name property given- Parameters:
name
- The property name- Returns:
- null if property name is unknown
-
createXMPSchema
Create a schema that corresponding to this factory and add it to metadata- Parameters:
metadata
- Metadata to attach the Schema createdprefix
- The namespace prefix (optional)- Returns:
- the schema created and added to metadata
- Throws:
XmpSchemaException
- When Instancing specified Object Schema failed
-
getPropertyDefinition
-