iText 8.0.5 API
iText.Kernel.Pdf.Tagging.PdfNamespace Class Reference

A wrapper for namespace dictionaries (ISO 32000-2 section 14.7.4). More...

Inheritance diagram for iText.Kernel.Pdf.Tagging.PdfNamespace:
iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >

Public Member Functions

  PdfNamespace (PdfDictionary dictionary)
  Constructs namespace from the given iText.Kernel.Pdf.PdfDictionary that represents namespace dictionary. More...
 
  PdfNamespace (String namespaceName)
  Constructs a namespace defined by the given namespace name. More...
 
  PdfNamespace (PdfString namespaceName)
  Constructs a namespace defined by the given namespace name. More...
 
virtual iText.Kernel.Pdf.Tagging.PdfNamespace  SetNamespaceName (String namespaceName)
  Sets the string defining the namespace name. More...
 
virtual iText.Kernel.Pdf.Tagging.PdfNamespace  SetNamespaceName (PdfString namespaceName)
  Sets the string defining the namespace name. More...
 
virtual String  GetNamespaceName ()
  Gets the string defining the namespace name. More...
 
virtual iText.Kernel.Pdf.Tagging.PdfNamespace  SetSchema (PdfFileSpec fileSpec)
  Sets file specification identifying the schema file, which defines this namespace. More...
 
virtual PdfFileSpec  GetSchema ()
  Gets file specification identifying the schema file, which defines this namespace. More...
 
virtual iText.Kernel.Pdf.Tagging.PdfNamespace  SetNamespaceRoleMap (PdfDictionary roleMapNs)
  A dictionary that maps the names of structure types used in the namespace to their approximate equivalents in another namespace. More...
 
virtual PdfDictionary  GetNamespaceRoleMap ()
  A dictionary that maps the names of structure types used in the namespace to their approximate equivalents in another namespace. More...
 
virtual iText.Kernel.Pdf.Tagging.PdfNamespace  AddNamespaceRoleMapping (String thisNsRole, String defaultNsRole)
  Adds to the namespace role map (see SetNamespaceRoleMap(iText.Kernel.Pdf.PdfDictionary) ) a single role mapping to the default standard structure namespace. More...
 
virtual iText.Kernel.Pdf.Tagging.PdfNamespace  AddNamespaceRoleMapping (String thisNsRole, String targetNsRole, iText.Kernel.Pdf.Tagging.PdfNamespace targetNs)
  Adds to the namespace role map (see SetNamespaceRoleMap(iText.Kernel.Pdf.PdfDictionary) ) a single role mapping to the target namespace. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual void  Flush ()
 
virtual bool  IsFlushed ()
 

Package Functions

override bool  IsWrappedObjectMustBeIndirect ()
  Defines if the object behind this wrapper must be an indirect object in the resultant document. More...
 
- Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >
  PdfObjectWrapper (T pdfObject)
 
virtual void  SetPdfObject (T pdfObject)
 
virtual void  SetForbidRelease ()
 
virtual void  UnsetForbidRelease ()
 
virtual void  EnsureUnderlyingObjectHasIndirectReference ()
 

Additional Inherited Members

- Static Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >
static void  MarkObjectAsIndirect (PdfObject pdfObject)
 
static void  EnsureObjectIsAddedToDocument (PdfObject @object)
  Some wrappers use object's indirect reference to obtain the PdfDocument to which the object belongs to. More...
 

Detailed Description

A wrapper for namespace dictionaries (ISO 32000-2 section 14.7.4).

A wrapper for namespace dictionaries (ISO 32000-2 section 14.7.4). A namespace dictionary defines a namespace within the structure tree.

This pdf entity is meaningful only for the PDF documents of version 2.0 and higher.

Constructor & Destructor Documentation

◆ PdfNamespace() [1/3]

iText.Kernel.Pdf.Tagging.PdfNamespace.PdfNamespace ( PdfDictionary  dictionary )
inline

Constructs namespace from the given iText.Kernel.Pdf.PdfDictionary that represents namespace dictionary.

Constructs namespace from the given iText.Kernel.Pdf.PdfDictionary that represents namespace dictionary. This method is useful for property reading in reading mode or modifying in stamping mode.

Parameters
dictionary a iText.Kernel.Pdf.PdfDictionary that represents namespace in the document.

◆ PdfNamespace() [2/3]

iText.Kernel.Pdf.Tagging.PdfNamespace.PdfNamespace ( String  namespaceName )
inline

Constructs a namespace defined by the given namespace name.

Parameters
namespaceName a System.String defining the namespace name (conventionally a uniform resource identifier, or URI).

◆ PdfNamespace() [3/3]

iText.Kernel.Pdf.Tagging.PdfNamespace.PdfNamespace ( PdfString  namespaceName )
inline

Constructs a namespace defined by the given namespace name.

Parameters
namespaceName a iText.Kernel.Pdf.PdfString defining the namespace name (conventionally a uniform resource identifier, or URI).

Member Function Documentation

◆ AddNamespaceRoleMapping() [1/2]

virtual iText.Kernel.Pdf.Tagging.PdfNamespace iText.Kernel.Pdf.Tagging.PdfNamespace.AddNamespaceRoleMapping ( String  thisNsRole,
String  defaultNsRole 
)
inlinevirtual

