Package lumis.portal.file.metadata
Enum FileMacrotype
- java.lang.Object
-
- java.lang.Enum<FileMacrotype>
-
- lumis.portal.file.metadata.FileMacrotype
-
- All Implemented Interfaces:
Serializable
,Comparable<FileMacrotype>
@StableMinor(version="14.0", sinceVersion="7.0") public enum FileMacrotype extends Enum<FileMacrotype>
A file type representation.- Since:
- 7.0.0
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FileMacrotype
resolve(String contentType)
Resolves thetype
from the given content type.
The resolve process will be as follows: TheFileMetadataMatchers
will be processed (in order) to find one that matches the given content type.static FileMacrotype
valueOf(String name)
Returns the enum constant of this type with the specified name.static FileMacrotype[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUDIO
public static final FileMacrotype AUDIO
Represents audio file macro type.- Since:
- 7.0.0
-
IMAGE
public static final FileMacrotype IMAGE
Represents image file macro type.- Since:
- 7.0.0
-
VIDEO
public static final FileMacrotype VIDEO
Represents video file macro type.- Since:
- 7.0.0
-
OTHER
public static final FileMacrotype OTHER
Represents other file macro type different of the previously described (AUDIO
,IMAGE
andVIDEO
).- Since:
- 7.0.0
-
-
Method Detail
-
values
public static FileMacrotype[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FileMacrotype c : FileMacrotype.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FileMacrotype valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
resolve
public static FileMacrotype resolve(String contentType)
Resolves thetype
from the given content type.
The resolve process will be as follows:- The
FileMetadataMatchers
will be processed (in order) to find one that matches the given content type. If someFileMacrotypeMapping
matches the content type, itstype
will be returned. -
If no
matcher
matches the content type, then it will be resolved using theContentType
API. - If an exception was raised when parsing the content type or if the parsed content type is unknown,
OTHER
will be returned.
- Parameters:
contentType
- the content type.- Returns:
- the resolved
FileMacrotype
. - Since:
- 7.0.0
- The
-
-