Class SmartAliasHelper


  • public class SmartAliasHelper
    extends Object
    This class provides operations with the alias which matches the smart pattern. The smart pattern is 'xxx_<{_smart_referent_role_}>_yyy' Concept which has smart conceptAlias and reference link with role equals to the smart role derived from the alias is "smart concept"
    • Constructor Detail

      • SmartAliasHelper

        public SmartAliasHelper​(@NotNull
                                String alias)
    • Method Detail

      • isSmartAlias

        public boolean isSmartAlias()
        Returns:
        true if the alias matches the smart pattern
      • getSmartRole

        @Nullable
        public String getSmartRole()
        Returns:
        smart referent role derived from the alias if the alias is smart. Otherwise return null.
      • getPresentation

        public String getPresentation​(String roleReplacement)
        Parameters:
        roleReplacement - string to replace smart referent role in the presentation
        Returns:
        'xxx_roleReplacement_yyy' if the pattern is smart. Otherwise return roleReplacement.
      • replaceRole

        @Nullable
        public final String replaceRole​(String roleReplacement)
        Parameters:
        roleReplacement - string to replace smart referent role
        Returns:
        'xxx_<{roleReplacement}>_yyy' if the pattern is smart. Otherwise return null.