C# Class iTextSharp.xmp.impl.XmpNodeUtils

Utilities for XMPNode. @since Aug 28, 2006
Inheritance: XmpConst
Datei anzeigen Open project: nonorganic/dssnet Class Usage Examples

Private Methods

Method Description
AppendLangItem ( XmpNode arrayNode, string itemLang, string itemValue ) : void

Appends a language item to an alt text array.

ChooseLocalizedText ( XmpNode arrayNode, string genericLang, string specificLang ) : object[]

  1. Look for an exact match with the specific language.
  2. If a generic language is given, look for partial matches.
  3. Look for an "x-default"-item.
  4. Choose the first item.

DeleteNode ( XmpNode node ) : void

Deletes the the given node and its children from its parent. Takes care about adjusting the flags.

DetectAltText ( XmpNode arrayNode ) : void

See if an array is an alt-text array. If so, make sure the x-default item is first.

FindChildNode ( XmpNode parent, string childName, bool createNodes ) : XmpNode

Find or create a child node under a given parent node. If the parent node is no Returns the found or created child node.

FindIndexedItem ( XmpNode arrayNode, string segment, bool createNodes ) : int
FindNode ( XmpNode xmpTree, XmpPath xpath, bool createNodes, PropertyOptions leafOptions ) : XmpNode

Follow an expanded path expression to find or create a node.

FindQualifierNode ( XmpNode parent, string qualName, bool createNodes ) : XmpNode

Find or create a qualifier node under a given parent node. Returns a pointer to the qualifier node, and optionally an iterator for the node's position in the parent's vector of qualifiers. The iterator is unchanged if no qualifier node (null) is returned. Note: On entry, the qualName parameter must not have the leading '?' from the XmpPath step.

FindSchemaNode ( XmpNode tree, string namespaceUri, bool createNodes ) : XmpNode

Find or create a schema node if createNodes is false and

FindSchemaNode ( XmpNode tree, string namespaceUri, string suggestedPrefix, bool createNodes ) : XmpNode

Find or create a schema node if createNodes is true.

FollowXPathStep ( XmpNode parentNode, XmpPathSegment nextStep, bool createNodes ) : XmpNode

After processing by ExpandXPath, a step can be of these forms:

  • qualName - A top level property or struct field.
  • [index] - An element of an array.
  • [last()] - The last element of an array.
  • [qualName="value"] - An element in an array of structs, chosen by a field value.
  • [?qualName="value"] - An element in an array, chosen by a qualifier value.
  • ?qualName - A general qualifier.
Find the appropriate child node, resolving aliases, and optionally creating nodes.

LookupFieldSelector ( XmpNode arrayNode, string fieldName, string fieldValue ) : int

Searches for a field selector in a node: [fieldName="value] - an element in an array of structs, chosen by a field value. No implicit nodes are created by field selectors.

LookupLanguageItem ( XmpNode arrayNode, string language ) : int

Looks for the appropriate language item in a text alternative array.item

LookupQualSelector ( XmpNode arrayNode, string qualName, string qualValue, uint aliasForm ) : int

Searches for a qualifier selector in a node: [?qualName="value"] - an element in an array, chosen by a qualifier value. No implicit nodes are created for qualifier selectors, except for an alias to an x-default item.

NormalizeLangArray ( XmpNode arrayNode ) : void

Make sure the x-default item is first. Touch up "single value" arrays that have a default plus one real language. This case should have the same value for both items. Older Adobe apps were hardwired to only use the "x-default" item, so we copy that value to the other item.

SerializeNodeValue ( object value ) : string

Converts the node value to String, apply special conversions for defined types in XMP.

SetNodeValue ( XmpNode node, object value ) : void

This is setting the value of a leaf node.

VerifySetOptions ( PropertyOptions options, object itemValue ) : PropertyOptions

Verifies the PropertyOptions for consistancy and updates them as needed. If options are null they are created with default values.

XmpNodeUtils ( ) : System

Private Constructor