public class PdfNamespace extends PdfObjectWrapper<PdfDictionary>
This pdf entity is meaningful only for the PDF documents of version 2.0 and higher.
| Constructor and Description |
|---|
PdfNamespace(PdfDictionary dictionary)
Constructs namespace from the given
PdfDictionary that represents namespace dictionary. |
PdfNamespace(PdfString namespaceName)
Constructs a namespace defined by the given namespace name.
|
PdfNamespace(String namespaceName)
Constructs a namespace defined by the given namespace name.
|
| Modifier and Type | Method and Description |
|---|---|
PdfNamespace |
addNamespaceRoleMapping(String thisNsRole,
String defaultNsRole)
Adds to the namespace role map (see
setNamespaceRoleMap(PdfDictionary)) a single role mapping to the
default standard structure namespace. |
PdfNamespace |
addNamespaceRoleMapping(String thisNsRole,
String targetNsRole,
PdfNamespace targetNs)
Adds to the namespace role map (see
setNamespaceRoleMap(PdfDictionary)) a single role mapping to the
target namespace. |
String |
getNamespaceName()
Gets the string defining the namespace name.
|
PdfDictionary |
getNamespaceRoleMap()
A dictionary that maps the names of structure types used in the namespace to their approximate equivalents in another
namespace.
|
PdfFileSpec |
getSchema()
Gets file specification identifying the schema file, which defines this namespace.
|
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the
resultant document.
|
PdfNamespace |
setNamespaceName(PdfString namespaceName)
Sets the string defining the namespace name.
|
PdfNamespace |
setNamespaceName(String namespaceName)
Sets the string defining the namespace name.
|
PdfNamespace |
setNamespaceRoleMap(PdfDictionary roleMapNs)
A dictionary that maps the names of structure types used in the namespace to their approximate equivalents in another
namespace.
|
PdfNamespace |
setSchema(PdfFileSpec fileSpec)
Sets file specification identifying the schema file, which defines this namespace.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleasepublic PdfNamespace(PdfDictionary dictionary)
PdfDictionary that represents namespace dictionary.
This method is useful for property reading in reading mode or modifying in stamping mode.dictionary - a PdfDictionary that represents namespace in the document.public PdfNamespace(String namespaceName)
namespaceName - a String defining the namespace name (conventionally a uniform
resource identifier, or URI).public PdfNamespace setNamespaceName(String namespaceName)
namespaceName - a String defining the namespace name (conventionally a uniform
resource identifier, or URI).PdfNamespace instance.public PdfNamespace setNamespaceName(PdfString namespaceName)
namespaceName - a PdfString defining the namespace name (conventionally a uniform
resource identifier, or URI).PdfNamespace instance.public String getNamespaceName()
String defining the namespace name (conventionally a uniform
resource identifier, or URI).public PdfNamespace setSchema(PdfFileSpec fileSpec)
fileSpec - a PdfFileSpec identifying the schema file.PdfNamespace instance.public PdfFileSpec getSchema()
PdfFileSpec identifying the schema file.public PdfNamespace setNamespaceRoleMap(PdfDictionary roleMapNs)
roleMapNs - a 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 PdfName identifying a structure element type in the default
namespace or an 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.PdfNamespace instance.public PdfDictionary getNamespaceRoleMap()
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 PdfName identifying a structure element type in the default
namespace or an 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.public PdfNamespace addNamespaceRoleMapping(String thisNsRole, String defaultNsRole)
setNamespaceRoleMap(PdfDictionary)) a single role mapping to the
default standard structure namespace.thisNsRole - a String identifying structure element type in this namespace.defaultNsRole - a String identifying a structure element type in the default standard structure namespace.PdfNamespace instance.public PdfNamespace addNamespaceRoleMapping(String thisNsRole, String targetNsRole, PdfNamespace targetNs)
setNamespaceRoleMap(PdfDictionary)) a single role mapping to the
target namespace.thisNsRole - a String identifying structure element type in this namespace.targetNsRole - a String identifying a structure element type in the target namespace.targetNs - a PdfNamespace identifying the target namespace.PdfNamespace instance.protected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapperisWrappedObjectMustBeIndirect in class PdfObjectWrapper<PdfDictionary>Copyright © 1998–2019 iText Group NV. All rights reserved.