public class CompressionFlags extends Object
Several MG4J index-related methods require a set of flags specified as a flag map,
that is, an EnumMap
from components to codings (see, e.g.,
BitStreamIndexWriter). For the special component CompressionFlags.Component.PAYLOADS, the only
admissible value is null.
Besides declaring the necessary enums, this class contains a parsing method that turns an array of the form component:coding into a flag map.
| Modifier and Type | Class and Description |
|---|---|
static class |
CompressionFlags.Coding
A coding for an index component.
|
static class |
CompressionFlags.Component
A component of the index.
|
| Modifier and Type | Field and Description |
|---|---|
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
DEFAULT
Deprecated.
As of MG4J 1.2, replaced by
DEFAULT_STANDARD_INDEX. |
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
DEFAULT_PAYLOAD_INDEX
An unmodifiable map representing the default flags for a payload-based index.
|
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
DEFAULT_QUASI_SUCCINCT_INDEX
An unmodifiable map representing the default flags for a quasi-succinct index.
|
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
DEFAULT_STANDARD_INDEX
An unmodifiable map representing the default flags for a standard index.
|
static String |
NONE
A string used by
valueOf(String[], Map) to disable a component. |
| Constructor and Description |
|---|
CompressionFlags() |
| Modifier and Type | Method and Description |
|---|---|
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
valueOf(String[] flag,
Map<CompressionFlags.Component,CompressionFlags.Coding> defaultMap)
Returns a flag map corresponding to a given array of strings.
|
public static final String NONE
valueOf(String[], Map) to disable a component.public static final Map<CompressionFlags.Component,CompressionFlags.Coding> DEFAULT_STANDARD_INDEX
public static final Map<CompressionFlags.Component,CompressionFlags.Coding> DEFAULT_QUASI_SUCCINCT_INDEX
public static final Map<CompressionFlags.Component,CompressionFlags.Coding> DEFAULT_PAYLOAD_INDEX
@Deprecated public static final Map<CompressionFlags.Component,CompressionFlags.Coding> DEFAULT
DEFAULT_STANDARD_INDEX.public static Map<CompressionFlags.Component,CompressionFlags.Coding> valueOf(String[] flag, Map<CompressionFlags.Component,CompressionFlags.Coding> defaultMap)
This method takes an array of (possibly untrimmed) flag strings of the form component:coding and turns them into a flag map (see the introduction). The flag map can be initialised by an optional default map, and the special value NONE for coding may be used to delete a key (the corresponding key in the flag map will be missing).
It is acceptable that strings in the array have whitespace around.
flag - an array of (possibly untrimmed) flag strings of
the form component:coding.defaultMap - a optional flag map of default values, or null.