XmpNode Public class
Description
A node in the internally XMP tree, which can be a schema node, a property node, an array node, an array item, a struct node or a qualifier node (without '?').
Possible improvements: 1. The kind Node of node might be better represented by a class-hierarchy of different nodes. 2. The array type should be an enum 3. isImplicitNode should be removed completely and replaced by return values of fi. 4. hasLanguage, hasType should be automatically maintained by XMPNode @since 21.02.2006
Diagram
flowchart LR classDef interfaceStyle stroke-dasharray: 5 5; classDef abstractStyle stroke-width:4px subgraph iTextSharp.xmp.impl iTextSharp.xmp.impl.XmpNode[[XmpNode]] end subgraph System System.IComparable[[IComparable]] System.ICloneable[[ICloneable]] end System.IComparable --> iTextSharp.xmp.impl.XmpNode System.ICloneable --> iTextSharp.xmp.impl.XmpNode
Members
Properties
Public properties
|
Type |
Name |
Methods |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Internal properties
|
Type |
Name |
Methods |
|---|---|---|
|
|
|
|
Methods
Public methods
|
Returns |
Name |
|---|---|
|
|
( |
|
|
(
qualNode)
|
|
|
()
|
|
|
() |
|
|
(
destination)
|
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
( |
|
|
() |
|
|
() |
|
|
() |
|
|
() |
|
|
( |
|
|
()
|
|
|
(
qualNode)
|
|
|
()
|
|
|
(
node)
|
|
|
() |
Protected internal methods
|
Returns |
Name |
|---|---|
|
|
()
|
Details
Summary
A node in the internally XMP tree, which can be a schema node, a property node, an array node, an array item, a struct node or a qualifier node (without '?').
Possible improvements: 1. The kind Node of node might be better represented by a class-hierarchy of different nodes. 2. The array type should be an enum 3. isImplicitNode should be removed completely and replaced by return values of fi. 4. hasLanguage, hasType should be automatically maintained by XMPNode @since 21.02.2006
Inheritance
-
IComparable -
ICloneable
Constructors
XmpNode [1/2]
Source code
public XmpNode(string name, string value, PropertyOptions options)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
name |
the name of the node |
|
|
value |
the value of the node |
|
|
options |
the options of the node |
Summary
Creates an
XMPNode
XmpNode [2/2]
Source code
public XmpNode(string name, PropertyOptions options)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
name |
the name of the node |
|
|
options |
the options of the node |
Summary
Constructor for the node without value.
Methods
Clone
Source code
public virtual object Clone()
CompareTo
Source code
public virtual int CompareTo(object xmpNode)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
xmpNode |
Clear
Source code
public virtual void Clear()
Summary
Resets the node.
GetChild
Source code
public virtual XmpNode GetChild(int index)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
index |
an index [1..size] |
Returns
Returns the child with the requested index.
AddChild [1/2]
Source code
public virtual void AddChild(XmpNode node)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
node |
an XMPNode |
Summary
Adds a node as child to this node.
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
AddChild [2/2]
Source code
public virtual void AddChild(int index, XmpNode node)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
index |
the index of the node before which the new one is inserted. Note: The node children are indexed from [1..size]!
|
|
|
node |
an XMPNode |
Summary
Adds a node as child to this node.
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
ReplaceChild
Source code
public virtual void ReplaceChild(int index, XmpNode node)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
index |
the index of the node that will be replaced. Note: The node children are indexed from [1..size]! |
|
|
node |
the replacement XMPNode |
Summary
Replaces a node with another one.
RemoveChild [1/2]
Source code
public virtual void RemoveChild(int itemIndex)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
itemIndex |
the index to remove [1..size] |
Summary
Removes a child at the requested index.
RemoveChild [2/2]
Source code
public virtual void RemoveChild(XmpNode node)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
node |
the child node to delete. |
Summary
Removes a child node. If its a schema node and doesn't have any children anymore, its deleted.
CleanupChildren
Source code
protected internal virtual void CleanupChildren()
Summary
Removes the children list if this node has no children anymore; checks if the provided node is a schema node and doesn't have any children anymore, its deleted.
RemoveChildren
Source code
public virtual void RemoveChildren()
Summary
Removes all children from the node.
FindChildByName
Source code
public virtual XmpNode FindChildByName(string expr)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
expr |
child node name to look for |
Returns
Returns an
XMPNode
if node has been found,
null
GetQualifier
Source code
public virtual XmpNode GetQualifier(int index)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
index |
an index [1..size] |
Returns
Returns the qualifier with the requested index.
AddQualifier
Source code
public virtual void AddQualifier(XmpNode qualNode)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
qualNode |
a qualifier node. |
Summary
Appends a qualifier to the qualifier list and sets respective options.
Exceptions
|
Name |
Description |
|---|---|
|
XmpException |
RemoveQualifier
Source code
public virtual void RemoveQualifier(XmpNode qualNode)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
qualNode |
qualifier to remove |
Summary
Removes one qualifier node and fixes the options.
RemoveQualifiers
Source code
public virtual void RemoveQualifiers()
Summary
Removes all qualifiers from the node and sets the options appropriate.
FindQualifierByName
Source code
public virtual XmpNode FindQualifierByName(string expr)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
expr |
qualifier node name to look for |
Returns
Returns a qualifier
XMPNode
if node has been found,
null
HasChildren
Source code
public virtual bool HasChildren()
Returns
Returns whether the node has children.
IterateChildren
Source code
public virtual IEnumerator IterateChildren()
Returns
Returns an iterator for the children. Note: take care to use it.remove(), as the flag are not adjusted in that case.
HasQualifier
Source code
public virtual bool HasQualifier()
Returns
Returns whether the node has qualifier attached.
IterateQualifier
Source code
public virtual IEnumerator IterateQualifier()
Returns
Returns an iterator for the qualifier. Note: take care to use it.remove(), as the flag are not adjusted in that case.
CloneSubtree
Source code
public virtual void CloneSubtree(XmpNode destination)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
destination |
the node to add the cloned subtree |
Summary
Performs a deep clone of the complete subtree (children and qualifier )into and add it to the destination node.
DumpNode
Source code
public virtual string DumpNode(bool recursive)
Arguments
|
Type |
Name |
Description |
|---|---|---|
|
|
recursive |
Flag is qualifier and child nodes shall be rendered too |
Summary
Renders this node and the tree unter this node in a human readable form.
Returns
Returns a multiline string containing the dump.
Sort
Source code
public virtual void Sort()
Properties
Parent
public virtual XmpNode Parent { get; set; }
ChildrenLength
public virtual int ChildrenLength { get; }
QualifierLength
public virtual int QualifierLength { get; }
Name
public virtual string Name { get; set; }
Value
public virtual string Value { get; set; }
Options
public virtual PropertyOptions Options { get; set; }
Implicit
public virtual bool Implicit { get; set; }
HasAliases
public virtual bool HasAliases { get; set; }
Alias
public virtual bool Alias { get; set; }
HasValueChild
public virtual bool HasValueChild { get; set; }
Children
internal IList Children { get; }
Summary
Note: This method should always be called when accessing 'children' to be sure that its initialized.
UnmodifiableChildren
public virtual IList UnmodifiableChildren { get; }
Generated with ModularDoc