Adds to the namespace role map (see SetNamespaceRoleMap(iText.Kernel.Pdf.PdfDictionary) ) a single role mapping to the default standard structure namespace.

Parameters
thisNsRole a System.String identifying structure element type in this namespace.
defaultNsRole a System.String identifying a structure element type in the default standard structure namespace.
Returns
this PdfNamespace instance.

◆ AddNamespaceRoleMapping() [2/2]

virtual iText.Kernel.Pdf.Tagging.PdfNamespace iText.Kernel.Pdf.Tagging.PdfNamespace.AddNamespaceRoleMapping ( String  thisNsRole,
String  targetNsRole,
iText.Kernel.Pdf.Tagging.PdfNamespace  targetNs 
)
inlinevirtual

Adds to the namespace role map (see SetNamespaceRoleMap(iText.Kernel.Pdf.PdfDictionary) ) a single role mapping to the target namespace.

Parameters
thisNsRole a System.String identifying structure element type in this namespace.
targetNsRole a System.String identifying a structure element type in the target namespace.
targetNs a PdfNamespace identifying the target namespace.
Returns
this PdfNamespace instance.

◆ GetNamespaceName()

virtual String iText.Kernel.Pdf.Tagging.PdfNamespace.GetNamespaceName ( )
inlinevirtual

Gets the string defining the namespace name.

Returns
a System.String defining the namespace name (conventionally a uniform resource identifier, or URI).

◆ GetNamespaceRoleMap()

virtual PdfDictionary iText.Kernel.Pdf.Tagging.PdfNamespace.GetNamespaceRoleMap ( )
inlinevirtual

A dictionary that maps the names of structure types used in the namespace to their approximate equivalents in another namespace.

Returns
a iText.Kernel.Pdf.PdfDictionary which is comprised of a set of keys representing structure element types in the namespace defined within this namespace dictionary. The corresponding value for each of these keys shall either be a single iText.Kernel.Pdf.PdfName identifying a structure element type in the default namespace or an iText.Kernel.Pdf.PdfArray where the first value shall be a structure element type name in a target namespace with the second value being an indirect reference to the target namespace dictionary.

◆ GetSchema()

virtual PdfFileSpec iText.Kernel.Pdf.Tagging.PdfNamespace.GetSchema ( )
inlinevirtual

Gets file specification identifying the schema file, which defines this namespace.

Returns
a iText.Kernel.Pdf.Filespec.PdfFileSpec identifying the schema file.

◆ IsWrappedObjectMustBeIndirect()

override bool iText.Kernel.Pdf.Tagging.PdfNamespace.IsWrappedObjectMustBeIndirect ( )
inlinepackagevirtual

Defines if the object behind this wrapper must be an indirect object in the resultant document.

Defines if the object behind this wrapper must be an indirect object in the resultant document.

If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.

Return value of this method shouldn't depend on any logic, it should return always true or false.

Returns
true if in the resultant document the object behind the wrapper must be indirect, otherwise false.

Implements iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >.

◆ SetNamespaceName() [1/2]

virtual iText.Kernel.Pdf.Tagging.PdfNamespace iText.Kernel.Pdf.Tagging.PdfNamespace.SetNamespaceName ( PdfString  namespaceName )
inlinevirtual

Sets the string defining the namespace name.

Parameters
namespaceName a iText.Kernel.Pdf.PdfString defining the namespace name (conventionally a uniform resource identifier, or URI).
Returns
this PdfNamespace instance.

◆ SetNamespaceName() [2/2]

virtual iText.Kernel.Pdf.Tagging.PdfNamespace iText.Kernel.Pdf.Tagging.PdfNamespace.SetNamespaceName ( String  namespaceName )
inlinevirtual

Sets the string defining the namespace name.

Parameters
namespaceName a System.String defining the namespace name (conventionally a uniform resource identifier, or URI).
Returns
this PdfNamespace instance.

◆ SetNamespaceRoleMap()

virtual iText.Kernel.Pdf.Tagging.PdfNamespace iText.Kernel.Pdf.Tagging.PdfNamespace.SetNamespaceRoleMap ( PdfDictionary  roleMapNs )
inlinevirtual

A dictionary that maps the names of structure types used in the namespace to their approximate equivalents in another namespace.

Parameters
roleMapNs a iText.Kernel.Pdf.PdfDictionary which is comprised of a set of keys representing structure element types in the namespace defined within this namespace dictionary. The corresponding value for each of these keys shall either be a single iText.Kernel.Pdf.PdfName identifying a structure element type in the default namespace or an iText.Kernel.Pdf.PdfArray where the first value shall be a structure element type name in a target namespace with the second value being an indirect reference to the target namespace dictionary.
Returns
this PdfNamespace instance.

◆ SetSchema()

virtual iText.Kernel.Pdf.Tagging.PdfNamespace iText.Kernel.Pdf.Tagging.PdfNamespace.SetSchema ( PdfFileSpec  fileSpec )
inlinevirtual

Sets file specification identifying the schema file, which defines this namespace.

Parameters
fileSpec a iText.Kernel.Pdf.Filespec.PdfFileSpec identifying the schema file.
Returns
this PdfNamespace instance.