Class AccessibleTypes


  • class AccessibleTypes
    extends java.lang.Object
    This class is used to identify standard structure role type based only on it's name for the sake of applying standard structure attributes.

    These types mostly resemble structure type levels in the pdf 1.7 specification, however they are not exact. In pdf 2.0 some of these types are not even present and moreover, specific roles with the same name might belong to different type levels depending on context (which consists of kids, parents and their types).

    So, these types are mostly useful for the internal itext usage and are not backed by any spec. They are designed for the most part to return the value the most suitable and handy for the purposes of accessibility properties applying.

    Here are the main reasons to leave these types as is for now, even after introducing of PDF 2.0:

    • Standard structure types for pdf 1.7 and 2.0 are very alike. There are some differences, like new/removed roles and attributes, however they are not used in current layout auto tagging mechanism.
    • Differentiating possible types for the same role based on the context is not supported at the moment.
    In general, the correct way to handle role types would be to have separate classes for every namespace that define type and apply attributes. However I believe, that for now it is not feasible at the moment to implement this approach. The right time to improve and replace this class might be when new roles and attributes (specific to the different standard structure namespaces) will be more widely used in the auto tagging mechanism by default, and also when may be there will be more known practical examples of utilizing standard structure attributes.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int BlockLevel  
      (package private) static java.util.Set<java.lang.String> blockLevelRoles  
      (package private) static int Grouping  
      (package private) static java.util.Set<java.lang.String> groupingRoles  
      (package private) static int Illustration  
      (package private) static java.util.Set<java.lang.String> illustrationRoles  
      (package private) static int InlineLevel  
      (package private) static java.util.Set<java.lang.String> inlineLevelRoles  
      (package private) static int Unknown  
    • Constructor Summary

      Constructors 
      Constructor Description
      AccessibleTypes()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static int identifyType​(java.lang.String role)
      Identifies standard structure role type based only on it's name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Unknown

        static int Unknown
      • Grouping

        static int Grouping
      • BlockLevel

        static int BlockLevel
      • InlineLevel

        static int InlineLevel
      • Illustration

        static int Illustration
      • groupingRoles

        static java.util.Set<java.lang.String> groupingRoles
      • blockLevelRoles

        static java.util.Set<java.lang.String> blockLevelRoles
      • inlineLevelRoles

        static java.util.Set<java.lang.String> inlineLevelRoles
      • illustrationRoles

        static java.util.Set<java.lang.String> illustrationRoles
    • Constructor Detail

      • AccessibleTypes

        AccessibleTypes()