C# Класс iTextSharp.xmp.impl.XmpNormalizer

@since Aug 18, 2006
Показать файл Открыть проект Примеры использования класса

Приватные методы

Метод Описание
CompareAliasedSubtrees ( XmpNode aliasNode, XmpNode baseNode, bool outerCall ) : void

The outermost call is special. The names almost certainly differ. The qualifiers (and hence options) will differ for an alias to the x-default item of a langAlt array.

DeleteEmptySchemas ( XmpNode tree ) : void

Remove all empty schemas from the metadata tree that were generated during the rdf parsing.

FixGpsTimeStamp ( XmpNode exifSchema ) : void

Fixes the GPS Timestamp in EXIF.

InitDcArrays ( ) : void

Initializes the map that contains the known arrays, that are fixed by NormalizeDcArrays.

MigrateAudioCopyright ( XMPMeta xmp, XmpNode dmCopyright ) : void

The initial support for WAV files mapped a legacy ID3 audio copyright into a new xmpDM:copyright property. This is special case code to migrate that into dc:rights['x-default']. The rules:

 1. If there is no dc:rights array, or an empty array - Create one with dc:rights['x-default'] set from double linefeed and xmpDM:copyright. 2. If there is a dc:rights array but it has no x-default item - Create an x-default item as a copy of the first item then apply rule #3. 3. If there is a dc:rights array with an x-default item,  Look for a double linefeed in the value. A. If no double linefeed, compare the x-default value to the xmpDM:copyright value. A1. If they match then leave the x-default value alone. A2. Otherwise, append a double linefeed and  the xmpDM:copyright value to the x-default value. B. If there is a double linefeed, compare the trailing text to the xmpDM:copyright value. B1. If they match then leave the x-default value alone. B2. Otherwise, replace the trailing x-default text with the xmpDM:copyright value. 4. In all cases, delete the xmpDM:copyright property. 

MoveExplicitAliases ( XmpNode tree, ParseOptions options ) : void

Visit all of the top level nodes looking for aliases. If there is no base, transplant the alias subtree. If there is a base and strict aliasing is on, make sure the alias and base subtrees match.

NormalizeDcArrays ( XmpNode dcSchema ) : void

Undo the denormalization performed by the XMP used in Acrobat 5.
If a Dublin Core array had only one item, it was serialized as a simple property.
The xml:lang attribute was dropped from an alt-text item if the language was x-default.

Process ( XmpMetaImpl xmp, ParseOptions options ) : XMPMeta

Normalizes a raw parsed XMPMeta-Object

RepairAltText ( XmpNode arrayNode ) : void

Make sure that the array is well-formed AltText. Each item must be simple and have an "xml:lang" qualifier. If repairs are needed, keep simple non-empty items by adding the "xml:lang" with value "x-repair".

TouchUpDataModel ( XmpMetaImpl xmp ) : void

Visit all schemas to do general fixes and handle special cases.

TransplantArrayItemAlias ( XmpNode childNode, XmpNode baseArray ) : void

Moves an alias node of array form to another schema into an array

TweakOldXmp ( XmpNode tree ) : void

Tweak old XMP: Move an instance ID from rdf:about to the xmpMM:InstanceID property. An old instance ID usually looks like "uuid:bac965c4-9d87-11d9-9a30-000d936b79c4", plus InDesign 3.0 wrote them like "bac965c4-9d87-11d9-9a30-000d936b79c4". If the name looks like a UUID simply move it to xmpMM:InstanceID, don't worry about any existing xmpMM:InstanceID. Both will only be present when a newer file with the xmpMM:InstanceID property is updated by an old app that uses rdf:about.

XmpNormalizer ( ) : System

init char tables