Enum FileMacrotype

    • 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 and VIDEO).
        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 name
        NullPointerException - if the argument is null
      • resolve

        public static FileMacrotype resolve​(String contentType)
        Resolves the type from the given content type.
        The resolve process will be as follows:
        1. The FileMetadataMatchers will be processed (in order) to find one that matches the given content type. If some FileMacrotypeMapping matches the content type, its type will be returned.
        2. If no matcher matches the content type, then it will be resolved using the ContentType API.
        3. 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