iText 8.0.2 API
iText.Kernel.XMP.Impl.XMPNode Class Reference

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 '?'). More...

Inheritance diagram for iText.Kernel.XMP.Impl.XMPNode:

Public Member Functions

  XMPNode (String name, String value, PropertyOptions options)
  Creates an More...
 
  XMPNode (String name, PropertyOptions options)
  Constructor for the node without value. More...
 
virtual void  Clear ()
  Resets the node. More...
 
virtual iText.Kernel.XMP.Impl.XMPNode  GetParent ()
 
Returns
Returns the parent node.

 
virtual iText.Kernel.XMP.Impl.XMPNode  GetChild (int index)
 
virtual void  AddChild (iText.Kernel.XMP.Impl.XMPNode node)
  Adds a node as child to this node. More...
 
virtual void  AddChild (int index, iText.Kernel.XMP.Impl.XMPNode node)
  Adds a node as child to this node. More...
 
virtual void  ReplaceChild (int index, iText.Kernel.XMP.Impl.XMPNode node)
  Replaces a node with another one. More...
 
virtual void  RemoveChild (int itemIndex)
  Removes a child at the requested index. More...
 
virtual void  RemoveChild (iText.Kernel.XMP.Impl.XMPNode node)
  Removes a child node. More...
 
virtual void  RemoveChildren ()
  Removes all children from the node. More...
 
virtual int  GetChildrenLength ()
 
Returns
Returns the number of children without neccessarily creating a list.

 
virtual iText.Kernel.XMP.Impl.XMPNode  FindChildByName (String expr)
 
virtual iText.Kernel.XMP.Impl.XMPNode  GetQualifier (int index)
 
virtual int  GetQualifierLength ()
 
Returns
Returns the number of qualifier without neccessarily creating a list.

 
virtual void  AddQualifier (iText.Kernel.XMP.Impl.XMPNode qualNode)
  Appends a qualifier to the qualifier list and sets respective options. More...
 
virtual void  RemoveQualifier (iText.Kernel.XMP.Impl.XMPNode qualNode)
  Removes one qualifier node and fixes the options. More...
 
virtual void  RemoveQualifiers ()
  Removes all qualifiers from the node and sets the options appropriate. More...
 
virtual iText.Kernel.XMP.Impl.XMPNode  FindQualifierByName (String expr)
 
virtual bool  HasChildren ()
 
Returns
Returns whether the node has children.

 
virtual IEnumerator  IterateChildren ()
 
virtual bool  HasQualifier ()
 
Returns
Returns whether the node has qualifier attached.

 
virtual IEnumerator  IterateQualifier ()
 
virtual Object  Clone ()
  Performs a deep clone of the node and the complete subtree. More...
 
virtual void  CloneSubtree (iText.Kernel.XMP.Impl.XMPNode destination)
  Performs a deep clone of the complete subtree (children and qualifier )into and add it to the destination node. More...
 
virtual String  DumpNode (bool recursive)
  Renders this node and the tree unter this node in a human readable form. More...
 
virtual int  CompareTo (Object xmpNode)
 
See also
System.IComparable.CompareTo(System.Object)

 
virtual String  GetName ()
 
Returns
Returns the name.

 
virtual void  SetName (String name)
 
Parameters
name The name to set.

 
virtual String  GetValue ()
 
Returns
Returns the value.

 
virtual void  SetValue (String value)
 
Parameters
value The value to set.

 
virtual PropertyOptions  GetOptions ()
 
Returns
Returns the options.

 
virtual void  SetOptions (PropertyOptions options)
  Updates the options of the node. More...
 
virtual bool  IsImplicit ()
 
Returns
Returns the implicit flag

 
virtual void  SetImplicit (bool @implicit)
 
Parameters
implicit Sets the implicit node flag

 
virtual bool  GetHasAliases ()
 
Returns
Returns if the node contains aliases (applies only to schema nodes)

 
virtual void  SetHasAliases (bool hasAliases)
 
Parameters
hasAliases sets the flag that the node contains aliases

 
virtual bool  IsAlias ()
 
Returns
Returns if the node contains aliases (applies only to schema nodes)

 
virtual void  SetAlias (bool alias)
 
Parameters
alias sets the flag that the node is an alias

 
virtual bool  GetHasValueChild ()
 
Returns
the hasValueChild

 
virtual void  SetHasValueChild (bool hasValueChild)
 
Parameters
hasValueChild the hasValueChild to set

 
virtual void  Sort ()
  Sorts the complete datamodel according to the rules. More...
 
virtual IList  GetUnmodifiableChildren ()
 
Returns
Returns a read-only copy of child nodes list.

 

Detailed 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 '?').

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

21.02.2006

Constructor & Destructor Documentation

◆ XMPNode() [1/2]

iText.Kernel.XMP.Impl.XMPNode.XMPNode ( String  name,
String  value,
PropertyOptions  options 
)
inline

Creates an

XMPNode with initial values.

Parameters
name the name of the node
value the value of the node
options the options of the node

◆ XMPNode() [2/2]

iText.Kernel.XMP.Impl.XMPNode.XMPNode ( String  name,
PropertyOptions  options 
)
inline

Constructor for the node without value.

Parameters
name the name of the node
options the options of the node

Member Function Documentation

◆ AddChild() [1/2]

virtual void iText.Kernel.XMP.Impl.XMPNode.AddChild ( int  index,
iText.Kernel.XMP.Impl.XMPNode  node 
)
inlinevirtual

Adds a node as child to this node.

Parameters
index the index of the node before which the new one is inserted. Note: The node children are indexed from [1..size]! An index of size + 1 appends a node.
node an XMPNode

◆ AddChild() [2/2]

