Package org.apache.xmpbox.type

Examples of org.apache.xmpbox.type.StructuredType.preferedPrefix()


        {
            if (xmpSchema.getNamespace().equals(stPdfaExt.namespace()))
            {
                // ensure the prefix is the preferred one (cannot use other
                // definition)
                if (!xmpSchema.getPrefix().equals(stPdfaExt.preferedPrefix()))
                {
                    throw new XmpParsingException(ErrorType.InvalidPrefix,
                            "Found invalid prefix for PDF/A extension, found '" + xmpSchema.getPrefix()
                                    + "', should be '" + stPdfaExt.preferedPrefix() + "'");
                }
View Full Code Here


                // definition)
                if (!xmpSchema.getPrefix().equals(stPdfaExt.preferedPrefix()))
                {
                    throw new XmpParsingException(ErrorType.InvalidPrefix,
                            "Found invalid prefix for PDF/A extension, found '" + xmpSchema.getPrefix()
                                    + "', should be '" + stPdfaExt.preferedPrefix() + "'");
                }
                // create schema and types
                PDFAExtensionSchema pes = (PDFAExtensionSchema) xmpSchema;
                ArrayProperty sp = pes.getSchemasProperty();
                for (AbstractField af : sp.getAllProperties())
View Full Code Here

        StructuredType stDub = DublinCoreSchema.class.getAnnotation(StructuredType.class);

        // We can't use metadata.getDublinCoreSchema() due to specification of
        // XMPBox (see Javadoc of XMPMetadata)
        Assert.assertEquals(format,
                ((DublinCoreSchema) metadata.getSchema(stDub.preferedPrefix(), stDub.namespace())).getFormat());
        Assert.assertEquals(coverage,
                ((DublinCoreSchema) metadata.getSchema(ownPrefix, stDub.namespace())).getCoverage());

        List<XMPSchema> schems = metadata.getAllSchemas();
        DublinCoreSchema dc;
View Full Code Here

        }

        // According to the PDF/A specification, the prefix must be pdfaid for this schema.
        StructuredType stBasic = XMPBasicSchema.class.getAnnotation(StructuredType.class);
        StructuredType stPdfaIdent = PDFAIdentificationSchema.class.getAnnotation(StructuredType.class);
        if (!id.getPrefix().equals(stPdfaIdent.preferedPrefix()))
        {
            if (metadata.getSchema(stPdfaIdent.preferedPrefix(), stBasic.namespace()) == null)
            {
                ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(),
                        PDFAIdentificationSchema.class.getName()));
View Full Code Here

        // According to the PDF/A specification, the prefix must be pdfaid for this schema.
        StructuredType stBasic = XMPBasicSchema.class.getAnnotation(StructuredType.class);
        StructuredType stPdfaIdent = PDFAIdentificationSchema.class.getAnnotation(StructuredType.class);
        if (!id.getPrefix().equals(stPdfaIdent.preferedPrefix()))
        {
            if (metadata.getSchema(stPdfaIdent.preferedPrefix(), stBasic.namespace()) == null)
            {
                ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(),
                        PDFAIdentificationSchema.class.getName()));
            }
            else
View Full Code Here

        StructuredType stPdfaIdent = PDFAIdentificationSchema.class.getAnnotation(StructuredType.class);
        if (!id.getPrefix().equals(stPdfaIdent.preferedPrefix()))
        {
            if (metadata.getSchema(stPdfaIdent.preferedPrefix(), stBasic.namespace()) == null)
            {
                ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(),
                        PDFAIdentificationSchema.class.getName()));
            }
            else
            {
                id = (PDFAIdentificationSchema) metadata.getSchema(stPdfaIdent.preferedPrefix(),
View Full Code Here

                ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(),
                        PDFAIdentificationSchema.class.getName()));
            }
            else
            {
                id = (PDFAIdentificationSchema) metadata.getSchema(stPdfaIdent.preferedPrefix(),
                        stPdfaIdent.namespace());
            }
        }
        checkConformanceLevel(ve, id.getConformance());
        checkPartNumber(ve, id.getPart());
View Full Code Here

        }

        // According to the PDF/A specification, the prefix must be pdfaid for this schema.
        StructuredType stBasic = XMPBasicSchema.class.getAnnotation(StructuredType.class);
        StructuredType stPdfaIdent = PDFAIdentificationSchema.class.getAnnotation(StructuredType.class);
        if (!id.getPrefix().equals(stPdfaIdent.preferedPrefix()))
        {
            if (metadata.getSchema(stPdfaIdent.preferedPrefix(), stBasic.namespace()) == null)
            {
                ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(),
                        PDFAIdentificationSchema.class.getName()));
View Full Code Here

        // According to the PDF/A specification, the prefix must be pdfaid for this schema.
        StructuredType stBasic = XMPBasicSchema.class.getAnnotation(StructuredType.class);
        StructuredType stPdfaIdent = PDFAIdentificationSchema.class.getAnnotation(StructuredType.class);
        if (!id.getPrefix().equals(stPdfaIdent.preferedPrefix()))
        {
            if (metadata.getSchema(stPdfaIdent.preferedPrefix(), stBasic.namespace()) == null)
            {
                ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(),
                        PDFAIdentificationSchema.class.getName()));
            }
            else
View Full Code Here

        StructuredType stPdfaIdent = PDFAIdentificationSchema.class.getAnnotation(StructuredType.class);
        if (!id.getPrefix().equals(stPdfaIdent.preferedPrefix()))
        {
            if (metadata.getSchema(stPdfaIdent.preferedPrefix(), stBasic.namespace()) == null)
            {
                ve.add(unexpectedPrefixFoundError(id.getPrefix(), stPdfaIdent.preferedPrefix(),
                        PDFAIdentificationSchema.class.getName()));
            }
            else
            {
                id = (PDFAIdentificationSchema) metadata.getSchema(stPdfaIdent.preferedPrefix(),
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.