package org.verapdf.model.xmplayer;

import org.verapdf.model.baselayer.Object;
import java.util.List;

% Parent type for all xmp objects
type XMPObject extends Object {
	
}

% XMP package
type XMPPackage extends XMPObject {
    % collection of all used schemas
    link Schemas: XMPSchema*;
    % true if metadata is valid
    property isMetadataValid: Boolean;
    % bytes attribute in header, null if it is not present
    property bytes: String;
    % encoding attribute in header, null if it is not present
    property encoding: String;
}

% Main XMP package
type XMPMainPackage extends XMPPackage {
    % true if pdfaid schema (NSURI: http://www.aiim.org/pdfa/ns/id/) is present
    property ispdfaidNSPresent: Boolean;
}

% XMP schema
type XMPSchema extends XMPObject {
    % schema's namespace URI
    property uri: String;
    % schema's prefix
    property prefix: String;
}

% XMP Predefined Schema
type XMPPredefinedSchema extends XMPSchema {
    % unknown properties names
    property unknownProperties: String;
    % wrong value types properties
    property wrongValueTypeProperties: String;
}

% XMP custom schema
type XMPCustomSchema extends XMPSchema {
    % true if custom schema definition complies PDF/A
    property isDefinitionCorrect: Boolean;
    % true if this custom schema defined in this xmp package
    property isDefinedInThisPackage: Boolean;
}

% Following two schemas have required prefix

% PDF/A Identification Schema (NSURI: http://www.aiim.org/pdfa/ns/id/, required prefix: pdfaid)
type PDFAIdSchema extends XMPPredefinedSchema {
    % property part of pdfaid schema
    property part: Integer;
    % property conformance of pdfaid schema
    property conformance: String;
    % property amd of pdfaid schema
    property amd: String;
    % property corr of pdfaid schema
    property corr: String;
}

% PDF/A Extension Schema Container Schema (NSURI: http://www.aiim.org/pdfa/ns/extension/, required prefix: pdfaExtension)
type PDFAExtensionSchema extends XMPPredefinedSchema {
    % true if all properties corresponding to PDF/A Field Type Schema (NSURI: http://www.aiim.org/pdfa/ns/field#, required prefix: pdfaField) have required prefix
    property isPDFAFieldPrefixCorrect: Boolean;
    % true if all properties corresponding to PDF/A Property Value Type (NSURI: http://www.aiim.org/pdfa/ns/property#, required prefix: pdfaProperty) have required prefix
    property isPDFAPropertyPrefixCorrect: Boolean;
    % true if all properties corresponding to PDF/A Schema Value Type (NSURI: http://www.aiim.org/pdfa/ns/schema#, required prefix: pdfaSchema) have required prefix
    property isPDFASchemaPrefixCorrect: Boolean;
    % true if all properties corresponding to PDF/A ValueType Value Type (NSURI: http://www.aiim.org/pdfa/ns/type#, required prefix: pdfaType) have required prefix
    property isPDFATypePrefixCorrect: Boolean;
}

% Following six schemas have false friends properties for PDF/A-1. Types of this schemas contains only false friends properties.

% XMP Basic Schema (NSURI: http://ns.adobe.com/xap/1.0/, preferred prefix: xmp)
type XMPBasicSchema extends XMPPredefinedSchema {
    % property Author of xmp basic schema
    property author: String;
    % property Description of xmp basic schema
    property description: String;
    % property Label of xmp basic schema
    property label: String;
    % property Rating of xmp basic schema
    property rating: Integer;
    % property Title of xmp basic schema
    property title: String;
}

% XMP Rights Management Schema (NSURI: http://ns.adobe.com/xap/1.0/rights/, preferred prefix: xmpRights)
type XMPRightsSchema extends XMPPredefinedSchema {
    % property Copyright of xmp rights management schema
    property copyright: String;
}

% XMP Media Management Schema (NSURI: http://ns.adobe.com/xap/1.0/mm/, preferred prefix: xmpMM)
type XMPMMSchema extends XMPPredefinedSchema {
    % property Manifest of xmp media management schema
    property manifest: String;
}

% XMP Paged-Text Schema (NSURI: http://ns.adobe.com/xap/1.0/t/pg/, preferred prefix: XMPTPg)
type XMPTPgSchema extends XMPPredefinedSchema {
    % property Colorants of xmp paged-text schema
    property colorants: String;
    % property Fonts of xmp paged-text schema
    property fonts: String;
    % property PlateNames of xmp paged-text schema
    property plateNames: String;
}

% Adobe PDF Schema (NSURI: http://ns.adobe.com/pdf/1.3/, preferred prefix: pdf)
type PDFSchema extends XMPPredefinedSchema {
    % property Author of adobe pdf schema
    property author: String;
    % property BaseURL of adobe pdf schema
    property baseURL: String;
    % property CreationDate of adobe pdf schema
    property creationDate: String;
    % property Creator of adobe pdf schema
    property creator: String;
    % property ModDate of adobe pdf schema
    property modDate: String;
    % property Subject of adobe pdf schema
    property subject: String;
    % property Title of adobe pdf schema
    property title: String;
    % property Trapped of adobe pdf schema
    property trapped: String;

}

% Photoshop Schema (NSURI: http://ns.adobe.com/photoshop/1.0/, preferred prefix: photoshop)
type PhotoshopSchema extends XMPPredefinedSchema {
    % property Author of photoshop schema
    property author: String;
    % property Copyright of photoshop schema
    property copyright: String;
    % property History of photoshop schema
    property history: String;
    % property Title of photoshop schema
    property title: String;

}

% Following eight schemas are false friends for PDF/A-1

% Camera Raw Schema (NSURI: http://ns.adobe.com/camera-rawsettings/1.0/, preferred prefix: crs)
type CRSSchema extends XMPPredefinedSchema {

}

% EXIF Schema for Additional EXIF Preperties (NSURI: http://ns.adobe.com/exif/1.0/aux/, preferred prefix: aux)
type AUXSchema extends XMPPredefinedSchema {

}

% XMP Dynamic Media Schema (NSURI: http://ns.adobe.com/xmp/1.0/DynamicMedia/, preferred prefix: xmpDM)
type XMPDMSchema extends XMPPredefinedSchema {

}

% XMP Support Schema Schema (NSURI: http://ns.adobe.com/xap/1.0/s/, preferred prefix: xapS)
type XAPSSchema extends XMPPredefinedSchema {

}