public void addNewNameSpace(String ns, String prefered) { PropertiesDescription mapping = new PropertiesDescription(); schemaMap.put(ns, new XMPSchemaFactory(ns, XMPSchema.class, mapping)); }
/** * Return the specialized schema class representation if it's known (create and add it to metadata). In other cases, * return null * * @param metadata * Metadata to link the new schema * @param namespace * The namespace URI * @param prefix The namespace prefix * @return Schema representation * @throws XmpSchemaException * When Instancing specified Object Schema failed */ public XMPSchema getAssociatedSchemaObject(XMPMetadata metadata, String namespace, String prefix) throws XmpSchemaException { if (schemaMap.containsKey(namespace)) { XMPSchemaFactory factory = schemaMap.get(namespace); return factory.createXMPSchema(metadata, prefix); } else { XMPSchemaFactory factory = getSchemaFactory(namespace); return factory != null ? factory.createXMPSchema(metadata, prefix) : null; } }
return factory.getPropertyType(name.getLocalPart());
|| pt.type() == Types.DefinedType) xsf.getPropertyDefinition().addNewProperty(pname, pt);
|| pt.type() == Types.DefinedType) xsf.getPropertyDefinition().addNewProperty(pname, pt);
if (schema == null && tm.getSchemaFactory(namespace) != null) schema = tm.getSchemaFactory(namespace).createXMPSchema(xmp, attr.getPrefix()); loadAttributes(schema, description);
private void addNameSpace(Class<? extends XMPSchema> classSchem) { StructuredType st = classSchem.getAnnotation(StructuredType.class); String ns = st.namespace(); schemaMap.put(ns, new XMPSchemaFactory(ns, classSchem, initializePropMapping(classSchem))); }
|| pt.type() == Types.DefinedType) xsf.getPropertyDefinition().addNewProperty(pname, pt);
return factory.getPropertyType(name.getLocalPart());
private void parseChildrenAsProperties(XMPMetadata xmp, List<Element> properties, TypeMapping tm, Element description) throws XmpParsingException, XmpSchemaException { // parse children elements as properties for (Element property : properties) { String namespace = property.getNamespaceURI(); PropertyType type = checkPropertyDefinition(xmp, DomHelper.getQName(property)); // create the container if (!tm.isDefinedSchema(namespace)) { throw new XmpParsingException(ErrorType.NoSchema, "This namespace is not a schema or a structured type : " + namespace); } XMPSchema schema = xmp.getSchema(namespace); if (schema == null) { schema = tm.getSchemaFactory(namespace).createXMPSchema(xmp, property.getPrefix()); loadAttributes(schema, description); } ComplexPropertyContainer container = schema.getContainer(); // create property createProperty(xmp, property, type, container); } }
public void addNewNameSpace(String ns, String prefered) { PropertiesDescription mapping = new PropertiesDescription(); schemaMap.put(ns, new XMPSchemaFactory(ns, XMPSchema.class, mapping)); }
return factory.getPropertyType(name.getLocalPart());
/** * Return the specialized schema class representation if it's known (create and add it to metadata). In other cases, * return null * * @param metadata * Metadata to link the new schema * @param namespace * The namespace URI * @param prefix The namespace prefix * @return Schema representation * @throws XmpSchemaException * When Instancing specified Object Schema failed */ public XMPSchema getAssociatedSchemaObject(XMPMetadata metadata, String namespace, String prefix) throws XmpSchemaException { if (schemaMap.containsKey(namespace)) { XMPSchemaFactory factory = schemaMap.get(namespace); return factory.createXMPSchema(metadata, prefix); } else { XMPSchemaFactory factory = getSchemaFactory(namespace); return factory != null ? factory.createXMPSchema(metadata, prefix) : null; } }
public void addNewNameSpace(String ns, String prefered) { PropertiesDescription mapping = new PropertiesDescription(); schemaMap.put(ns, new XMPSchemaFactory(ns, XMPSchema.class, mapping)); }
/** * Return the specialized schema class representation if it's known (create and add it to metadata). In other cases, * return null * * @param metadata * Metadata to link the new schema * @param namespace * The namespace URI * @param prefix The namespace prefix * @return Schema representation * @throws XmpSchemaException * When Instancing specified Object Schema failed */ public XMPSchema getAssociatedSchemaObject(XMPMetadata metadata, String namespace, String prefix) throws XmpSchemaException { if (schemaMap.containsKey(namespace)) { XMPSchemaFactory factory = schemaMap.get(namespace); return factory.createXMPSchema(metadata, prefix); } else { XMPSchemaFactory factory = getSchemaFactory(namespace); return factory != null ? factory.createXMPSchema(metadata, prefix) : null; } }
private void addNameSpace(Class<? extends XMPSchema> classSchem) { StructuredType st = classSchem.getAnnotation(StructuredType.class); String ns = st.namespace(); schemaMap.put(ns, new XMPSchemaFactory(ns, classSchem, initializePropMapping(classSchem))); }
if (schema == null && tm.getSchemaFactory(namespace) != null) schema = tm.getSchemaFactory(namespace).createXMPSchema(xmp, attr.getPrefix()); loadAttributes(schema, description);
private void addNameSpace(Class<? extends XMPSchema> classSchem) { StructuredType st = classSchem.getAnnotation(StructuredType.class); String ns = st.namespace(); schemaMap.put(ns, new XMPSchemaFactory(ns, classSchem, initializePropMapping(classSchem))); }
if (schema == null && tm.getSchemaFactory(namespace) != null) schema = tm.getSchemaFactory(namespace).createXMPSchema(xmp, attr.getPrefix()); loadAttributes(schema, description);
private void parseChildrenAsProperties(XMPMetadata xmp, List<Element> properties, TypeMapping tm, Element description) throws XmpParsingException, XmpSchemaException { // parse children elements as properties for (Element property : properties) { String namespace = property.getNamespaceURI(); PropertyType type = checkPropertyDefinition(xmp, DomHelper.getQName(property)); // create the container if (!tm.isDefinedSchema(namespace)) { throw new XmpParsingException(ErrorType.NoSchema, "This namespace is not a schema or a structured type : " + namespace); } XMPSchema schema = xmp.getSchema(namespace); if (schema == null) { schema = tm.getSchemaFactory(namespace).createXMPSchema(xmp, property.getPrefix()); loadAttributes(schema, description); } ComplexPropertyContainer container = schema.getContainer(); // create property createProperty(xmp, property, type, container); } }