C# Class iTextSharp.xmp.impl.XmpUtilsImpl

@since 11.08.2006
Inheritance: XmpConst
ファイルを表示 Open project: nonorganic/dssnet

Public Methods

Method Description
AppendProperties ( IXmpMeta source, IXmpMeta destination, bool doAllProperties, bool replaceOldValues, bool deleteEmptyValues ) : void
CatenateArrayItems ( IXmpMeta xmp, string schemaNs, string arrayName, string separator, string quotes, bool allowCommas ) : string
RemoveProperties ( IXmpMeta xmp, string schemaNs, string propName, bool doAllProperties, bool includeAliases ) : void
SeparateArrayItems ( IXmpMeta xmp, string schemaNs, string arrayName, string catedStr, PropertyOptions arrayOptions, bool preserveCommas ) : void

see {@link XMPUtils#separateArrayItems(XMPMeta, String, String, String, PropertyOptions, boolean)}

Private Methods

Method Description
AppendSubtree ( XmpMetaImpl destXmp, XmpNode sourceNode, XmpNode destParent, bool replaceOldValues, bool deleteEmptyValues ) : void
ApplyQuotes ( string item, char openQuote, char closeQuote, bool allowCommas ) : string

Add quotes to the item.

CheckQuotes ( string quotes, char openQuote ) : char

Make sure the open and close quotes are a legitimate pair and return the correct closing quote or an exception.

CheckSeparator ( string separator ) : void

Make sure the separator is OK. It must be one semicolon surrounded by zero or more spaces. Any of the recognized semicolons or spaces are allowed.

ClassifyCharacter ( char ch ) : int

Classifies the character into normal chars, spaces, semicola, quotes, control chars.

GetClosingQuote ( char openQuote ) : char
IsClosingingQuote ( char ch, char openQuote, char closeQuote ) : bool
IsSurroundingQuote ( char ch, char openQuote, char closeQuote ) : bool
ItemValuesMatch ( XmpNode leftNode, XmpNode rightNode ) : bool

Compares two nodes including its children and qualifier.

RemoveSchemaChildren ( XmpNode schemaNode, bool doAllProperties ) : bool

Remove all schema children according to the flag doAllProperties. Empty schemas are automatically remove by XMPNode

SeparateFindCreateArray ( string schemaNs, string arrayName, PropertyOptions arrayOptions, XmpMetaImpl xmp ) : XmpNode

Utility to find or create the array used by separateArrayItems().

XmpUtilsImpl ( ) : System.Collections

Private constructor, as

Method Details

AppendProperties() public static method

Forwards the Exceptions from the metadata processing
public static AppendProperties ( IXmpMeta source, IXmpMeta destination, bool doAllProperties, bool replaceOldValues, bool deleteEmptyValues ) : void
source IXmpMeta The source XMP object.
destination IXmpMeta The destination XMP object.
doAllProperties bool Do internal properties in addition to external properties.
replaceOldValues bool Replace the values of existing properties.
deleteEmptyValues bool Delete destination values if source property is empty.
return void

CatenateArrayItems() public static method

/// Forwards the Exceptions from the metadata processing
public static CatenateArrayItems ( IXmpMeta xmp, string schemaNs, string arrayName, string separator, string quotes, bool allowCommas ) : string
xmp IXmpMeta /// The XMP object containing the array to be catenated.
schemaNs string /// The schema namespace URI for the array. Must not be null or /// the empty string.
arrayName string /// The name of the array. May be a general path expression, must /// not be null or the empty string. Each item in the array must /// be a simple string value.
separator string /// The string to be used to separate the items in the catenated /// string. Defaults to "; ", ASCII semicolon and space /// (U+003B, U+0020).
quotes string /// The characters to be used as quotes around array items that /// contain a separator. Defaults to '"'
allowCommas bool /// Option flag to control the catenation.
return string

RemoveProperties() public static method

If metadata processing fails
public static RemoveProperties ( IXmpMeta xmp, string schemaNs, string propName, bool doAllProperties, bool includeAliases ) : void
xmp IXmpMeta /// The XMP object containing the properties to be removed. ///
schemaNs string /// Optional schema namespace URI for the properties to be /// removed. ///
propName string /// Optional path expression for the property to be removed. ///
doAllProperties bool /// Option flag to control the deletion: do internal properties in /// addition to external properties.
includeAliases bool /// Option flag to control the deletion: Include aliases in the /// "named schema" case above.
return void

SeparateArrayItems() public static method

see {@link XMPUtils#separateArrayItems(XMPMeta, String, String, String, PropertyOptions, boolean)}
/// Forwards the Exceptions from the metadata processing
public static SeparateArrayItems ( IXmpMeta xmp, string schemaNs, string arrayName, string catedStr, PropertyOptions arrayOptions, bool preserveCommas ) : void
xmp IXmpMeta /// The XMP object containing the array to be updated.
schemaNs string /// The schema namespace URI for the array. Must not be null or /// the empty string.
arrayName string /// The name of the array. May be a general path expression, must /// not be null or the empty string. Each item in the array must /// be a simple string value.
catedStr string /// The string to be separated into the array items.
arrayOptions iTextSharp.xmp.options.PropertyOptions /// Option flags to control the separation.
preserveCommas bool /// Flag if commas shall be preserved ///
return void