|
1 | 1 | from shexer.io.shex.formater.consts import SPACES_GAP_BETWEEN_TOKENS, \
|
2 |
| - COMMENT_INI, TARGET_LINE_LENGHT, SPACES_GAP_FOR_FREQUENCY, KLEENE_CLOSURE, POSITIVE_CLOSURE, OPT_CARDINALITY |
| 2 | + COMMENT_INI, TARGET_LINE_LENGHT, SPACES_GAP_FOR_FREQUENCY, KLEENE_CLOSURE, POSITIVE_CLOSURE, OPT_CARDINALITY, SHAPE_LINK_CHAR |
3 | 3 | from shexer.model.IRI import IRI_ELEM_TYPE
|
4 | 4 | from shexer.model.shape import STARTING_CHAR_FOR_SHAPE_NAME
|
5 | 5 | from shexer.utils.shapes import prefixize_shape_name_if_possible
|
@@ -53,16 +53,16 @@ def tune_token(a_token, namespaces_dict):
|
53 | 53 | # TODO: a lot to correct here for normal behaviour
|
54 | 54 | if a_token.startswith(STARTING_CHAR_FOR_SHAPE_NAME): # Shape
|
55 | 55 | # return STARTING_CHAR_FOR_SHAPE_NAME +":" + a_token.replace(STARTING_CHAR_FOR_SHAPE_NAME, "")
|
56 |
| - return STARTING_CHAR_FOR_SHAPE_NAME \ |
| 56 | + return SHAPE_LINK_CHAR \ |
57 | 57 | + prefixize_shape_name_if_possible(a_shape_name=a_token,
|
58 | 58 | namespaces_prefix_dict=namespaces_dict)
|
59 | 59 | if a_token == IRI_ELEM_TYPE: # iri
|
60 | 60 | return a_token
|
61 | 61 | if ":" not in a_token:
|
62 | 62 | if "<" in a_token:
|
63 |
| - return STARTING_CHAR_FOR_SHAPE_NAME + a_token |
| 63 | + return SHAPE_LINK_CHAR + a_token |
64 | 64 | else:
|
65 |
| - return STARTING_CHAR_FOR_SHAPE_NAME + "<" + a_token + ">" |
| 65 | + return SHAPE_LINK_CHAR + "<" + a_token + ">" |
66 | 66 | candidate_prefixed = BaseStatementSerializer._prefixize_uri_if_possible(uri=a_token,
|
67 | 67 | namespaces_dict=namespaces_dict)
|
68 | 68 | if candidate_prefixed is not None:
|
|
0 commit comments