// Adds an entry to the map. If the key is empty, the value is used
        // as default for the given direction
        public void addEntry(String key, String value, Direction direction,
                             String fwConstrainedBy, String invConstrainedBy)
        {
            switch (direction)
            {
            case Direction.FORWARD:
                Value forwardValue = new Value(value, fwConstrainedBy);
                forwardMap.Add(key, forwardValue);
                break;

            case Direction.INVERSE:
                Value inverseValue = new Value(key, invConstrainedBy);
                inverseMap.Add(value, inverseValue);
                break;

            case Direction.BIDIRECTIONAL:
            default:
                Value forwardValue1 = new Value(value, fwConstrainedBy);
                Value inverseValue1 = new Value(key, invConstrainedBy);
                forwardMap.Add(key, forwardValue1);
                inverseMap.Add(value, inverseValue1);
                break;
            }
        }