Package com.itextpdf.kernel.pdf.tagutils
Class RoleMappingResolverPdf2
- java.lang.Object
-
- com.itextpdf.kernel.pdf.tagutils.RoleMappingResolverPdf2
-
- All Implemented Interfaces:
IRoleMappingResolver
class RoleMappingResolverPdf2 extends java.lang.Object implements IRoleMappingResolver
-
-
Field Summary
Fields Modifier and Type Field Description private PdfNamespacecurrNamespaceprivate PdfNamecurrRoleprivate PdfNamespacedefaultNamespace
-
Constructor Summary
Constructors Constructor Description RoleMappingResolverPdf2(java.lang.String role, PdfNamespace namespace, PdfDocument document)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancurrentRoleIsStandard()Checks if the current role belongs to one of the standard structure namespaces.booleancurrentRoleShallBeMappedToStandard()Checks if the current role and namespace are specified to be obligatory mapped to the standard structure namespace in order to be a valid role in the Tagged PDF.PdfNamespacegetNamespace()Defines the namespace of the current role.java.lang.StringgetRole()Defines the current role of the resolver.booleanresolveNextMapping()Performs a mapping resolving "step".
-
-
-
Field Detail
-
currRole
private PdfName currRole
-
currNamespace
private PdfNamespace currNamespace
-
defaultNamespace
private PdfNamespace defaultNamespace
-
-
Constructor Detail
-
RoleMappingResolverPdf2
RoleMappingResolverPdf2(java.lang.String role, PdfNamespace namespace, PdfDocument document)
-
-
Method Detail
-
getRole
public java.lang.String getRole()
Description copied from interface:IRoleMappingResolverDefines the current role of the resolver. On every successful resolving "step" the role returned by this method changes in order to reflect the mapping of the previous role.- Specified by:
getRolein interfaceIRoleMappingResolver- Returns:
- the
Stringwhich identifies current role of the resolver
-
getNamespace
public PdfNamespace getNamespace()
Description copied from interface:IRoleMappingResolverDefines the namespace of the current role.- Specified by:
getNamespacein interfaceIRoleMappingResolver- Returns:
- the
PdfNamespaceinstance of the namespace dictionary wrapper. The role returned by theIRoleMappingResolver.getRole()method call is considered to belong to this namespace. Might be null, which means that role belongs to the default standard namespace.
-
currentRoleIsStandard
public boolean currentRoleIsStandard()
Description copied from interface:IRoleMappingResolverChecks if the current role belongs to one of the standard structure namespaces.- Specified by:
currentRoleIsStandardin interfaceIRoleMappingResolver- Returns:
trueif the current namespace is a standard structure namespace and the current role is defined as standard role in it,falseotherwise
-
currentRoleShallBeMappedToStandard
public boolean currentRoleShallBeMappedToStandard()
Description copied from interface:IRoleMappingResolverChecks if the current role and namespace are specified to be obligatory mapped to the standard structure namespace in order to be a valid role in the Tagged PDF.- Specified by:
currentRoleShallBeMappedToStandardin interfaceIRoleMappingResolver- Returns:
true, if the current role in the current namespace neither belongs to the standard structure roles, nor is in the domain specific namespace; otherwisefalse
-
resolveNextMapping
public boolean resolveNextMapping()
Description copied from interface:IRoleMappingResolverPerforms a mapping resolving "step". Essentially finds the role and its namespace to which the current role is mapped to. After this method callIRoleMappingResolver.getRole()andIRoleMappingResolver.getNamespace()methods might change their return value.- Specified by:
resolveNextMappingin interfaceIRoleMappingResolver- Returns:
trueif current role and/or namespace have changed their values; otherwisefalsewhich means that current role is not mapped
-
-