public interface ChoiceAuthorityService
# names the ChoiceAuthority plugin called for this field
choices.plugin.<FIELD> = name-of-plugin
# mode of UI presentation desired in submission UI:
# "select" is dropdown menu, "lookup" is popup with selector, "suggest" is autocomplete/suggest
choices.presentation.<FIELD> = "select" | "suggest"
# is value "closed" to the set of these choices or are non-authority values permitted?
choices.closed.<FIELD> = true | false
ChoiceAuthority| Modifier and Type | Method and Description |
|---|---|
Choices |
getBestMatch(String fieldKey,
String query,
Collection collection,
String locale)
Wrapper that calls getBestMatch method of the plugin corresponding to
the metadata field defined by single field key.
|
String |
getLabel(MetadataValue metadataValue,
String locale)
Wrapper that calls getLabel method of the plugin corresponding to
the metadata field defined by schema,element,qualifier.
|
String |
getLabel(String fieldKey,
String authKey,
String locale)
Wrapper that calls getLabel method of the plugin corresponding to
the metadata field defined by single field key.
|
Choices |
getMatches(String fieldKey,
String query,
Collection collection,
int start,
int limit,
String locale)
Wrapper calls getMatches method of the plugin corresponding to
the metadata field defined by single field key.
|
Choices |
getMatches(String fieldKey,
String query,
Collection collection,
int start,
int limit,
String locale,
boolean externalInput) |
Choices |
getMatches(String schema,
String element,
String qualifier,
String query,
Collection collection,
int start,
int limit,
String locale)
Wrapper that calls getMatches method of the plugin corresponding to
the metadata field defined by schema,element,qualifier.
|
String |
getPresentation(String fieldKey)
Get the presentation keyword (should be "lookup", "select" or "suggest", but this
is an informal convention so it can be easily extended) for this field.
|
List<String> |
getVariants(MetadataValue metadataValue)
Wrapper to call plugin's getVariants().
|
boolean |
isChoicesConfigured(String fieldKey)
Predicate, is there a Choices configuration of any kind for the
given metadata field?
|
boolean |
isClosed(String fieldKey)
Get the configured "closed" value for this field.
|
Choices getMatches(String schema, String element, String qualifier, String query, Collection collection, int start, int limit, String locale)
schema - schema of metadata fieldelement - element of metadata fieldqualifier - qualifier of metadata fieldquery - user's value to matchcollection - database ID of Collection for context (owner of Item)start - choice at which to start, 0 is first.limit - maximum number of choices to return, 0 for no limit.locale - explicit localization key if available, or nullChoiceAuthority.getMatches(java.lang.String, java.lang.String, org.dspace.content.Collection, int, int, java.lang.String)Choices getMatches(String fieldKey, String query, Collection collection, int start, int limit, String locale)
fieldKey - single string identifying metadata fieldquery - user's value to matchcollection - database ID of Collection for context (owner of Item)start - choice at which to start, 0 is first.limit - maximum number of choices to return, 0 for no limit.locale - explicit localization key if available, or nullChoiceAuthority.getMatches(java.lang.String, java.lang.String, org.dspace.content.Collection, int, int, java.lang.String)Choices getMatches(String fieldKey, String query, Collection collection, int start, int limit, String locale, boolean externalInput)
Choices getBestMatch(String fieldKey, String query, Collection collection, String locale)
fieldKey - single string identifying metadata fieldquery - user's value to matchcollection - database ID of Collection for context (owner of Item)locale - explicit localization key if available, or nullChoiceAuthority.getBestMatch(java.lang.String, java.lang.String, org.dspace.content.Collection, java.lang.String)String getLabel(MetadataValue metadataValue, String locale)
metadataValue - metadata valuelocale - explicit localization key if availableString getLabel(String fieldKey, String authKey, String locale)
fieldKey - single string identifying metadata fieldlocale - explicit localization key if availableauthKey - authority keyboolean isChoicesConfigured(String fieldKey)
fieldKey - single string identifying metadata fieldString getPresentation(String fieldKey)
fieldKey - field keyboolean isClosed(String fieldKey)
fieldKey - single string identifying metadata fieldList<String> getVariants(MetadataValue metadataValue)
metadataValue - metadata valueCopyright © 2017 DuraSpace. All rights reserved.