XmpUtils Public class
Description
Utility methods for XMP. I included only those that are different from the Java default conversion utilities.
@since 21.02.2006
Diagram
flowchart LR classDef interfaceStyle stroke-dasharray: 5 5; classDef abstractStyle stroke-width:4px subgraph iTextSharp.xmp iTextSharp.xmp.XmpUtils[[XmpUtils]] end
Members
Methods
Public Static methods
|
Returns |
Name |
|---|---|
|
|
( |
|
|
(
xmp, |
|
|
( |
|
|
(
value)
|
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
(
xmp, |
|
|
(
xmp,
arrayOptions, |
Details
Summary
Utility methods for XMP. I included only those that are different from the Java default conversion utilities.
@since 21.02.2006
Methods
CatenateArrayItems
Source code
public static string CatenateArrayItems(IXmpMeta xmp, string schemaNs, string arrayName, string separator, string quotes, bool allowCommas)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
xmp |
The XMP object containing the array to be catenated. |
|
|
schemaNs |
The schema namespace URI for the array. Must not be null or
|
|
|
arrayName |
The name of the array. May be a general path expression, must
|
|
|
separator |
The string to be used to separate the items in the catenated
|
|
|
quotes |
The characters to be used as quotes around array items that
|
|
|
allowCommas |
Option flag to control the catenation. |
Summary
Create a single edit string from an array of strings.
Returns
Returns the string containing the catenated array items.
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
Forwards the Exceptions from the metadata processing |
SeparateArrayItems
Source code
public static void SeparateArrayItems(IXmpMeta xmp, string schemaNs, string arrayName, string catedStr, PropertyOptions arrayOptions, bool preserveCommas)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
xmp |
The XMP object containing the array to be updated. |
|
|
schemaNs |
The schema namespace URI for the array. Must not be null or
|
|
|
arrayName |
The name of the array. May be a general path expression, must
|
|
|
catedStr |
The string to be separated into the array items. |
|
|
arrayOptions |
Option flags to control the separation. |
|
|
preserveCommas |
Flag if commas shall be preserved |
Summary
Separate a single edit string into an array of strings.
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
Forwards the Exceptions from the metadata processing |
RemoveProperties
Source code
public static void RemoveProperties(IXmpMeta xmp, string schemaNs, string propName, bool doAllProperties, bool includeAliases)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
xmp |
|
|
|
schemaNs |
|
|
|
propName |
|
|
|
doAllProperties |
|
|
|
includeAliases |
AppendProperties [1/2]
Source code
public static void AppendProperties(IXmpMeta source, IXmpMeta dest, bool doAllProperties, bool replaceOldValues)
Arguments
Summary
Alias without the new option
deleteEmptyValues
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
Forwards the Exceptions from the metadata processing |
AppendProperties [2/2]
Source code
public static void AppendProperties(IXmpMeta source, IXmpMeta dest, bool doAllProperties, bool replaceOldValues, bool deleteEmptyValues)
Arguments
ConvertToBoolean
Source code
public static bool ConvertToBoolean(string value)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
value |
ConvertFromBoolean
Source code
public static string ConvertFromBoolean(bool value)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
value |
a boolean value |
Summary
Convert from boolean to string.
Returns
The XMP string representation of the boolean. The values used are given by the constnts and .
ConvertToInteger
Source code
public static int ConvertToInteger(string rawValue)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
rawValue |
the string value |
Summary
Converts a string value to an
int
Returns
Returns an int.
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
If the ... |
ConvertFromInteger
Source code
public static string ConvertFromInteger(int value)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
value |
an int value |
Summary
Convert from int to string.
Returns
The string representation of the int.
ConvertToLong
Source code
public static long ConvertToLong(string rawValue)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
rawValue |
the string value |
Summary
Converts a string value to a
long
Returns
Returns a long.
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
If the ... |
ConvertFromLong
Source code
public static string ConvertFromLong(long value)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
value |
a long value |
Summary
Convert from long to string.
Returns
The string representation of the long.
ConvertToDouble
Source code
public static double ConvertToDouble(string rawValue)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
rawValue |
the string value |
Summary
Converts a string value to a
double
Returns
Returns a double.
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
If the ... |
ConvertFromDouble
Source code
public static string ConvertFromDouble(double value)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
value |
a long value |
Summary
Convert from long to string.
Returns
The string representation of the long.
ConvertToDate
Source code
public static IXmpDateTime ConvertToDate(string rawValue)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
rawValue |
the string value |
Summary
Converts a string value to an
XMPDateTime
Returns
Returns an
XMPDateTime
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
If the ... |
ConvertFromDate
Source code
public static string ConvertFromDate(IXmpDateTime value)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
value |
an ... |
Summary
Convert from
XMPDateTime
Returns
The string representation of the long.
EncodeBase64
Source code
public static string EncodeBase64(byte[] buffer)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
buffer |
the byte array to be converted |
Summary
Convert from a byte array to a base64 encoded string.
Returns
Returns the base64 string.
DecodeBase64
Source code
public static byte DecodeBase64(string base64String)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
base64String |
a base64 encoded string |
Summary
Decode from Base64 encoded string to raw data.
Returns
Returns a byte array containg the decoded string.
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
Thrown if the given string is not property base64 encoded |
Generated with ModularDoc