equal
deleted
inserted
replaced
239 Params usage: |
239 Params usage: |
240 key_fields_prefix: The key_fields_prefix value is used as the |
240 key_fields_prefix: The key_fields_prefix value is used as the |
241 first part of the returned pattern. |
241 first part of the returned pattern. |
242 """ |
242 """ |
243 |
243 |
244 logic = params['logic'] |
244 names = params['logic'].getKeyFieldNames() |
245 names = logic.getKeyFieldNames() |
|
246 patterns = params['key_fields_prefix'] |
245 patterns = params['key_fields_prefix'] |
247 |
246 |
248 for name in names: |
247 for name in names: |
249 regexp = linkable.LINK_ID_PATTERN_CORE |
248 pattern = r'(?P<%s>%s)' % (name, linkable.LINK_ID_PATTERN_CORE) |
250 if name == 'scope_path': |
|
251 regexp = '/'.join((regexp for i in range(logic.getScopeDepth()))) |
|
252 |
|
253 pattern = r'(?P<%s>%s)' % (name, regexp) |
|
254 patterns.append(pattern) |
249 patterns.append(pattern) |
255 |
250 |
256 result = '/'.join(patterns) |
251 result = '/'.join(patterns) |
257 return result |
252 return result |