Package org.apache.xmpbox.type

Examples of org.apache.xmpbox.type.PropertyType.type()


                                    throw new XmpParsingException(ErrorType.RequiredProperty,
                                            "Missing field in property definition");
                                }
                                // check ptype existance
                                PropertyType pt = transformValueType(tm, ptype);
                                if (pt.type() == null)
                                {
                                    throw new XmpParsingException(ErrorType.NoValueType, "Type not defined : " + ptype);
                                }
                                else if (pt.type().isSimple() || pt.type().isStructured()
                                        || pt.type() == Types.DefinedType)
View Full Code Here


                                PropertyType pt = transformValueType(tm, ptype);
                                if (pt.type() == null)
                                {
                                    throw new XmpParsingException(ErrorType.NoValueType, "Type not defined : " + ptype);
                                }
                                else if (pt.type().isSimple() || pt.type().isStructured()
                                        || pt.type() == Types.DefinedType)
                                {
                                    xsf.getPropertyDefinition().addNewProperty(pname, pt);
                                }
                                else
View Full Code Here

                                PropertyType pt = transformValueType(tm, ptype);
                                if (pt.type() == null)
                                {
                                    throw new XmpParsingException(ErrorType.NoValueType, "Type not defined : " + ptype);
                                }
                                else if (pt.type().isSimple() || pt.type().isStructured()
                                        || pt.type() == Types.DefinedType)
                                {
                                    xsf.getPropertyDefinition().addNewProperty(pname, pt);
                                }
                                else
View Full Code Here

                                if (pt.type() == null)
                                {
                                    throw new XmpParsingException(ErrorType.NoValueType, "Type not defined : " + ptype);
                                }
                                else if (pt.type().isSimple() || pt.type().isStructured()
                                        || pt.type() == Types.DefinedType)
                                {
                                    xsf.getPropertyDefinition().addNewProperty(pname, pt);
                                }
                                else
                                {
View Full Code Here

                        }
                                          
                        try
                        {
                            AbstractSimpleProperty sp = tm.instanciateSimpleProperty(namespace, schema.getPrefix(),
                                    attr.getLocalName(), attr.getValue(), type.type());
                            container.addProperty(sp);
                        }
                        catch( IllegalArgumentException exception)
                        {
                            //Swallow, and continue adding additional properties
View Full Code Here

            return null;
        }
        // Instantiate abstract structured type with hint from first element
        Element first = elements.get(0);
        PropertyType ctype = checkPropertyDefinition(xmp, DomHelper.getQName(first));
        Types tt = ctype.type();
        AbstractStructuredType ast = instanciateStructured(tm, tt, descriptor.getLocalPart(), first.getNamespaceURI());

        ast.setNamespace(descriptor.getNamespaceURI());
        ast.setPrefix(descriptor.getPrefix());
View Full Code Here

                    {
                        array.addProperty(ast2);
                    }
                }
            }
            else if (type.type().isSimple())
            {
                AbstractSimpleProperty sp = tm.instanciateSimpleProperty(namespace, prefix, name,
                        element.getTextContent(), type.type());
                loadAttributes(sp, element);
                ast.getContainer().addProperty(sp);
View Full Code Here

                }
            }
            else if (type.type().isSimple())
            {
                AbstractSimpleProperty sp = tm.instanciateSimpleProperty(namespace, prefix, name,
                        element.getTextContent(), type.type());
                loadAttributes(sp, element);
                ast.getContainer().addProperty(sp);
            }
            else if (type.type().isStructured())
            {
View Full Code Here

                AbstractSimpleProperty sp = tm.instanciateSimpleProperty(namespace, prefix, name,
                        element.getTextContent(), type.type());
                loadAttributes(sp, element);
                ast.getContainer().addProperty(sp);
            }
            else if (type.type().isStructured())
            {
                // create a new structured type
                AbstractStructuredType inner = instanciateStructured(tm, type.type(), name, null);
                inner.setNamespace(namespace);
                inner.setPrefix(prefix);
View Full Code Here

                ast.getContainer().addProperty(sp);
            }
            else if (type.type().isStructured())
            {
                // create a new structured type
                AbstractStructuredType inner = instanciateStructured(tm, type.type(), name, null);
                inner.setNamespace(namespace);
                inner.setPrefix(prefix);
                ast.getContainer().addProperty(inner);
                ComplexPropertyContainer cpc = inner.getContainer();
                if (DomHelper.isParseTypeResource(element))
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.