Package org.apache.tika.metadata
Class ReservedNamespaces
java.lang.Object
org.apache.tika.metadata.ReservedNamespaces
Classifies metadata keys by who is allowed to assert them. The Tika-native namespace
(
tk:) is guarded on the String write route: a key name derived from file content
(a blind scrape) that lands in this namespace is a forgery and is refused (thrown) rather
than honored, and the public Property factories reject reserved names at
construction. This is a file-borne-forgery guard and an internal-bug detector — not a
sealed boundary: Metadata.setTrusted(java.lang.String, java.lang.String), Metadata.reconstruct(java.lang.String, java.lang.String, boolean), and
Metadata.putAll(org.apache.tika.metadata.Metadata) deliberately write reserved keys for filters, serialization, and
pipes user metadata.- Since:
- Apache Tika 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisTikaNative(String name) Isnamein the Tika-native namespace?
-
Method Details
-
isTikaNative
Isnamein the Tika-native namespace? True for the currenttk:prefix and the pre-4.0.0X-TIKA:prefix — the legacy prefix stays reserved so a crafted file cannot forge it during the 4.x window even though Tika no longer writes it.- Parameters:
name- a metadata key name (may benull)- Returns:
trueif the key belongs to the reserved Tika-native namespace
-