{"action":"created","comment":{"url":"https://api.github.com/repos/openmicroscopy/design/pulls/comments/61331510","id":61331510,"diff_hunk":"@@ -0,0 +1,102 @@\n+# CLI graph/tree handling\n+\n+This document scopes the extension of the OMERO Command Line Interface to\n+have a better support for trees and graphs.\n+\n+## Context\n+\n+We already introduced the CLI [obj plugin](http://www.openmicroscopy.org/site/support/omero5.2/developers/cli/obj.html) to manipulate individual objects. The generic syntax of this plugin is of\n+the form:\n+\n+    bin/omero obj subcommand  Object:id field1=value1 field2=value2 ...\n+\n+We are facing more use cases where we need to manipulate graphs and sets of \n+objects. A first implementation of such plugin has been provided in the context\n+of IDR with the [CLI children plugin](https://github.com/openmicroscopy/openmicroscopy/pull/4182).\n+\n+The current consensus is to preserve the `obj` plugin for the manipulation of\n+individual objects and design a new plugin for graph/set tasks. For now, we will use the term `tree` to refer to this new plugin.\n+\n+## Tree plugin\n+\n+This plugin could include a set of subcommands. Each subcommand could either\n+be a read operation applied to a graph specified by the `graph-spec` argument:\n+\n+    bin/omero tree read-operation graph-spec\n+\n+or a write operations applied to a `graph-spec` argument with an optional\n+`object-spec` target:\n+\n+    bin/omero tree write-operation graph-spec [obj-spec]\n+\n+## Input specification\n+\n+There are 2 proposed formats that could be supported when specifying the input\n+`graph-spec`:\n+\n+-   either stay close to the current `obj-spec` format, i.e. `Object:id`\n+-   or move towards xpath-like formats e.g. `//Image/*`, `Image[name=xxx]`, `Screen:id/*/Roi:*`\n+\n+If sticking to the first option, the proposed representation of orphaned\n+objects would be `Image:orphan`.\n+\n+## Tree subcommands\n+\n+Below is a list of proposed subcommands with use cases.\n+\n+### Link\n+\n+Move orphaned images into a dataset:\n+\n+      omero tree link Image:orphan Dataset:1\n+      omero tree link //Image:* Dataset:1\n+\n+Link images in between datasets\n+\n+    omero tree link Dataset:1 Dataset:2","path":"cli_tree.md","position":56,"original_position":56,"commit_id":"7e9b44a5a7596da53eb381e8778effc69f95eb7e","original_commit_id":"7e9b44a5a7596da53eb381e8778effc69f95eb7e","user":{"login":"manics","id":1644105,"avatar_url":"https://avatars.githubusercontent.com/u/1644105?v=3","gravatar_id":"","url":"https://api.github.com/users/manics","html_url":"https://github.com/manics","followers_url":"https://api.github.com/users/manics/followers","following_url":"https://api.github.com/users/manics/following{/other_user}","gists_url":"https://api.github.com/users/manics/gists{/gist_id}","starred_url":"https://api.github.com/users/manics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manics/subscriptions","organizations_url":"https://api.github.com/users/manics/orgs","repos_url":"https://api.github.com/users/manics/repos","events_url":"https://api.github.com/users/manics/events{/privacy}","received_events_url":"https://api.github.com/users/manics/received_events","type":"User","site_admin":false},"body":"Merge this then?","created_at":"2016-04-27T20:37:38Z","updated_at":"2016-04-27T20:37:38Z","html_url":"https://github.com/openmicroscopy/design/pull/31#discussion_r61331510","pull_request_url":"https://api.github.com/repos/openmicroscopy/design/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/design/pulls/comments/61331510"},"html":{"href":"https://github.com/openmicroscopy/design/pull/31#discussion_r61331510"},"pull_request":{"href":"https://api.github.com/repos/openmicroscopy/design/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/design/pulls/31","id":65299009,"html_url":"https://github.com/openmicroscopy/design/pull/31","diff_url":"https://github.com/openmicroscopy/design/pull/31.diff","patch_url":"https://github.com/openmicroscopy/design/pull/31.patch","issue_url":"https://api.github.com/repos/openmicroscopy/design/issues/31","number":31,"state":"open","locked":false,"title":"CLI: graph extensions","user":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"body":"Following recent discussion with @manics @ximenesuk @joshmoore @mtbc ","created_at":"2016-04-05T12:52:50Z","updated_at":"2016-04-27T20:37:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fae4ae480cef8da70b21afc1d65ae2d1a21af3a5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmicroscopy/design/pulls/31/commits","review_comments_url":"https://api.github.com/repos/openmicroscopy/design/pulls/31/comments","review_comment_url":"https://api.github.com/repos/openmicroscopy/design/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmicroscopy/design/issues/31/comments","statuses_url":"https://api.github.com/repos/openmicroscopy/design/statuses/7e9b44a5a7596da53eb381e8778effc69f95eb7e","head":{"label":"sbesson:cli_obj_design","ref":"cli_obj_design","sha":"7e9b44a5a7596da53eb381e8778effc69f95eb7e","user":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"repo":{"id":55504271,"name":"design","full_name":"sbesson/design","owner":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbesson/design","description":"","fork":true,"url":"https://api.github.com/repos/sbesson/design","forks_url":"https://api.github.com/repos/sbesson/design/forks","keys_url":"https://api.github.com/repos/sbesson/design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbesson/design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbesson/design/teams","hooks_url":"https://api.github.com/repos/sbesson/design/hooks","issue_events_url":"https://api.github.com/repos/sbesson/design/issues/events{/number}","events_url":"https://api.github.com/repos/sbesson/design/events","assignees_url":"https://api.github.com/repos/sbesson/design/assignees{/user}","branches_url":"https://api.github.com/repos/sbesson/design/branches{/branch}","tags_url":"https://api.github.com/repos/sbesson/design/tags","blobs_url":"https://api.github.com/repos/sbesson/design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbesson/design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbesson/design/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbesson/design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbesson/design/statuses/{sha}","languages_url":"https://api.github.com/repos/sbesson/design/languages","stargazers_url":"https://api.github.com/repos/sbesson/design/stargazers","contributors_url":"https://api.github.com/repos/sbesson/design/contributors","subscribers_url":"https://api.github.com/repos/sbesson/design/subscribers","subscription_url":"https://api.github.com/repos/sbesson/design/subscription","commits_url":"https://api.github.com/repos/sbesson/design/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbesson/design/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbesson/design/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbesson/design/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbesson/design/contents/{+path}","compare_url":"https://api.github.com/repos/sbesson/design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbesson/design/merges","archive_url":"https://api.github.com/repos/sbesson/design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbesson/design/downloads","issues_url":"https://api.github.com/repos/sbesson/design/issues{/number}","pulls_url":"https://api.github.com/repos/sbesson/design/pulls{/number}","milestones_url":"https://api.github.com/repos/sbesson/design/milestones{/number}","notifications_url":"https://api.github.com/repos/sbesson/design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbesson/design/labels{/name}","releases_url":"https://api.github.com/repos/sbesson/design/releases{/id}","deployments_url":"https://api.github.com/repos/sbesson/design/deployments","created_at":"2016-04-05T12:00:03Z","updated_at":"2016-04-05T12:03:39Z","pushed_at":"2016-04-27T08:27:33Z","git_url":"git://github.com/sbesson/design.git","ssh_url":"git@github.com:sbesson/design.git","clone_url":"https://github.com/sbesson/design.git","svn_url":"https://github.com/sbesson/design","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openmicroscopy:master","ref":"master","sha":"f43d50f0fdd46e837847f87993367cec4a6b8c4f","user":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"repo":{"id":49267481,"name":"design","full_name":"openmicroscopy/design","owner":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmicroscopy/design","description":"","fork":false,"url":"https://api.github.com/repos/openmicroscopy/design","forks_url":"https://api.github.com/repos/openmicroscopy/design/forks","keys_url":"https://api.github.com/repos/openmicroscopy/design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmicroscopy/design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmicroscopy/design/teams","hooks_url":"https://api.github.com/repos/openmicroscopy/design/hooks","issue_events_url":"https://api.github.com/repos/openmicroscopy/design/issues/events{/number}","events_url":"https://api.github.com/repos/openmicroscopy/design/events","assignees_url":"https://api.github.com/repos/openmicroscopy/design/assignees{/user}","branches_url":"https://api.github.com/repos/openmicroscopy/design/branches{/branch}","tags_url":"https://api.github.com/repos/openmicroscopy/design/tags","blobs_url":"https://api.github.com/repos/openmicroscopy/design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmicroscopy/design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmicroscopy/design/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmicroscopy/design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmicroscopy/design/statuses/{sha}","languages_url":"https://api.github.com/repos/openmicroscopy/design/languages","stargazers_url":"https://api.github.com/repos/openmicroscopy/design/stargazers","contributors_url":"https://api.github.com/repos/openmicroscopy/design/contributors","subscribers_url":"https://api.github.com/repos/openmicroscopy/design/subscribers","subscription_url":"https://api.github.com/repos/openmicroscopy/design/subscription","commits_url":"https://api.github.com/repos/openmicroscopy/design/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmicroscopy/design/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmicroscopy/design/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmicroscopy/design/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmicroscopy/design/contents/{+path}","compare_url":"https://api.github.com/repos/openmicroscopy/design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmicroscopy/design/merges","archive_url":"https://api.github.com/repos/openmicroscopy/design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmicroscopy/design/downloads","issues_url":"https://api.github.com/repos/openmicroscopy/design/issues{/number}","pulls_url":"https://api.github.com/repos/openmicroscopy/design/pulls{/number}","milestones_url":"https://api.github.com/repos/openmicroscopy/design/milestones{/number}","notifications_url":"https://api.github.com/repos/openmicroscopy/design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmicroscopy/design/labels{/name}","releases_url":"https://api.github.com/repos/openmicroscopy/design/releases{/id}","deployments_url":"https://api.github.com/repos/openmicroscopy/design/deployments","created_at":"2016-01-08T11:04:19Z","updated_at":"2016-04-05T11:59:54Z","pushed_at":"2016-04-27T08:27:33Z","git_url":"git://github.com/openmicroscopy/design.git","ssh_url":"git@github.com:openmicroscopy/design.git","clone_url":"https://github.com/openmicroscopy/design.git","svn_url":"https://github.com/openmicroscopy/design","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":24,"forks":2,"open_issues":24,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/design/pulls/31"},"html":{"href":"https://github.com/openmicroscopy/design/pull/31"},"issue":{"href":"https://api.github.com/repos/openmicroscopy/design/issues/31"},"comments":{"href":"https://api.github.com/repos/openmicroscopy/design/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/openmicroscopy/design/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/openmicroscopy/design/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmicroscopy/design/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/openmicroscopy/design/statuses/7e9b44a5a7596da53eb381e8778effc69f95eb7e"}}}}