Class SolrResourceGroupedMimeTypes
- java.lang.Object
-
- org.ametys.cms.content.indexing.solr.SolrResourceGroupedMimeTypes
-
public final class SolrResourceGroupedMimeTypes extends Object
Utility for indexing a "group" of MIME-Type in Solr
-
-
Field Summary
Fields Modifier and Type Field Description private static Map<String,List<String>>
__GROUPED_MIME_TYPES
static String
AUDIO_GROUP
Group for audioprotected static String[]
AUDIO_MIMETYPE
MIME types for audio filesstatic String
IMAGE_GROUP
Group for imageprotected static String[]
IMAGE_MIMETYPE
MIME types for imagesstatic String
PDF_GROUP
Group for pdfprotected static String[]
PDF_MIMETYPE
MIME types for pdfstatic String
PRES_GROUP
Group for presentationprotected static String[]
PRES_MIMETYPE
MIME types for presentationstatic String
SPREADSHEET_GROUP
Group for spreadsheetprotected static String[]
SPREADSHEET_MIMETYPE
MIME types for spreadsheetsstatic String
TEXT_GROUP
Group for text documentsprotected static String[]
TEXT_MIMETYPE
MIME types for text documentsstatic String
VIDEO_GROUP
Group for videoprotected static String[]
VIDEO_MIMETYPE
MIME types for videos
-
Constructor Summary
Constructors Modifier Constructor Description private
SolrResourceGroupedMimeTypes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,List<String>>
get()
Gets a view of the map of list of MIME-Types by groupstatic Optional<String>
getGroup(String mimeType)
Gets the group for the given MIME-Typestatic boolean
isValidGroup(String groupMimeType)
Tests if the given group value is valid
-
-
-
Field Detail
-
PDF_GROUP
public static final String PDF_GROUP
Group for pdf- See Also:
- Constant Field Values
-
IMAGE_GROUP
public static final String IMAGE_GROUP
Group for image- See Also:
- Constant Field Values
-
TEXT_GROUP
public static final String TEXT_GROUP
Group for text documents- See Also:
- Constant Field Values
-
PRES_GROUP
public static final String PRES_GROUP
Group for presentation- See Also:
- Constant Field Values
-
SPREADSHEET_GROUP
public static final String SPREADSHEET_GROUP
Group for spreadsheet- See Also:
- Constant Field Values
-
VIDEO_GROUP
public static final String VIDEO_GROUP
Group for video- See Also:
- Constant Field Values
-
AUDIO_GROUP
public static final String AUDIO_GROUP
Group for audio- See Also:
- Constant Field Values
-
PDF_MIMETYPE
protected static final String[] PDF_MIMETYPE
MIME types for pdf
-
IMAGE_MIMETYPE
protected static final String[] IMAGE_MIMETYPE
MIME types for images
-
TEXT_MIMETYPE
protected static final String[] TEXT_MIMETYPE
MIME types for text documents
-
PRES_MIMETYPE
protected static final String[] PRES_MIMETYPE
MIME types for presentation
-
SPREADSHEET_MIMETYPE
protected static final String[] SPREADSHEET_MIMETYPE
MIME types for spreadsheets
-
VIDEO_MIMETYPE
protected static final String[] VIDEO_MIMETYPE
MIME types for videos
-
AUDIO_MIMETYPE
protected static final String[] AUDIO_MIMETYPE
MIME types for audio files
-
__GROUPED_MIME_TYPES
private static final Map<String,List<String>> __GROUPED_MIME_TYPES
-
-
Constructor Detail
-
SolrResourceGroupedMimeTypes
private SolrResourceGroupedMimeTypes()
-
-
Method Detail
-
get
public static Map<String,List<String>> get()
Gets a view of the map of list of MIME-Types by group- Returns:
- a view of the map of list of MIME-Types by group
-
getGroup
public static Optional<String> getGroup(String mimeType)
Gets the group for the given MIME-Type- Parameters:
mimeType
- The MIME-Type- Returns:
- the group for the given MIME-Type
-
isValidGroup
public static boolean isValidGroup(String groupMimeType)
Tests if the given group value is valid- Parameters:
groupMimeType
- The group to test- Returns:
true
if the given group value is valid
-
-