virtual void iText.Kernel.XMP.Impl.XMPNode.AddChild ( iText.Kernel.XMP.Impl.XMPNode  node )
inlinevirtual

Adds a node as child to this node.

Parameters
node an XMPNode

◆ AddQualifier()

virtual void iText.Kernel.XMP.Impl.XMPNode.AddQualifier ( iText.Kernel.XMP.Impl.XMPNode  qualNode )
inlinevirtual

Appends a qualifier to the qualifier list and sets respective options.

Parameters
qualNode a qualifier node.

◆ Clear()

virtual void iText.Kernel.XMP.Impl.XMPNode.Clear ( )
inlinevirtual

Resets the node.

◆ Clone()

virtual Object iText.Kernel.XMP.Impl.XMPNode.Clone ( )
inlinevirtual

Performs a deep clone of the node and the complete subtree.

See also
System.Object.Clone()

◆ CloneSubtree()

virtual void iText.Kernel.XMP.Impl.XMPNode.CloneSubtree ( iText.Kernel.XMP.Impl.XMPNode  destination )
inlinevirtual

Performs a deep clone of the complete subtree (children and qualifier )into and add it to the destination node.

Parameters
destination the node to add the cloned subtree

◆ DumpNode()

virtual String iText.Kernel.XMP.Impl.XMPNode.DumpNode ( bool  recursive )
inlinevirtual

Renders this node and the tree unter this node in a human readable form.

Parameters
recursive Flag is qualifier and child nodes shall be rendered too
Returns
Returns a multiline string containing the dump.

◆ FindChildByName()

virtual iText.Kernel.XMP.Impl.XMPNode iText.Kernel.XMP.Impl.XMPNode.FindChildByName ( String  expr )
inlinevirtual
Parameters
expr child node name to look for
Returns
Returns an if node has been found,
null
otherwise.

◆ FindQualifierByName()

virtual iText.Kernel.XMP.Impl.XMPNode iText.Kernel.XMP.Impl.XMPNode.FindQualifierByName ( String  expr )
inlinevirtual
Parameters
expr qualifier node name to look for
Returns
Returns a qualifier if node has been found,
null
otherwise.

◆ GetChild()

virtual iText.Kernel.XMP.Impl.XMPNode iText.Kernel.XMP.Impl.XMPNode.GetChild ( int  index )
inlinevirtual
Parameters
index an index [1..size]
Returns
Returns the child with the requested index.

◆ GetQualifier()

virtual iText.Kernel.XMP.Impl.XMPNode iText.Kernel.XMP.Impl.XMPNode.GetQualifier ( int  index )
inlinevirtual
Parameters
index an index [1..size]
Returns
Returns the qualifier with the requested index.

◆ IterateChildren()

virtual IEnumerator iText.Kernel.XMP.Impl.XMPNode.IterateChildren ( )
inlinevirtual
Returns
Returns an iterator for the children. Note: take care to use it.remove(), as the flag are not adjusted in that case.

◆ IterateQualifier()

virtual IEnumerator iText.Kernel.XMP.Impl.XMPNode.IterateQualifier ( )
inlinevirtual
Returns
Returns an iterator for the qualifier. Note: take care to use it.remove(), as the flag are not adjusted in that case.

◆ RemoveChild() [1/2]

virtual void iText.Kernel.XMP.Impl.XMPNode.RemoveChild ( int  itemIndex )
inlinevirtual

Removes a child at the requested index.

Parameters
itemIndex the index to remove [1..size]

◆ RemoveChild() [2/2]

virtual void iText.Kernel.XMP.Impl.XMPNode.RemoveChild ( iText.Kernel.XMP.Impl.XMPNode  node )
inlinevirtual

Removes a child node.

Removes a child node. If its a schema node and doesn't have any children anymore, its deleted.

Parameters
node the child node to delete.

◆ RemoveChildren()

virtual void iText.Kernel.XMP.Impl.XMPNode.RemoveChildren ( )
inlinevirtual

Removes all children from the node.

◆ RemoveQualifier()

virtual void iText.Kernel.XMP.Impl.XMPNode.RemoveQualifier ( iText.Kernel.XMP.Impl.XMPNode  qualNode )
inlinevirtual

Removes one qualifier node and fixes the options.

Parameters
qualNode qualifier to remove

◆ RemoveQualifiers()

virtual void iText.Kernel.XMP.Impl.XMPNode.RemoveQualifiers ( )
inlinevirtual

Removes all qualifiers from the node and sets the options appropriate.

◆ ReplaceChild()

virtual void iText.Kernel.XMP.Impl.XMPNode.ReplaceChild ( int  index,
iText.Kernel.XMP.Impl.XMPNode  node 
)
inlinevirtual

Replaces a node with another one.

Parameters
index the index of the node that will be replaced. Note: The node children are indexed from [1..size]!
node the replacement XMPNode

◆ SetOptions()

virtual void iText.Kernel.XMP.Impl.XMPNode.SetOptions ( PropertyOptions  options )
inlinevirtual

Updates the options of the node.

Parameters
options the options to set.

◆ Sort()

virtual void iText.Kernel.XMP.Impl.XMPNode.Sort ( )
inlinevirtual

Sorts the complete datamodel according to the rules.

Sorts the complete datamodel according to the following rules:

  • Nodes at one level are sorted by name, that is prefix + local name
  • Starting at the root node the children and qualifier are sorted recursively, which the following exceptions.
  • Sorting will not be used for arrays.
  • Within qualifier "xml:lang" and/or "rdf:type" stay at the top in that order, all others are sorted.
iText.Kernel.XMP.Impl.XMPNode.XMPNode
XMPNode(String name, String value, PropertyOptions options)
Creates an
Definition: XMPNode.cs:92