Interface MetadataAuthorityService

All Known Implementing Classes:
MetadataAuthorityServiceImpl

public interface MetadataAuthorityService
Broker for metadata authority settings configured for each metadata field. Configuration keys, per metadata field (e.g. "dc.contributor.author") # is field authority controlled (i.e. store authority, confidence values)? authority.controlled.<FIELD> = true # is field required to have an authority value, or may it be empty? # default is false. authority.required.<FIELD> = true | false # default value of minimum confidence level for ALL fields - must be # symbolic confidence level, see org.dspace.content.authority.Choices authority.minconfidence = uncertain # minimum confidence level for this field authority.minconfidence.SCHEMA.ELEMENT.QUALIFIER = SYMBOL e.g. authority.minconfidence.dc.contributor.author = accepted NOTE: There is *expected* to be a "choices" (see ChoiceAuthorityManager) configuration for each authority-controlled field.
Author:
Larry Stone
See Also:
  • Method Details

    • isAuthorityControlled

      boolean isAuthorityControlled(MetadataField metadataField)
      Predicate - is field authority-controlled?
      Parameters:
      metadataField - metadata field
      Returns:
      true/false
    • isAuthorityControlled

      boolean isAuthorityControlled(String fieldKey)
      Predicate - is field authority-controlled?
      Parameters:
      fieldKey - field key
      Returns:
      true/false
    • isAuthorityRequired

      boolean isAuthorityRequired(MetadataField metadataField)
      Predicate - is authority value required for field?
      Parameters:
      metadataField - metadata field
      Returns:
      true/false
    • isAuthorityRequired

      boolean isAuthorityRequired(String fieldKey)
      Predicate - is authority value required for field?
      Parameters:
      fieldKey - field key
      Returns:
      true/false
    • makeFieldKey

      String makeFieldKey(MetadataField metadataField)
      Construct a single key from the tuple of schema/element/qualifier that describes a metadata field. Punt to the function we use for submission UI input forms, for now.
      Parameters:
      metadataField - metadata field
      Returns:
      field key
    • makeFieldKey

      String makeFieldKey(String schema, String element, String qualifier)
      Construct a single key from the tuple of schema/element/qualifier that describes a metadata field. Punt to the function we use for submission UI input forms, for now.
      Parameters:
      schema - schema
      element - element
      qualifier - qualifier
      Returns:
      field key
    • getMinConfidence

      int getMinConfidence(MetadataField metadataField)
      Give the minimal level of confidence required to consider valid an authority value for the given metadata.
      Parameters:
      metadataField - metadata field
      Returns:
      the minimal valid level of confidence for the given metadata
    • getAuthorityMetadata

      List<String> getAuthorityMetadata()
      Return the list of metadata field with authority control. The strings are in the form schema.element[.qualifier]
      Returns:
      the list of metadata field with authority control
    • clearCache

      void clearCache()
      This method has been created to have a way of clearing the cache kept inside the service