Class StaticResources

java.lang.Object
org.verapdf.tools.StaticResources

public class StaticResources extends Object
Class handles static resources that need to be reset with each parsing of document.
Author:
Sergey Shemyakov
  • Method Details

    • cacheCMap

      public static void cacheCMap(String name, CMap cMap)
      Caches CMap object.
      Parameters:
      name - is string key for cached CMap.
      cMap - is CMap object for caching.
    • getDocument

      public static PDDocument getDocument()
    • setDocument

      public static void setDocument(PDDocument document)
    • getCMap

      public static CMap getCMap(String name)
      Gets CMap for this string key.
      Parameters:
      name - is key for CMap.
      Returns:
      cached CMap with this name or null if no CMap available.
    • cacheStructureNameSpace

      public static void cacheStructureNameSpace(PDStructureNameSpace nameSpace)
      Caches structure name space. Key is chosen to be indirect reference key of this namespace dictionary.
      Parameters:
      nameSpace - is PD structure name space to cache.
    • getStructureNameSpace

      public static PDStructureNameSpace getStructureNameSpace(COSKey key)
      Gets cached pd structure name space.
      Parameters:
      key - is COSKey of namespace to get.
      Returns:
      cached namespace with this COSKey or null if no namespace available.
    • cacheFontProgram

      public static void cacheFontProgram(String key, FontProgram font)
    • getCachedFont

      public static FontProgram getCachedFont(String key)
    • clear

      public static void clear()
      Clears all cached static resources.
    • getcMapCache

      public static Map<String,CMap> getcMapCache()
    • setcMapCache

      public static void setcMapCache(Map<String,CMap> cMapCache)
    • getStructureNameSpaceCache

      public static Map<COSKey,PDStructureNameSpace> getStructureNameSpaceCache()
    • setStructureNameSpaceCache

      public static void setStructureNameSpaceCache(Map<COSKey,PDStructureNameSpace> structureNameSpaceCache)
    • getCachedFonts

      public static Map<String,FontProgram> getCachedFonts()
    • setCachedFonts

      public static void setCachedFonts(Map<String,FontProgram> cachedFonts)
    • getFlavour

      public static PDFFlavour getFlavour()
    • setFlavour

      public static void setFlavour(PDFFlavour flavour)
    • getPassword

      public static String getPassword()
    • setPassword

      public static void setPassword(String password)