{"action":"created","comment":{"url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/comments/71305610","id":71305610,"diff_hunk":"@@ -0,0 +1,47 @@\n+# Database and collection name encoding and decoding\n+\n+MongoDB imposes a set of restrictions regarding the characters which cannot be used as part of the databases and collection names, as well as other limitations. These restrictions are detailed at https://docs.mongodb.com/manual/reference/limits/\n+\n+Since the names of the databases and the collections used by the STH component are composed from the concatenation of the values assigned to the service, service path, entity id, entity type, attribute name and attribute type (depending on the chosen data model) and we do not want the potential users of the STH component to inherit the restrictions imposed by MongoDB (as the database used by the STH component), a codification mechanism is used before conforming the name of the databases and collections.\n+\n+The codification mechanism is detailed next:\n+    1. For database names:\n+        1. Encode the forbidden characters (i.e., `/``\\``.``(blank space)``\"``$``(null character)`) using an escaping character (`x`) and the numerical Unicode code for each character. For instance, the `$` character will be encoded as `x0024`.\n+        2. User defined strings already using the above encoding must be escaped prepending another `x`, for instance: the text `x002a` will be encoded as `xx002a`.\n+        3. To avoid the case sensitivity restrictions imposed by MongoDB to the database names, uppercase characters (since they are supposed to be less common than lowercase ones) are also be encoded (i.e., `Service` -> `x0053ervice`).\n+        4. The name separator character (`xffff`) is not decoded.","path":"doc/manuals/name-encoding.md","position":12,"original_position":12,"commit_id":"07db753158d1faada36b449ae2f7ca29c23d1f5c","original_commit_id":"07db753158d1faada36b449ae2f7ca29c23d1f5c","user":{"login":"frbattid","id":3865056,"avatar_url":"https://avatars.githubusercontent.com/u/3865056?v=3","gravatar_id":"","url":"https://api.github.com/users/frbattid","html_url":"https://github.com/frbattid","followers_url":"https://api.github.com/users/frbattid/followers","following_url":"https://api.github.com/users/frbattid/following{/other_user}","gists_url":"https://api.github.com/users/frbattid/gists{/gist_id}","starred_url":"https://api.github.com/users/frbattid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frbattid/subscriptions","organizations_url":"https://api.github.com/users/frbattid/orgs","repos_url":"https://api.github.com/users/frbattid/repos","events_url":"https://api.github.com/users/frbattid/events{/privacy}","received_events_url":"https://api.github.com/users/frbattid/received_events","type":"User","site_admin":false},"body":"decoded or encoded?\r\n\r\nIn the case it is 'encoded', what about user defined strings containing the `xffff` substring?","created_at":"2016-07-19T09:49:16Z","updated_at":"2016-07-19T09:49:16Z","html_url":"https://github.com/telefonicaid/fiware-sth-comet/pull/380#discussion_r71305610","pull_request_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/380","_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/comments/71305610"},"html":{"href":"https://github.com/telefonicaid/fiware-sth-comet/pull/380#discussion_r71305610"},"pull_request":{"href":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/380"}}},"pull_request":{"url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/380","id":77480554,"html_url":"https://github.com/telefonicaid/fiware-sth-comet/pull/380","diff_url":"https://github.com/telefonicaid/fiware-sth-comet/pull/380.diff","patch_url":"https://github.com/telefonicaid/fiware-sth-comet/pull/380.patch","issue_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues/380","number":380,"state":"open","locked":false,"title":"Inclusion of the general encoding mechanism (i.e., x12ab codes)","user":{"login":"gtorodelvalle","id":667284,"avatar_url":"https://avatars.githubusercontent.com/u/667284?v=3","gravatar_id":"","url":"https://api.github.com/users/gtorodelvalle","html_url":"https://github.com/gtorodelvalle","followers_url":"https://api.github.com/users/gtorodelvalle/followers","following_url":"https://api.github.com/users/gtorodelvalle/following{/other_user}","gists_url":"https://api.github.com/users/gtorodelvalle/gists{/gist_id}","starred_url":"https://api.github.com/users/gtorodelvalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtorodelvalle/subscriptions","organizations_url":"https://api.github.com/users/gtorodelvalle/orgs","repos_url":"https://api.github.com/users/gtorodelvalle/repos","events_url":"https://api.github.com/users/gtorodelvalle/events{/privacy}","received_events_url":"https://api.github.com/users/gtorodelvalle/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-14T15:55:02Z","updated_at":"2016-07-19T09:49:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"153cb92065d960b8e3549196ead50862b76a7635","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/380/commits","review_comments_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/380/comments","review_comment_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues/380/comments","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/statuses/07db753158d1faada36b449ae2f7ca29c23d1f5c","head":{"label":"telefonicaid:feature/general-encoding","ref":"feature/general-encoding","sha":"07db753158d1faada36b449ae2f7ca29c23d1f5c","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":30923102,"name":"fiware-sth-comet","full_name":"telefonicaid/fiware-sth-comet","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-sth-comet","description":"FIWARE Short Time Historic (STH) (aka. Comet)","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet","forks_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues/comments{/number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/releases{/id}","deployments_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/deployments","created_at":"2015-02-17T15:29:45Z","updated_at":"2016-06-21T08:20:31Z","pushed_at":"2016-07-19T08:50:38Z","git_url":"git://github.com/telefonicaid/fiware-sth-comet.git","ssh_url":"git@github.com:telefonicaid/fiware-sth-comet.git","clone_url":"https://github.com/telefonicaid/fiware-sth-comet.git","svn_url":"https://github.com/telefonicaid/fiware-sth-comet","homepage":"","size":1098,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":24,"forks":8,"open_issues":24,"watchers":6,"default_branch":"develop"}},"base":{"label":"telefonicaid:develop","ref":"develop","sha":"18a5bb14f28b4a7366cfe4ced6acdc71dc4ec23a","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":30923102,"name":"fiware-sth-comet","full_name":"telefonicaid/fiware-sth-comet","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-sth-comet","description":"FIWARE Short Time Historic (STH) (aka. Comet)","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet","forks_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues/comments{/number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/releases{/id}","deployments_url":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/deployments","created_at":"2015-02-17T15:29:45Z","updated_at":"2016-06-21T08:20:31Z","pushed_at":"2016-07-19T08:50:38Z","git_url":"git://github.com/telefonicaid/fiware-sth-comet.git","ssh_url":"git@github.com:telefonicaid/fiware-sth-comet.git","clone_url":"https://github.com/telefonicaid/fiware-sth-comet.git","svn_url":"https://github.com/telefonicaid/fiware-sth-comet","homepage":"","size":1098,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":24,"forks":8,"open_issues":24,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/380"},"html":{"href":"https://github.com/telefonicaid/fiware-sth-comet/pull/380"},"issue":{"href":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues/380"},"comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/telefonicaid/fiware-sth-comet/statuses/07db753158d1faada36b449ae2f7ca29c23d1f5c"}}}}
{"actor":{"display_login":"frbattid"}}