Package org.apache.tika.mime
Class MediaTypeRegistry
java.lang.Object
org.apache.tika.mime.MediaTypeRegistry
- All Implemented Interfaces:
Serializable
@Deprecated(since="2026-04-30")
public class MediaTypeRegistry
extends Object
implements Serializable
Deprecated.
This version of the Apache Tika library is deprecated. Use your own version of Apache Tika.
Registry of known Internet media types.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.voidaddSuperType(MediaType type, MediaType supertype) Deprecated.voidDeprecated.getAliases(MediaType type) Deprecated.Returns the set of known aliases of the given canonical media type.getChildTypes(MediaType type) Deprecated.Returns the set of known children of the given canonical media typestatic MediaTypeRegistryDeprecated.Returns the built-in media type registry included in Tika.getSupertype(MediaType type) Deprecated.Returns the supertype of the given type.getTypes()Deprecated.Returns the set of all known canonical media types.booleanisInstanceOf(String a, MediaType b) Deprecated.Parses and normalises the given media type string and checks whether the result equals the given base type or is a specialization of it.booleanisInstanceOf(MediaType a, MediaType b) Deprecated.Checks whether the given media type equals the given base type or is a specialization of it.booleanDeprecated.Checks whether the given media type a is a specialization of a more generic type b.Deprecated.
-
Constructor Details
-
MediaTypeRegistry
public MediaTypeRegistry()Deprecated.
-
-
Method Details
-
getDefaultRegistry
Deprecated.Returns the built-in media type registry included in Tika.- Returns:
- default media type registry
- Since:
- Apache Tika 0.8
-
getTypes
Deprecated.Returns the set of all known canonical media types. Type aliases are not included in the returned set.- Returns:
- canonical media types
- Since:
- Apache Tika 0.8
-
getAliases
Deprecated.Returns the set of known aliases of the given canonical media type.- Parameters:
type- canonical media type- Returns:
- known aliases
- Since:
- Apache Tika 0.8
-
getChildTypes
Deprecated.Returns the set of known children of the given canonical media type- Parameters:
type- canonical media type- Returns:
- known children
- Since:
- Apache Tika 1.8
-
addType
Deprecated. -
addAlias
Deprecated. -
addSuperType
Deprecated. -
normalize
Deprecated. -
isSpecializationOf
Deprecated.Checks whether the given media type a is a specialization of a more generic type b. Both types should be already normalised.- Parameters:
a- media type, normalisedb- suspected supertype, normalised- Returns:
trueif b is a supertype of a,falseotherwise- Since:
- Apache Tika 0.8
-
isInstanceOf
Deprecated.Checks whether the given media type equals the given base type or is a specialization of it. Both types should be already normalised.- Parameters:
a- media type, normalisedb- base type, normalised- Returns:
trueif b equals a or is a specialization of it,falseotherwise- Since:
- Apache Tika 1.2
-
isInstanceOf
Deprecated.Parses and normalises the given media type string and checks whether the result equals the given base type or is a specialization of it. The given base type should already be normalised.- Parameters:
a- media typeb- base type, normalised- Returns:
trueif b equals a or is a specialization of it,falseotherwise- Since:
- Apache Tika 1.2
-
getSupertype
Deprecated.Returns the supertype of the given type. If the media type database has an explicit inheritance rule for the type, then that is used. Next, if the given type has any parameters, then the respective base type (parameter-less) is returned. Otherwise built-in heuristics like text/... -> text/plain and .../...+xml -> application/xml are used. Finally application/octet-stream is returned for all types for which no other supertype is known, and the return value for application/octet-stream isnull.- Parameters:
type- media type- Returns:
- supertype, or
nullfor application/octet-stream - Since:
- Apache Tika 0.8
-