Package org.verapdf.tools
Class StaticResources
java.lang.Object
org.verapdf.tools.StaticResources
Class handles static resources that need to be reset with each parsing of
document.
- Author:
- Sergey Shemyakov
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidCaches CMap object.static voidcacheFontProgram(String key, FontProgram font) static voidcacheStructureNameSpace(PDStructureNameSpace nameSpace) Caches structure name space.static voidclear()Clears all cached static resources.static FontProgramgetCachedFont(String key) static Map<String,FontProgram> static CMapGets CMap for this string key.static PDDocumentstatic PDFFlavourstatic Stringstatic PDStructureNameSpaceGets cached pd structure name space.static Map<COSKey,PDStructureNameSpace> static voidsetCachedFonts(Map<String, FontProgram> cachedFonts) static voidsetcMapCache(Map<String, CMap> cMapCache) static voidsetDocument(PDDocument document) static voidsetFlavour(PDFFlavour flavour) static voidsetPassword(String password) static voidsetStructureNameSpaceCache(Map<COSKey, PDStructureNameSpace> structureNameSpaceCache)
-
Method Details
-
cacheCMap
Caches CMap object.- Parameters:
name- is string key for cached CMap.cMap- is CMap object for caching.
-
getDocument
-
setDocument
-
getCMap
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
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
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
-
getCachedFont
-
clear
public static void clear()Clears all cached static resources. -
getcMapCache
-
setcMapCache
-
getStructureNameSpaceCache
-
setStructureNameSpaceCache
public static void setStructureNameSpaceCache(Map<COSKey, PDStructureNameSpace> structureNameSpaceCache) -
getCachedFonts
-
setCachedFonts
-
getFlavour
-
setFlavour
-
getPassword
-
setPassword
-