Class AuthorityUtils


  • @Component
    public class AuthorityUtils
    extends Object
    Utility methods to expose the authority framework over REST
    Author:
    Andrea Bollini (andrea.bollini at 4science.it)
    • Constructor Detail

      • AuthorityUtils

        public AuthorityUtils()
    • Method Detail

      • isChoice

        public boolean isChoice​(String schema,
                                String element,
                                String qualifier)
      • isClosed

        public boolean isClosed​(String schema,
                                String element,
                                String qualifier)
      • convertEntry

        public AuthorityEntryRest convertEntry​(Choice choice,
                                               String authorityName,
                                               Projection projection)
        TODO the authorityName MUST be a part of Choice model
        Parameters:
        choice -
        authorityName -
        projection - the name of the projection to use, or null.
        Returns:
      • convertAuthority

        public AuthorityRest convertAuthority​(ChoiceAuthority source,
                                              String authorityName,
                                              Projection projection)
        TODO the authorityName MUST be a part of ChoiceAuthority model
        Parameters:
        source -
        authorityName -
        projection - the projecton to use.
        Returns: