Package com.itextpdf.kernel.pdf.tagutils
Interface IRoleMappingResolver
-
- All Known Implementing Classes:
RoleMappingResolver
,RoleMappingResolverPdf2
public interface IRoleMappingResolver
A helper interface that facilitates roles mapping resolving for the tag structures that are defined for different PDF document specification versions.Be aware, that it is explicitly allowed for the document by the specification to have circular or transitive mappings.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
currentRoleIsStandard()
Checks if the current role belongs to one of the standard structure namespaces.boolean
currentRoleShallBeMappedToStandard()
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.PdfNamespace
getNamespace()
Defines the namespace of the current role.java.lang.String
getRole()
Defines the current role of the resolver.boolean
resolveNextMapping()
Performs a mapping resolving "step".
-
-
-
Method Detail
-
getRole
java.lang.String getRole()
Defines 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.- Returns:
- the
String
which identifies current role of the resolver
-
getNamespace
PdfNamespace getNamespace()
Defines the namespace of the current role.- Returns:
- the
PdfNamespace
instance of the namespace dictionary wrapper. The role returned by thegetRole()
method call is considered to belong to this namespace. Might be null, which means that role belongs to the default standard namespace.
-
currentRoleIsStandard
boolean currentRoleIsStandard()
Checks if the current role belongs to one of the standard structure namespaces.- Returns:
true
if the current namespace is a standard structure namespace and the current role is defined as standard role in it,false
otherwise
-
currentRoleShallBeMappedToStandard
boolean currentRoleShallBeMappedToStandard()
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.- 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
boolean resolveNextMapping()
Performs a mapping resolving "step". Essentially finds the role and its namespace to which the current role is mapped to. After this method callgetRole()
andgetNamespace()
methods might change their return value.- Returns:
true
if current role and/or namespace have changed their values; otherwisefalse
which means that current role is not mapped
-
-