public enum DescriptionIdGenerator extends Enum<DescriptionIdGenerator> implements IdGenerator
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Field and Description |
---|---|
static String |
DESCRIPTION_SEPARATOR |
static com.google.common.base.Joiner |
descriptionJoiner |
Modifier and Type | Method and Description |
---|---|
String |
generateId(Collection<String> scopeIds,
Bundle bundle)
Use an array of scope IDs and the bundle data to generate a unique
id within a given scope.
|
String |
getIdBase(Bundle bundle)
Return the base data for the id, sans scoping.
|
com.google.common.collect.ListMultimap<String,String> |
handleIdCollision(Collection<String> scopeIds,
Bundle bundle) |
static DescriptionIdGenerator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DescriptionIdGenerator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DescriptionIdGenerator INSTANCE
public static final String DESCRIPTION_SEPARATOR
public static final com.google.common.base.Joiner descriptionJoiner
public static DescriptionIdGenerator[] values()
for (DescriptionIdGenerator c : DescriptionIdGenerator.values()) System.out.println(c);
public static DescriptionIdGenerator valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic com.google.common.collect.ListMultimap<String,String> handleIdCollision(Collection<String> scopeIds, Bundle bundle)
handleIdCollision
in interface IdGenerator
scopeIds
- The entity's parent scope identifiersbundle
- The entity's bundle datapublic String generateId(Collection<String> scopeIds, Bundle bundle)
generateId
in interface IdGenerator
scopeIds
- An array of scope idsbundle
- The bundlepublic String getIdBase(Bundle bundle)
getIdBase
in interface IdGenerator
bundle
- The entity's bundle.Copyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.