Class BidiMappingService

    • Constructor Detail

      • BidiMappingService

        public BidiMappingService()
      • BidiMappingService

        public BidiMappingService​(String separator)
    • Method Detail

      • getReverseMap

        public Map getReverseMap()
      • setReverseMap

        public void setReverseMap​(Map value)
      • getSeparator

        public String getSeparator()
      • setSeparator

        public void setSeparator​(String value)
      • getIgnoreResourceNotFound

        public boolean getIgnoreResourceNotFound()
      • isIgnoreResourceNotFound

        public boolean isIgnoreResourceNotFound()
      • setIgnoreResourceNotFound

        public void setIgnoreResourceNotFound​(boolean value)
      • getScripts

        public List<URL> getScripts()
      • setScripts

        public void setScripts​(List<URL> value)
      • setMappingScript

        public void setMappingScript​(URL script)
      • setMappingScripts

        public void setMappingScripts​(URL... scripts)
      • clearMappings

        public void clearMappings()
      • get

        public Object get​(Object mappingKey,
                          Object key)
        Specified by:
        get in interface MappingService
        Parameters:
        mappingKey - mapping name
        key - left side of the mapping
        Returns:
        the value mapped by a registered mapping. The implementation of the mapping implements the behavior if the key does not exist.
      • getKey

        public Object getKey​(Object mappingKey,
                             Object value)
        Description copied from interface: MappingService
        Reverse mapping (Optional implementation)
        Specified by:
        getKey in interface MappingService
        Parameters:
        mappingKey - mapping name
        value - right side of the mapping
        Returns:
        the key mapped by a registered mapping. The implementation of the mapping implements the behavior if the value does not exist.
      • get

        public Object get​(Object mappingKey,
                          Object key,
                          Object defaultValue)
        Specified by:
        get in interface MappingService
        Parameters:
        mappingKey - mapping name
        key - left side of the mapping
        defaultValue - default right side if there is no mapping for the code
        Returns:
        the value mapped by a registered mapping. If no mapping exists, the default value if returned. The implementation of the mapping implements the behavior if the key does not exist.
      • getKey

        public Object getKey​(Object mappingKey,
                             Object value,
                             Object defaultValue)
        Description copied from interface: MappingService
        Reverse mapping (Optional implementation)
        Specified by:
        getKey in interface MappingService
        Parameters:
        mappingKey - mapping name
        value - right side of the mapping
        defaultValue - default left side
        Returns:
        the key mapped by a registered mapping. If no mapping exists, the default value if returned. The implementation of the mapping implements the behavior if the key does not exist.
      • getKeySystem

        public Object getKeySystem​(Object mappingKey)
        Specified by:
        getKeySystem in interface MappingService
        Parameters:
        mappingKey - mapping name
        Returns:
        a formal identification of the key system (e.g. an OID)
      • getValueSystem

        public Object getValueSystem​(Object mappingKey)
        Specified by:
        getValueSystem in interface MappingService
        Parameters:
        mappingKey - mapping name
        Returns:
        a formal identification of the value system (e.g. an OID)
      • mappingKeys

        public Set<?> mappingKeys()
        Specified by:
        mappingKeys in interface MappingService
        Returns:
        a set of names of all registered mappings. Changes to the set do not change the registry itself.
      • keys

        public Set<?> keys​(Object mappingKey)
        Specified by:
        keys in interface MappingService
        Parameters:
        mappingKey - mapping key
        Returns:
        key set of a registered mapping. Changes to the set do not change the registry itself.
      • values

        public Collection<?> values​(Object mappingKey)
        Specified by:
        values in interface MappingService
        Parameters:
        mappingKey - mapping key
        Returns:
        value set of a registered mapping. Changes to the set do not change the registry itself.
      • updateReverseMap

        protected void updateReverseMap()
      • checkMappingKey

        protected static void checkMappingKey​(Map<Object,​Map> map,
                                              Object mappingKey)