[ARVADOS] updated: 1.1.1-231-g60ee2fc

Git user git at public.curoverse.com
Mon Dec 11 11:37:05 EST 2017


Summary of changes:
 .gitignore                                         |   1 -
 build/build.list                                   |   2 +-
 build/package-build-dockerfiles/centos7/Dockerfile |   2 +
 build/package-build-dockerfiles/debian8/Dockerfile |   2 +
 build/package-build-dockerfiles/debian9/Dockerfile |   2 +
 .../ubuntu1404/Dockerfile                          |   2 +
 .../ubuntu1604/Dockerfile                          |   2 +
 build/run-build-packages-all-targets.sh            |   9 +-
 build/run-build-packages-one-target.sh             |  22 +-
 build/run-build-packages.sh                        |  38 +-
 build/run-library.sh                               |  79 ++--
 sdk/R/.RData                                       | Bin 190002 -> 301821 bytes
 sdk/R/DESCRIPTION                                  |   1 +
 sdk/R/NAMESPACE                                    |   3 -
 sdk/R/R/Arvados.R                                  | 188 ++++----
 sdk/R/R/ArvadosFile.R                              |  93 ++--
 sdk/R/R/Collection.R                               | 491 +++++++++++++--------
 sdk/R/R/HttpParser.R                               |  22 +-
 sdk/R/R/HttpRequest.R                              | 190 ++++----
 sdk/R/R/Subcollection.R                            |  52 ++-
 sdk/R/R/arvados_objects.R                          |   1 -
 sdk/R/R/custom_classes.R                           |   3 -
 sdk/R/README                                       |  63 ++-
 sdk/R/man/{Arvados-class.Rd => Arvados.Rd}         |  13 +-
 sdk/R/man/ArvadosFile-class.Rd                     |  15 -
 sdk/R/man/ArvadosFile.Rd                           |  14 +
 sdk/R/man/Collection-class.Rd                      |  56 ---
 sdk/R/man/Collection.Rd                            |  17 +
 sdk/R/man/{HttrParser-class.Rd => HttpParser.Rd}   |  11 +-
 sdk/R/man/Subcollection-class.Rd                   |  15 -
 sdk/R/man/Subcollection.Rd                         |  14 +
 .../arvados => cwl/arvados_cwl}/_version.py        |   2 +-
 sdk/cwl/setup.py                                   |  30 +-
 sdk/pam/setup.py                                   |  15 +-
 sdk/python/setup.py                                |  16 +-
 services/api/app/models/arvados_model.rb           |   5 +-
 .../20161213172944_full_text_search_indexes.rb     |  21 +-
 .../api/db/migrate/20170704160233_yaml_to_json.rb  |  37 ++
 .../20170706141334_json_collection_properties.rb   |  16 +
 ....rb => 20171208203841_fix_trash_flag_follow.rb} |  58 +--
 services/api/db/structure.sql                      |  17 +-
 services/api/lib/serializers.rb                    |   5 +-
 services/api/test/unit/arvados_model_test.rb       |  20 +
 services/api/test/unit/group_test.rb               |  24 +
 services/dockercleaner/setup.py                    |  16 +-
 services/fuse/setup.py                             |  16 +-
 services/nodemanager/setup.py                      |  16 +-
 .../lib/arvbox/docker/service/composer/run-service |   2 +-
 tools/crunchstat-summary/setup.py                  |  16 +-
 49 files changed, 994 insertions(+), 761 deletions(-)
 delete mode 100644 sdk/R/R/arvados_objects.R
 delete mode 100644 sdk/R/R/custom_classes.R
 rename sdk/R/man/{Arvados-class.Rd => Arvados.Rd} (68%)
 delete mode 100644 sdk/R/man/ArvadosFile-class.Rd
 create mode 100644 sdk/R/man/ArvadosFile.Rd
 delete mode 100644 sdk/R/man/Collection-class.Rd
 create mode 100644 sdk/R/man/Collection.Rd
 rename sdk/R/man/{HttrParser-class.Rd => HttpParser.Rd} (52%)
 delete mode 100644 sdk/R/man/Subcollection-class.Rd
 create mode 100644 sdk/R/man/Subcollection.Rd
 copy sdk/{python/arvados => cwl/arvados_cwl}/_version.py (62%)
 create mode 100644 services/api/db/migrate/20170704160233_yaml_to_json.rb
 create mode 100644 services/api/db/migrate/20170706141334_json_collection_properties.rb
 copy services/api/db/migrate/{20170906224040_materialized_permission_view.rb => 20171208203841_fix_trash_flag_follow.rb} (59%)

       via  60ee2fc214c9712b1db5ad82670eadc534279685 (commit)
       via  7ff006ea5351259abe8edc89520996513652c147 (commit)
       via  7e9baf1a750d769b4d0053cfe5a67b367a40056c (commit)
       via  e050037b111e354c53d607568829abb643987d9d (commit)
       via  0e3fc1c56dc4b0aea228dc3de045e218749de2e3 (commit)
       via  266bd2c4a85eacd0d64cd7efd4f6e4658d47a523 (commit)
       via  8f987a9271eda80697b3a8fc53e7ebb0f93816f9 (commit)
       via  f873463bfea88575f98e7a36b26ffbae9aa28aa6 (commit)
       via  a9408fed05cb38d74fb60cc1c8a21bb75268ae0a (commit)
       via  2bd1ff1d4885786bf3ed838bcefb7198fcab6bc7 (commit)
       via  5be901f5813fe9d026e2aa2a6a65d4ea4da4a001 (commit)
       via  267c1a22e4b9e04ed29d1360f4e7ea6519845d12 (commit)
       via  e18cf2e1fb88278e4fb31af59e8d944576e31391 (commit)
       via  53d70abf2749de0ad0eb29eb23da6ea084202545 (commit)
       via  e3265b24845a640810d2b46a8c70c63930c3891d (commit)
       via  a0623db24a21d5971f47f9e3abfbad6eff795cc7 (commit)
       via  b5e3317470650046cbc92095d9f1f2f788563bb9 (commit)
       via  e44c8ae2f57ce98c5e64f531539b8963f1a1ff00 (commit)
       via  190b1365c4074d86ae1bb0b9b07c3626a8671fac (commit)
       via  905283aa36b36d51c2c4376489cd97b34b488104 (commit)
       via  070fed19a16ca8466d2bc9b11d6fe3a7438a3aa6 (commit)
       via  d8971ff1526d4698ee00f9fca864beed5a9d7498 (commit)
       via  f763868dd1202328576e4b393b71bb584190ee39 (commit)
       via  0c2d4c32d12de5d1d4b37db1b0ddfb97628ac33e (commit)
       via  c3fa3f1d3b71f606cbf39c23ae3a53c682b5c851 (commit)
       via  f3d83f0021e4a063924bcfdd08af77b6829a8032 (commit)
      from  f2a79e0cc9bffcbe941d9a05b78f102fa6f09d03 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 60ee2fc214c9712b1db5ad82670eadc534279685
Merge: 7ff006e 7e9baf1
Author: Fuad Muhic <fmuhic at capeannenterprises.com>
Date:   Mon Dec 11 17:36:50 2017 +0100

    Merge branch 'master' of git.curoverse.com:arvados into 11876-r-sdk
    
    Arvados-DCO-1.1-Signed-off-by: Fuad Muhic <fmuhic at capeannenterprises.com>


commit 7ff006ea5351259abe8edc89520996513652c147
Author: Fuad Muhic <fmuhic at capeannenterprises.com>
Date:   Mon Dec 11 17:34:20 2017 +0100

    Moved all classes from RefClass OOP model to R6 and made improvements
    to tree structure representing collection content.
    
    Arvados-DCO-1.1-Signed-off-by: Fuad Muhic <fmuhic at capeannenterprises.com>

diff --git a/sdk/R/.RData b/sdk/R/.RData
index 21c7024..b08e775 100644
Binary files a/sdk/R/.RData and b/sdk/R/.RData differ
diff --git a/sdk/R/DESCRIPTION b/sdk/R/DESCRIPTION
index cc46f65..b0343c7 100644
--- a/sdk/R/DESCRIPTION
+++ b/sdk/R/DESCRIPTION
@@ -11,6 +11,7 @@ Encoding: UTF-8
 LazyData: true
 RoxygenNote: 6.0.1.9000
 Imports:
+    R6,
     httr,
     stringr,
     jsonlite,
diff --git a/sdk/R/NAMESPACE b/sdk/R/NAMESPACE
index b29927f..411deb8 100644
--- a/sdk/R/NAMESPACE
+++ b/sdk/R/NAMESPACE
@@ -4,6 +4,3 @@ export(Arvados)
 export(ArvadosFile)
 export(Collection)
 export(Subcollection)
-exportClasses(ArvadosFile)
-exportClasses(Collection)
-exportClasses(Subcollection)
diff --git a/sdk/R/R/Arvados.R b/sdk/R/R/Arvados.R
index ab38763..196fcfb 100644
--- a/sdk/R/R/Arvados.R
+++ b/sdk/R/R/Arvados.R
@@ -1,6 +1,5 @@
 source("./R/HttpRequest.R")
 source("./R/HttpParser.R")
-source("./R/custom_classes.R")
 
 #' Arvados SDK Object
 #'
@@ -8,35 +7,16 @@ source("./R/custom_classes.R")
 #'
 #' @field token Token represents user authentification token.
 #' @field host Host represents server name we wish to connect to.
-#' @examples arv = Arvados("token", "host_name")
+#' @examples arv = Arvados$new("token", "host_name")
 #' @export Arvados
-Arvados <- setRefClass(
+Arvados <- R6::R6Class(
 
     "Arvados",
 
-    fields = list(
-
-        getToken          = "function",
-        getHostName       = "function",
-
-        #Todo(Fudo): This is for debug only. Remove it.
-        getWebDavToken    = "function",
-        getWebDavHostName = "function",
-        setWebDavToken    = "function",
-        setWebDavHostName = "function",
-
-        collection_get    = "function",
-        collection_list   = "function",
-        collection_create = "function",
-        collection_update = "function",
-        collection_delete = "function"
-    ),
-
-    methods = list(
+    public = list(
 
         initialize = function(auth_token = NULL, host_name = NULL) 
         {
-            # Private state
             if(!is.null(host_name))
                Sys.setenv(ARVADOS_API_HOST  = host_name)
 
@@ -49,108 +29,122 @@ Arvados <- setRefClass(
             if(host == "" | token == "")
                 stop("Please provide host name and authentification token or set ARVADOS_API_HOST and ARVADOS_API_TOKEN environmental variables.")
 
+            discoveryDocumentURL <- paste0("https://", host, "/discovery/v1/apis/arvados/v1/rest")
+
             version <- "v1"
             host  <- paste0("https://", host, "/arvados/", version, "/")
 
-            # Public methods
-            getToken <<- function() { token }
-            getHostName <<- function() { host }
+            private$http <- HttpRequest$new()
+            private$httpParser <- HttpParser$new()
+            private$token <- token
+            private$host <- host
+            
+            headers <- list(Authorization = paste("OAuth2", private$token))
+
+            serverResponse <- private$http$GET(discoveryDocumentURL, headers)
+
+            discoveryDocument <- private$httpParser$parseJSONResponse(serverResponse)
+            private$webDavHostName <- discoveryDocument$keepWebServiceUrl
+            print(private$webDavHostName)
+        },
+
+        getToken    = function() private$token,
+        getHostName = function() private$host,
 
-            #Todo(Fudo): Hardcoded credentials to WebDAV server. Remove them later
-            getWebDavToken    <<- function() { webDavToken }
-            getWebDavHostName <<- function() { webDavHostName }
-            setWebDavToken    <<- function(token) { webDavToken <<- token }
-            setWebDavHostName <<- function(hostName) { webDavHostName <<- hostName }
+        #Todo(Fudo): Hardcoded credentials to WebDAV server. Remove them later
+        getWebDavHostName = function() private$webDavHostName,
 
-            collection_get <<- function(uuid) 
-            {
-                collectionURL <- paste0(host, "collections/", uuid)
-                headers <- list(Authorization = paste("OAuth2", token))
+        getCollection = function(uuid) 
+        {
+            collectionURL <- paste0(private$host, "collections/", uuid)
+            headers <- list(Authorization = paste("OAuth2", private$token))
 
-                http <- HttpRequest() 
-                serverResponse <- http$GET(collectionURL, headers)
+            serverResponse <- private$http$GET(collectionURL, headers)
 
-                httpParser <- HttpParser()
-                collection <- httpParser$parseJSONResponse(serverResponse)
+            collection <- private$httpParser$parseJSONResponse(serverResponse)
 
-                if(!is.null(collection$errors))
-                    stop(collection$errors)       
+            if(!is.null(collection$errors))
+                stop(collection$errors)       
 
-                collection
-            }
+            collection
+        },
 
-            collection_list <<- function(filters = NULL, limit = 100, offset = 0) 
-            {
-                collectionURL <- paste0(host, "collections")
-                headers <- list(Authorization = paste("OAuth2", token))
+        listCollections = function(filters = NULL, limit = 100, offset = 0) 
+        {
+            collectionURL <- paste0(private$host, "collections")
+            headers <- list(Authorization = paste("OAuth2", private$token))
 
-                http <- HttpRequest() 
-                serverResponse <- http$GET(collectionURL, headers, NULL, filters, limit, offset)
+            serverResponse <- private$http$GET(collectionURL, headers, NULL, filters, limit, offset)
 
-                httpParser <- HttpParser()
-                collection <- httpParser$parseJSONResponse(serverResponse)
+            collection <- private$httpParser$parseJSONResponse(serverResponse)
 
-                if(!is.null(collection$errors))
-                    stop(collection$errors)       
+            if(!is.null(collection$errors))
+                stop(collection$errors)       
 
-                collection
-            }
+            collection
+        },
 
-            collection_delete <<- function(uuid) 
-            {
-                collectionURL <- paste0(host, "collections/", uuid)
-                headers <- list("Authorization" = paste("OAuth2", token),
-                                "Content-Type"  = "application/json")
+        deleteCollection = function(uuid) 
+        {
+            collectionURL <- paste0(private$host, "collections/", uuid)
+            headers <- list("Authorization" = paste("OAuth2", private$token),
+                            "Content-Type"  = "application/json")
 
-                http <- HttpRequest() 
-                serverResponse <- http$DELETE(collectionURL, headers)
+            serverResponse <- private$http$DELETE(collectionURL, headers)
 
-                httpParser <- HttpParser()
-                collection <- httpParser$parseJSONResponse(serverResponse)
+            collection <- private$httpParser$parseJSONResponse(serverResponse)
 
-                if(!is.null(collection$errors))
-                    stop(collection$errors)       
+            if(!is.null(collection$errors))
+                stop(collection$errors)       
 
-                collection
-            }
+            collection
+        },
 
-            collection_update <<- function(uuid, body) 
-            {
-                collectionURL <- paste0(host, "collections/", uuid)
-                headers <- list("Authorization" = paste("OAuth2", token),
-                                "Content-Type"  = "application/json")
-                body <- jsonlite::toJSON(body, auto_unbox = T)
+        updateCollection = function(uuid, body) 
+        {
+            collectionURL <- paste0(private$host, "collections/", uuid)
+            headers <- list("Authorization" = paste("OAuth2", private$token),
+                            "Content-Type"  = "application/json")
 
-                http <- HttpRequest() 
-                serverResponse <- http$PUT(collectionURL, headers, body)
+            body <- jsonlite::toJSON(body, auto_unbox = T)
 
-                httpParser <- HttpParser()
-                collection <- httpParser$parseJSONResponse(serverResponse)
+            serverResponse <- private$http$PUT(collectionURL, headers, body)
 
-                if(!is.null(collection$errors))
-                    stop(collection$errors)       
+            collection <- private$httpParser$parseJSONResponse(serverResponse)
 
-                collection
-            }
+            if(!is.null(collection$errors))
+                stop(collection$errors)       
 
-            collection_create <<- function(body) 
-            {
-                collectionURL <- paste0(host, "collections")
-                headers <- list("Authorization" = paste("OAuth2", token),
-                                "Content-Type"  = "application/json")
-                body <- jsonlite::toJSON(body, auto_unbox = T)
+            collection
+        },
 
-                http <- HttpRequest() 
-                serverResponse <- http$POST(collectionURL, headers, body)
+        createCollection = function(body) 
+        {
+            collectionURL <- paste0(private$host, "collections")
+            headers <- list("Authorization" = paste("OAuth2", private$token),
+                            "Content-Type"  = "application/json")
+            body <- jsonlite::toJSON(body, auto_unbox = T)
 
-                httpParser <- HttpParser()
-                collection <- httpParser$parseJSONResponse(serverResponse)
+            serverResponse <- private$http$POST(collectionURL, headers, body)
 
-                if(!is.null(collection$errors))
-                    stop(collection$errors)       
+            collection <- private$httpParser$parseJSONResponse(serverResponse)
 
-                collection
-            }
+            if(!is.null(collection$errors))
+                stop(collection$errors)       
+
+            collection
         }
-    )
+
+    ),
+    
+    private = list(
+
+        token          = NULL,
+        host           = NULL,
+        webDavHostName = NULL,
+        http           = NULL,
+        httpParser     = NULL
+    ),
+    
+    cloneable = FALSE
 )
diff --git a/sdk/R/R/ArvadosFile.R b/sdk/R/R/ArvadosFile.R
index 067e70a..f7c45dc 100644
--- a/sdk/R/R/ArvadosFile.R
+++ b/sdk/R/R/ArvadosFile.R
@@ -1,48 +1,61 @@
-source("./R/HttpRequest.R")
-#' ArvadosFile Class
-#' 
-#' @details 
-#' Todo: Update description
-#' Subcollection
-#' 
+#' ArvadosFile Object
+#'
+#' Update description
+#'
 #' @export ArvadosFile
-#' @exportClass ArvadosFile
-ArvadosFile <- setRefClass(
+ArvadosFile <- R6::R6Class(
+
     "ArvadosFile",
-    fields = list(
-        name         = "character",
-        relativePath = "character",
 
-        read = "function"
+    public = list(
+
+        initialize = function(name, relativePath, api, collection)
+        {
+            private$name         <- name
+            private$relativePath <- relativePath
+            private$api          <- api
+            private$collection   <- collection
+            private$http         <- HttpRequest$new()
+            private$httpParser   <- HttpParser$new()
+        },
 
+        getName = function() private$name,
 
-    ),
-    methods = list(
-        initialize = function(subcollectionName, api)
+        getRelativePath = function() private$relativePath,
+
+        read = function(offset = 0, length = 0)
         {
-            name <<- subcollectionName
-
-            read <<- function(offset = 0, length = 0)
-            {
-                if(offset < 0 || length < 0)
-                stop("Offset and length must be positive values.")
-
-                range = paste0("bytes=", offset, "-")
-
-                if(length > 0)
-                    range = paste0(range, offset + length - 1)
-                
-                fileURL = paste0(api$getWebDavHostName(), relativePath);
-                headers <- list(Authorization = paste("OAuth2", api$getWebDavToken()), 
-                                Range = range)
-
-                #TODO(Fudo): Move this to HttpRequest.R
-                # serverResponse <- httr::GET(url = fileURL,
-                                            # config = httr::add_headers(unlist(headers)))
-                http <- HttpRequest()
-                serverResponse <- http$GET(fileURL, headers)
-                parsed_response <- httr::content(serverResponse, "raw")
-            }
+            if(offset < 0 || length < 0)
+            stop("Offset and length must be positive values.")
+
+            range = paste0("bytes=", offset, "-")
+
+            if(length > 0)
+                range = paste0(range, offset + length - 1)
+            
+            fileURL = paste0(private$api$getWebDavHostName(), "c=", private$collection$uuid, "/", private$relativePath);
+            headers <- list(Authorization = paste("OAuth2", private$api$getToken()), 
+                            Range = range)
+
+            #TODO(Fudo): Move this to HttpRequest.R
+            # serverResponse <- httr::GET(url = fileURL,
+                                        # config = httr::add_headers(unlist(headers)))
+            serverResponse <- private$http$GET(fileURL, headers)
+            parsed_response <- httr::content(serverResponse, "raw")
+
         }
-    )
+    ),
+
+    private = list(
+
+        name         = NULL,
+        relativePath = NULL,
+        parent       = NULL,
+        api          = NULL,
+        collection   = NULL,
+        http         = NULL,
+        httpParser   = NULL
+    ),
+    
+    cloneable = FALSE
 )
diff --git a/sdk/R/R/Collection.R b/sdk/R/R/Collection.R
index 29afadc..c372bc2 100644
--- a/sdk/R/R/Collection.R
+++ b/sdk/R/R/Collection.R
@@ -1,225 +1,336 @@
-source("./R/Arvados.R")
-source("./R/HttpParser.R")
 source("./R/Subcollection.R")
 source("./R/ArvadosFile.R")
 
-#' Collection Class
-#' 
-#' @details 
-#' Todo: Update description
-#' Collection
-#' 
-#' @param uuid Object ID
-#' @param etag Object version
-#' @param owner_uuid No description
-#' @param created_at No description
-#' @param modified_by_client_uuid No description
-#' @param modified_by_user_uuid No description
-#' @param modified_at No description
-#' @param portable_data_hash No description
-#' @param replication_desired No description
-#' @param replication_confirmed_at No description
-#' @param replication_confirmed No description
-#' @param updated_at No description
-#' @param manifest_text No description
-#' @param name No description
-#' @param description No description
-#' @param properties No description
-#' @param delete_at No description
-#' @param file_names No description
-#' @param trash_at No description
-#' @param is_trashed No description
-#' 
+#' Arvados Collection Object
+#'
+#' Update description
+#'
+#' @examples arv = Collection$new(api, uuid)
 #' @export Collection
-
-#' @exportClass Collection
-Collection <- setRefClass(
+Collection <- R6::R6Class(
 
     "Collection",
 
-    fields = list(uuid                     = "ANY",
-                  items                    = "ANY",
-                  fileContent              = "ANY",
-                  etag                     = "ANY",
-                  owner_uuid               = "ANY",
-                  created_at               = "ANY",
-                  modified_by_client_uuid  = "ANY",
-                  modified_by_user_uuid    = "ANY",
-                  modified_at              = "ANY",
-                  portable_data_hash       = "ANY",
-                  replication_desired      = "ANY",
-                  replication_confirmed_at = "ANY",
-                  replication_confirmed    = "ANY",
-                  updated_at               = "ANY",
-                  manifest_text            = "ANY",
-                  name                     = "ANY",
-                  description              = "ANY",
-                  properties               = "ANY",
-                  delete_at                = "ANY",
-                  file_names               = "ANY",
-                  trash_at                 = "ANY",
-                  is_trashed               = "ANY",
-
-                  getCollectionContent = "function",
-                  get                  = "function"
-    ),
+    public = list(
 
-    methods = list(
+        #Todo(Fudo): Encapsulate this?
+        uuid                     = NULL,
+        etag                     = NULL,
+        owner_uuid               = NULL,
+        created_at               = NULL,
+        modified_by_client_uuid  = NULL,
+        modified_by_user_uuid    = NULL,
+        modified_at              = NULL,
+        portable_data_hash       = NULL,
+        replication_desired      = NULL,
+        replication_confirmed_at = NULL,
+        replication_confirmed    = NULL,
+        updated_at               = NULL,
+        manifest_text            = NULL,
+        name                     = NULL,
+        description              = NULL,
+        properties               = NULL,
+        delete_at                = NULL,
+        file_names               = NULL,
+        trash_at                 = NULL,
+        is_trashed               = NULL,
 
-        initialize = function(api, uuid) 
+        initialize = function(api, uuid)
         {
-            result <- api$collection_get(uuid)
-            
-            # Private members
-            uuid                     <<- result$uuid                               
-            etag                     <<- result$etag                               
-            owner_uuid               <<- result$owner_uuid                         
-            created_at               <<- result$created_at                         
-            modified_by_client_uuid  <<- result$modified_by_client_uuid            
-            modified_by_user_uuid    <<- result$modified_by_user_uuid              
-            modified_at              <<- result$modified_at                        
-            portable_data_hash       <<- result$portable_data_hash                 
-            replication_desired      <<- result$replication_desired                
-            replication_confirmed_at <<- result$replication_confirmed_at           
-            replication_confirmed    <<- result$replication_confirmed              
-            updated_at               <<- result$updated_at                         
-            manifest_text            <<- result$manifest_text                      
-            name                     <<- result$name                               
-            description              <<- result$description                        
-            properties               <<- result$properties                         
-            delete_at                <<- result$delete_at                          
-            file_names               <<- result$file_names                         
-            trash_at                 <<- result$trash_at                           
-            is_trashed               <<- result$is_trashed                         
-
-            # Public methods
-
-            getCollectionContent <<- function()
-            {
-                #TODO(Fudo): Use proper URL here.
-                uri <- URLencode(api$getWebDavHostName())
+            private$api <- api
+            result <- private$api$getCollection(uuid)
+
+            self$uuid                     <- result$uuid                               
+            self$etag                     <- result$etag                               
+            self$owner_uuid               <- result$owner_uuid                         
+            self$created_at               <- result$created_at                         
+            self$modified_by_client_uuid  <- result$modified_by_client_uuid            
+            self$modified_by_user_uuid    <- result$modified_by_user_uuid              
+            self$modified_at              <- result$modified_at                        
+            self$portable_data_hash       <- result$portable_data_hash                 
+            self$replication_desired      <- result$replication_desired                
+            self$replication_confirmed_at <- result$replication_confirmed_at           
+            self$replication_confirmed    <- result$replication_confirmed              
+            self$updated_at               <- result$updated_at                         
+            self$manifest_text            <- result$manifest_text                      
+            self$name                     <- result$name                               
+            self$description              <- result$description                        
+            self$properties               <- result$properties                         
+            self$delete_at                <- result$delete_at                          
+            self$file_names               <- result$file_names                         
+            self$trash_at                 <- result$trash_at                           
+            self$is_trashed               <- result$is_trashed                         
+
+            #Todo(Fudo): Replace this when you get access to webDAV server.
+            private$fileItems <- private$getCollectionContent()
 
-                # fetch directory listing via curl and parse XML response
-                h <- curl::new_handle()
-                curl::handle_setopt(h, customrequest = "PROPFIND")
+            private$fileTree <- private$generateTree(private$fileItems)
+        },
 
-                #TODO(Fudo): Use proper token here.
-                curl::handle_setheaders(h, "Authorization" = paste("OAuth2", api$getWebDavToken()))
-                response <- curl::curl_fetch_memory(uri, h)
+        printFileContent = function(pretty = TRUE)
+        {
+            if(pretty)
+                private$fileTree$printContent(0)
+            else
+                print(private$fileItems)
+
+        },
+
+        get = function(relativePath)
+        {
+            treeNode <- private$traverseInOrder(private$fileTree, function(node)
+            {
+                if(node$relativePath == relativePath)
+                    return(node)
+                else
+                    return(NULL)
+            })
 
-                HttpParser()$parseWebDAVResponse(response, uri)
+            if(!is.null(treeNode))
+            {
+                return(private$createSubcollectionTree(treeNode))
             }
+            else
+            {
+                return(NULL)
+            }
+        }
+    ),
+
+    active = list(
+        items = function(value)
+        {
+            if(missing(value))
+                return(private$fileItems)
+            else
+                print("Value is read-only.")
 
-            get <<- function(pathToTheFile)
+            return(NULL)
+        }
+    ),
+    
+    private = list(
+
+        api       = NULL,
+        fileItems = NULL,
+        fileTree  = NULL,
+
+        createSubcollectionTree = function(treeNode)
+        {
+            if(treeNode$hasChildren())
             {
-                fileWithPath <- unlist(stringr::str_split(pathToTheFile, "/"))
-                fileWithPath <- fileWithPath[fileWithPath != ""]
+                children = NULL
 
-                findFileIfExists <- function(name, node)
+                for(child in treeNode$children)
                 {
-                    matchPosition <- match(name, sapply(node$content, function(nodeInSubcollection) {nodeInSubcollection$name}), -1)
-                    if(matchPosition != -1)
-                    {
-                        return(node$content[[matchPosition]])
-                    }
-                    else
-                    {
-                        return(NULL)
-                    }
+                    child <- private$createSubcollectionTree(child)
+                    children <- c(children, child)                   
                 }
+
+                return(Subcollection$new(treeNode$name, treeNode$relativePath, children))
+            }
+            else
+            {
+                if(treeNode$type == "file")
+                    return(ArvadosFile$new(treeNode$name, treeNode$relativePath, private$api, self))
+                else if(treeNode$type == "folder" || treeNode$type == "root")
+                    return(Subcollection$new(treeNode$name, treeNode$relativePath, NULL))
+            }
+        },
+
+        createSubcollectionFromNode = function(treeNode, children)
+        {
+            subcollection = NULL
+            if(treeNode$type == "file")
+                subcollection = ArvadosFile$new(treeNode$name, treeNode$relativePath)
+            else if(treeNode$type == "folder" || treeNode$type == "root")
+                subcollection = Subcollection$new(treeNode$name, treeNode$relativePath, children)
+            
+            subcollection
+        },
+
+        getCollectionContent = function()
+        {
+            #TODO(Fudo): Use proper URL here.
+            uri <- URLencode(paste0(private$api$getWebDavHostName(), "c=", self$uuid))
+
+            # fetch directory listing via curl and parse XML response
+            h <- curl::new_handle()
+            curl::handle_setopt(h, customrequest = "PROPFIND")
+
+            #TODO(Fudo): Use proper token here.
+            curl::handle_setheaders(h, "Authorization" = paste("OAuth2", private$api$getToken()))
+            response <- curl::curl_fetch_memory(uri, h)
+            print(response)
+
+            HttpParser$new()$parseWebDAVResponse(response, uri)
+        },
+
+        #Todo(Fudo): Move tree creation to another file.
+        generateTree = function(collectionContent)
+        {
+            treeBranches <- sapply(collectionContent, function(filePath)
+            {
+                splitPath <- unlist(strsplit(filePath, "/", fixed = TRUE))
+
+                pathEndsWithSlash <- substr(filePath, nchar(filePath), nchar(filePath)) == "/"
                 
-                nodeToCheck = .self$fileContent
-                for(fileNameIndex in 1:length(fileWithPath))
+                branch = private$createBranch(splitPath, pathEndsWithSlash)      
+            })
+
+            root <- TreeNode$new("./", "root")
+            root$relativePath = ""
+
+            sapply(treeBranches, function(branch)
+            {
+                private$addNode(root, branch)
+            })
+
+            root
+        },
+
+        createBranch = function(splitPath, pathEndsWithSlash)
+        {
+            branch <- NULL
+            lastElementIndex <- length(splitPath)
+            
+            lastElementInPathType = "file"
+            if(pathEndsWithSlash)
+                lastElementInPathType = "folder"
+
+            for(elementIndex in lastElementIndex:1)
+            {
+                if(elementIndex == lastElementIndex)
+                {
+                    branch = TreeNode$new(splitPath[[elementIndex]], lastElementInPathType)
+                }
+                else
                 {
-                    nodeToCheck <- findFileIfExists(fileWithPath[fileNameIndex], nodeToCheck)
-                    if(is.null(nodeToCheck))
-                        stop("File or folder you asked for is not part of the collection.")
+                    newFolder = TreeNode$new(splitPath[[elementIndex]], "folder")
+                    newFolder$addChild(branch)
+                    branch = newFolder
                 }
 
-                nodeToCheck
+                branch$relativePath <- paste(unlist(splitPath[1:elementIndex]), collapse = "/")
             }
 
+            branch
+        },
 
-            # Private methods
-            .createCollectionContentTree <- function(fileStructure)
+        addNode = function(container, node)
+        {
+            child = container$getChild(node$name)
+
+            if(is.null(child))
             {
-                #TODO(Fudo): Refactor this.
-                #TODO(Fudo): Find a way to link children to parents. (R has no pointers or references).
-                treeBranches <- sapply(fileStructure, function(filePath)
-                {
-                    fileWithPath <- unlist(stringr::str_split(filePath, "/"))
-                    file <- fileWithPath[length(fileWithPath), drop = T]
-
-                    if(file != "")
-                    {
-                        file <- ArvadosFile(file, api)
-                        file$relativePath <- filePath
-                    }
-                    else
-                    {
-                        file <- NULL
-                    }
-
-                    folders <- fileWithPath[-length(fileWithPath)]
-
-                    subcollections <- sapply(folders, function(folder)
-                    {
-                        folder <- Subcollection(folder)
-                        unname(folder)
-                    })
-
-                    if(!is.null(file))
-                        subcollections <- c(subcollections, file)
-
-                    if(length(subcollections) > 1)
-                    {
-                        for(subcollectionIndex in 1:(length(subcollections) - 1))
-                        {
-                            subcollections[[subcollectionIndex]]$relativePath <- paste(folders[1:(subcollectionIndex)], collapse = "/")
-                            subcollections[[subcollectionIndex]]$add(subcollections[[subcollectionIndex + 1]])
-                        }
-                    }
-                    subcollections[[1]]
-                })
-
-                root <- Subcollection(".")
-
-                addIfExists <- function(firstNode, secondNode)
+                container$addChild(node)
+            }
+            else
+            {
+                private$addNode(child, node$getFirstChild())
+            }
+        },
+
+        traverseInOrder = function(node, predicate)
+        {
+            if(node$hasChildren())
+            {
+                result <- predicate(node)
+
+                if(!is.null(result))
+                    return(result)               
+
+                for(child in node$children)
                 {
-                    firstNodeContent <- sapply(firstNode$content, function(node) {node$name})
-                    if(length(firstNodeContent) == 0)
-                    {
-                        firstNode$add(secondNode)
-                        return()
-                    }
-
-                    matchPosition <- match(secondNode$name, firstNodeContent, -1)
-                    if(matchPosition != -1)
-                    {
-                        addIfExists(firstNode$content[[matchPosition]], secondNode$content[[1]])
-                    }
-                    else
-                    {
-                        firstNode$add(secondNode)
-                    }
+                    result <- private$traverseInOrder(child, predicate)
+
+                    if(!is.null(result))
+                        return(result)
                 }
 
-                sapply(treeBranches, function(branch)
-                {
-                    addIfExists(root, branch)
-                })
+                return(NULL)
+            }
+            else
+            {
+                return(predicate(node))
+            }
+        }
+
+    ),
+
+    cloneable = FALSE
+)
+
+TreeNode <- R6::R6Class(
+
+    "TreeNode",
+
+    public = list(
+
+        name = NULL,
+        relativePath = NULL,
+        children = NULL,
+        parent = NULL,
+        type = NULL,
+
+        initialize = function(name, type)
+        {
+            if(type == "folder")
+                name <- paste0(name, "/")
+
+            self$name <- name
+            self$type <- type
+            self$children <- list()
+        },
+
+        addChild = function(node)
+        {
+            self$children <- c(self$children, node)
+            node$setParent(self)
+            self
+        },
+
+        setParent = function(parent)
+        {
+            self$parent = parent
+        },
 
-                root
+        getChild = function(childName)
+        {
+            for(child in self$children)
+            {
+                if(childName == child$name)
+                    return(child)
             }
 
-            #Todo(Fudo): This is dummy data. Real content will come from WebDAV server.
-            # testFileStructure <- c("math.h", "main.cpp", "emptyFolder/",
-                                   # "java/render.java", "java/test/observer.java",
-                                   # "java/test/observable.java",
-                                   # "csharp/this.cs", "csharp/is.cs",
-                                   # "csharp/dummy.cs", "csharp/file.cs")
-            items  <<- getCollectionContent()
-            fileContent  <<- .createCollectionContentTree(items)
+            return(NULL)
+        },
+
+        hasChildren = function()
+        {
+            if(length(self$children) != 0)
+                return(TRUE)
+            else
+                return(FALSE)
+        },
+
+        getFirstChild = function()
+        {
+            if(!self$hasChildren())
+                return(NULL)
+            else
+                return(self$children[[1]])
+        },
+
+        printContent = function(depth)
+        {
+            indentation <- paste(rep("....", depth), collapse = "")
+            print(paste0(indentation, self$name))
+            
+            for(child in self$children)
+                child$printContent(depth + 1)
         }
-    )
+    ),
+
+    cloneable = FALSE
 )
diff --git a/sdk/R/R/HttpParser.R b/sdk/R/R/HttpParser.R
index fb895be..d54207e 100644
--- a/sdk/R/R/HttpParser.R
+++ b/sdk/R/R/HttpParser.R
@@ -1,35 +1,24 @@
 #' HttpParser
 #'
-HttpParser <- setRefClass(
+HttpParser <- R6::R6Class(
 
     "HttrParser",
 
-    fields = list(
-    ),
-
-    methods = list(
+    public = list(
         initialize = function() 
         {
         },
 
-        parseCollectionGet = function(serverResponse) 
-        {
-            parsed_response <- httr::content(serverResponse, as = "parsed", type = "application/json")
-
-            #Todo(Fudo): Create new Collection object and populate it
-        },
-
         parseJSONResponse = function(serverResponse) 
         {
             parsed_response <- httr::content(serverResponse, as = "parsed", type = "application/json")
-
-            #Todo(Fudo): Create new Collection object and populate it
         },
 
+        #Todo(Fudo): Test this.
         parseWebDAVResponse = function(response, uri)
         {
-            #Todo(Fudo): Move this to HttpParser.
             text <- rawToChar(response$content)
+            print(text)
             doc <- XML::xmlParse(text, asText=TRUE)
 
             # calculate relative paths
@@ -40,9 +29,8 @@ HttpParser <- setRefClass(
                 })
             )
             result <- result[result != ""]
-            #Todo(Fudo): Test this.
+
             result[-1]
         }
-
     )
 )
diff --git a/sdk/R/R/HttpRequest.R b/sdk/R/R/HttpRequest.R
index ddb8f71..ea46bea 100644
--- a/sdk/R/R/HttpRequest.R
+++ b/sdk/R/R/HttpRequest.R
@@ -1,129 +1,125 @@
-source("./R/custom_classes.R")
-
-HttpRequest <- setRefClass(
+HttpRequest <- R6::R6Class(
 
     "HttrRequest",
 
-    fields = list(
-
-        GET    = "function",
-        PUT    = "function",
-        POST   = "function",
-        DELETE = "function"
-    ),
+    public = list(
 
-    methods = list(
         initialize = function() 
         {
-            # Public methods
-            GET <<- function(url, headers = NULL, body = NULL,
-                             queryFilters = NULL, limit = NULL, offset = NULL)
-            {
-                headers <- httr::add_headers(unlist(headers))
-                query <- .createQuery(queryFilters, limit, offset)
-                url <- paste0(url, query)
-                print(url)
+        },
 
-                serverResponse <- httr::GET(url = url, config = headers)
-            }
+        GET = function(url, headers = NULL, body = NULL,
+                       queryFilters = NULL, limit = NULL, offset = NULL)
+        {
+            headers <- httr::add_headers(unlist(headers))
+            query <- private$createQuery(queryFilters, limit, offset)
+            url <- paste0(url, query)
 
-            PUT <<- function(url, headers = NULL, body = NULL,
-                             queryFilters = NULL, limit = 100, offset = 0)
-            {
-                headers <- httr::add_headers(unlist(headers))
-                query <- .createQuery(queryFilters, limit, offset)
-                url <- paste0(url, query)
+            serverResponse <- httr::GET(url = url, config = headers)
+        },
 
-                serverResponse <- httr::PUT(url = url, config = headers, body = body)
-            }
+        PUT = function(url, headers = NULL, body = NULL,
+                       queryFilters = NULL, limit = 100, offset = 0)
+        {
+            headers <- httr::add_headers(unlist(headers))
+            query <- private$createQuery(queryFilters, limit, offset)
+            url <- paste0(url, query)
 
-            POST <<- function(url, headers = NULL, body = NULL,
-                              queryFilters = NULL, limit = 100, offset = 0)
-            {
-                headers <- httr::add_headers(unlist(headers))
-                query <- .createQuery(queryFilters, limit, offset)
-                url <- paste0(url, query)
+            serverResponse <- httr::PUT(url = url, config = headers, body = body)
+        },
 
-                serverResponse <- httr::POST(url = url, config = headers, body = body)
-            }
+        POST = function(url, headers = NULL, body = NULL,
+                        queryFilters = NULL, limit = 100, offset = 0)
+        {
+            headers <- httr::add_headers(unlist(headers))
+            query <- private$createQuery(queryFilters, limit, offset)
+            url <- paste0(url, query)
 
-            DELETE <<- function(url, headers = NULL, body = NULL,
-                             queryFilters = NULL, limit = NULL, offset = NULL)
-            {
-                headers <- httr::add_headers(unlist(headers))
-                query <- .createQuery(queryFilters, limit, offset)
-                url <- paste0(url, query)
+            serverResponse <- httr::POST(url = url, config = headers, body = body)
+        },
 
-                serverResponse <- httr::DELETE(url = url, config = headers)
-            }
+        DELETE = function(url, headers = NULL, body = NULL,
+                          queryFilters = NULL, limit = NULL, offset = NULL)
+        {
+            headers <- httr::add_headers(unlist(headers))
+            query <- private$createQuery(queryFilters, limit, offset)
+            url <- paste0(url, query)
 
-            # Private methods
-            .createQuery <- function(filters, limit, offset)
-            {
-                finalQuery <- "?alt=json"
+            serverResponse <- httr::DELETE(url = url, config = headers)
+        }
+    ),
 
-                if(!is.null(filters))
-                {
-                    filters <- sapply(filters, function(filter)
-                    {
-                        if(length(filter) != 3)
-                            stop("Filter list must have exacthey 3 elements.")
+    private = list(
 
-                        attributeAndOperator = filter[c(1, 2)]
-                        filterList = filter[[3]]
-                        filterListIsPrimitive = TRUE
-                        if(length(filterList) > 1)
-                            filterListIsPrimitive = FALSE
+        #Todo(Fudo): Refactor this and find a better way to build
+        # Python array from R list (recursion?)
+        createQuery = function(filters, limit, offset)
+        {
+            finalQuery <- "?alt=json"
 
-                        attributeAndOperator <- sapply(attributeAndOperator, function(component) {
-                            component <- paste0("\"", component, "\"")
-                        })
+            if(!is.null(filters))
+            {
+                filters <- sapply(filters, function(filter)
+                {
+                    if(length(filter) != 3)
+                        stop("Filter list must have exacthey 3 elements.")
 
-                        filterList <- sapply(unlist(filterList), function(filter) {
-                            filter <- paste0("\"", filter, "\"")
-                        })
+                    attributeAndOperator = filter[c(1, 2)]
+                    filterList = filter[[3]]
+                    filterListIsPrimitive = TRUE
+                    if(length(filterList) > 1)
+                        filterListIsPrimitive = FALSE
 
-                        filterList <- paste(filterList, collapse = ",+")
+                    attributeAndOperator <- sapply(attributeAndOperator, function(component) {
+                        component <- paste0("\"", component, "\"")
+                    })
 
-                        if(!filterListIsPrimitive)
-                            filterList <- paste0("[", filterList, "]")
+                    filterList <- sapply(unlist(filterList), function(filter) {
+                        filter <- paste0("\"", filter, "\"")
+                    })
 
-                        filter <- c(attributeAndOperator, filterList)
+                    filterList <- paste(filterList, collapse = ",+")
 
-                        queryParameter <- paste(filter, collapse = ",+")
-                        queryParameter <- paste0("[", queryParameter, "]")
-            
-                    })
+                    if(!filterListIsPrimitive)
+                        filterList <- paste0("[", filterList, "]")
 
-                    filters <- paste(filters, collapse = ",+")
-                    filters <- paste0("[", filters, "]")
+                    filter <- c(attributeAndOperator, filterList)
 
-                    encodedQuery <- URLencode(filters, reserved = T, repeated = T)
+                    queryParameter <- paste(filter, collapse = ",+")
+                    queryParameter <- paste0("[", queryParameter, "]")
+        
+                })
 
-                    finalQuery <- paste0(finalQuery, "&filters=", encodedQuery)
+                filters <- paste(filters, collapse = ",+")
+                filters <- paste0("[", filters, "]")
 
-                    #Todo(Fudo): This is a hack for now. Find a proper solution.
-                    finalQuery <- stringr::str_replace_all(finalQuery, "%2B", "+")
-                }
+                encodedQuery <- URLencode(filters, reserved = T, repeated = T)
 
-                if(!is.null(limit))
-                {
-                    if(!is.numeric(limit))
-                        stop("Limit must be a numeric type.")
-                    
-                    finalQuery <- paste0(finalQuery, "&limit=", limit)
-                }
+                finalQuery <- paste0(finalQuery, "&filters=", encodedQuery)
 
-                if(!is.null(offset))
-                {
-                    if(!is.numeric(offset))
-                        stop("Offset must be a numeric type.")
-                    
-                    finalQuery <- paste0(finalQuery, "&offset=", offset)
-                }
+                #Todo(Fudo): This is a hack for now. Find a proper solution.
+                finalQuery <- stringr::str_replace_all(finalQuery, "%2B", "+")
+            }
+
+            if(!is.null(limit))
+            {
+                if(!is.numeric(limit))
+                    stop("Limit must be a numeric type.")
+                
+                finalQuery <- paste0(finalQuery, "&limit=", limit)
+            }
 
-                finalQuery
+            if(!is.null(offset))
+            {
+                if(!is.numeric(offset))
+                    stop("Offset must be a numeric type.")
+                
+                finalQuery <- paste0(finalQuery, "&offset=", offset)
             }
+
+            finalQuery
         }
-    )
+    ),
+
+    cloneable = FALSE
 )
diff --git a/sdk/R/R/Subcollection.R b/sdk/R/R/Subcollection.R
index bc986bb..4053546 100644
--- a/sdk/R/R/Subcollection.R
+++ b/sdk/R/R/Subcollection.R
@@ -1,27 +1,35 @@
-#' Subcollection Class
-#' 
-#' @details 
-#' Todo: Update description
-#' Subcollection
-#' 
+#' Arvados SubCollection Object
+#'
+#' Update description
+#'
 #' @export Subcollection
-#' @exportClass Subcollection
-Subcollection <- setRefClass(
+Subcollection <- R6::R6Class(
+
     "Subcollection",
-    fields = list(
-        name         = "character",
-        relativePath = "character",
-        content      = "list"
-    ),
-    methods = list(
-        initialize = function(subcollectionName)
+
+    public = list(
+
+        initialize = function(name, relativePath, children)
         {
-            name <<- subcollectionName
-            content <<- list()
+            private$name <- name
+            private$relativePath <- relativePath
+            private$children <- children
         },
-        add = function(subcollectionContent)
-        {
-            content <<- c(content, subcollectionContent)
-        }
-    )
+
+        getName = function() private$name,
+
+        getRelativePath = function() private$relativePath,
+
+        setParent = function(parent) private$parent <- parent
+    ),
+
+    private = list(
+
+        name = NULL,
+        relativePath = NULL,
+        children = NULL,
+        parent = NULL
+    ),
+    
+    cloneable = FALSE
 )
diff --git a/sdk/R/R/arvados_objects.R b/sdk/R/R/arvados_objects.R
deleted file mode 100644
index 8b13789..0000000
--- a/sdk/R/R/arvados_objects.R
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/sdk/R/R/custom_classes.R b/sdk/R/R/custom_classes.R
deleted file mode 100644
index 22f1f76..0000000
--- a/sdk/R/R/custom_classes.R
+++ /dev/null
@@ -1,3 +0,0 @@
-setClassUnion("characterOrNull", c("character", "NULL"))
-setClassUnion("listOrNull", c("list", "NULL"))
-setClassUnion("numericOrNull", c("numeric", "NULL"))
diff --git a/sdk/R/README b/sdk/R/README
index 0117358..6f4e31e 100644
--- a/sdk/R/README
+++ b/sdk/R/README
@@ -4,62 +4,79 @@ Examples of usage:
 
 --------------------------------------------------------------------------------------------------------------------------------
 
-Get collection:
+#Initialize API:
 
-arv <- Arvados("insert_token", "insert_host_name")
-arv$collection_get("uuid")
+arv <- Arvados$new("insert_token", "insert_host_name")
 
 --------------------------------------------------------------------------------------------------------------------------------
 
-List collections:
+#Get collection:
 
-collectionList <- arv$collection_list(list("uuid", "=" "aaaaa-bbbbb-ccccccccccccccc"), limit = 10, offset = 2)
+arv$getCollection("uuid")
 
 --------------------------------------------------------------------------------------------------------------------------------
 
-Delete collection:
+#List collections:
 
-deletedCollection <- arv$collection_delete("uuid")
+collectionList <- arv$listCollections(list("uuid", "=" "aaaaa-bbbbb-ccccccccccccccc"), limit = 10, offset = 2)
 
 --------------------------------------------------------------------------------------------------------------------------------
 
-Update collection:
+#Delete collection:
 
-updatedCollection <- arv$collection_update("uuid", list(collection = list(name = "new_name", description = "new_desciption")))
+deletedCollection <- arv$deleteCollection("uuid")
 
 --------------------------------------------------------------------------------------------------------------------------------
 
-Create collection:
+#Update collection:
 
-updatedCollection <- arv$collection_update("uuid", list(collection = list(name = "new_name", description = "new_desciption")))
+updatedCollection <- arv$updateCollection("uuid", list(collection = list(name = "new_name", description = "new_desciption")))
+
+--------------------------------------------------------------------------------------------------------------------------------
+
+#Create collection:
+
+updatedCollection <- arv$createCollection("uuid", list(collection = list(name = "new_name", description = "new_desciption")))
 
 --------------------------------------------------------------------------------------------------------------------------------
 
 --------------------------------------------------------------------------------------------------------------------------------
 
-Things I'm currently working on and are not finished.
+#Collection manipulation:
 
-Collection manipulation:
+--------------------------------------------------------------------------------------------------------------------------------
+
+--------------------------------------------------------------------------------------------------------------------------------
 
-arv <- Arvados("insert_token", "insert_host_name")
+#Create collection object:
 
-//This will be removed
-arv$setWebDavToken("webdav_token")
-arv$setWebDavHostName("full_path_to_the_collection_on_webdav_server")
+arv <- Arvados$new("insert_token", "insert_host_name")
+collection <- Collection$new(arv, "uuid")
 
-collection <- Collection(arv, "uuid")
 --------------------------------------------------------------------------------------------------------------------------------
-This will return all files in collection as character vector.
 
-listOfFilesInCollection <- collection$items
+#Print content of the collection
+
+collection$printFileContent()
+
+#of if you just want a list of relative paths:
+
+collection$printFileContent(pretty = FALSE)
+
 --------------------------------------------------------------------------------------------------------------------------------
 
-This will return ArvadosFile or Subcollection from internal tree-like structure.
+#This will return ArvadosFile or Subcollection from internal tree-like structure.
+
+arvadosFile <- collection$get("location/to/my/file.cpp")
 
-collection <- Collection(arv, "uuid")
+#or
 
-arvadosFile <- collection.get("location/to/my/file.exe")
 arvadosSubcollection <- collection.get("location/to/my/directory/")
 
+--------------------------------------------------------------------------------------------------------------------------------
+
+#Read whole file or just a portion of it.
+
+arvadosFile$read(offset = 1024, length = 512)
 
 --------------------------------------------------------------------------------------------------------------------------------
diff --git a/sdk/R/man/Arvados-class.Rd b/sdk/R/man/Arvados.Rd
similarity index 68%
rename from sdk/R/man/Arvados-class.Rd
rename to sdk/R/man/Arvados.Rd
index 315f851..6dfb0ce 100644
--- a/sdk/R/man/Arvados-class.Rd
+++ b/sdk/R/man/Arvados.Rd
@@ -1,10 +1,13 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/Arvados.R
-\docType{class}
-\name{Arvados-class}
-\alias{Arvados-class}
+\docType{data}
+\name{Arvados}
 \alias{Arvados}
 \title{Arvados SDK Object}
+\format{An object of class \code{R6ClassGenerator} of length 24.}
+\usage{
+Arvados
+}
 \description{
 All Arvados logic is inside this class
 }
@@ -16,7 +19,7 @@ All Arvados logic is inside this class
 \item{\code{host}}{Host represents server name we wish to connect to.}
 }}
 
-
 \examples{
-arv = Arvados("token", "host_name")
+arv = Arvados$new("token", "host_name")
 }
+\keyword{datasets}
diff --git a/sdk/R/man/ArvadosFile-class.Rd b/sdk/R/man/ArvadosFile-class.Rd
deleted file mode 100644
index 7d46419..0000000
--- a/sdk/R/man/ArvadosFile-class.Rd
+++ /dev/null
@@ -1,15 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/ArvadosFile.R
-\docType{class}
-\name{ArvadosFile-class}
-\alias{ArvadosFile-class}
-\alias{ArvadosFile}
-\title{ArvadosFile Class}
-\description{
-ArvadosFile Class
-}
-\details{
-Todo: Update description
-Subcollection
-}
-
diff --git a/sdk/R/man/ArvadosFile.Rd b/sdk/R/man/ArvadosFile.Rd
new file mode 100644
index 0000000..f48a71f
--- /dev/null
+++ b/sdk/R/man/ArvadosFile.Rd
@@ -0,0 +1,14 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/ArvadosFile.R
+\docType{data}
+\name{ArvadosFile}
+\alias{ArvadosFile}
+\title{ArvadosFile Object}
+\format{An object of class \code{R6ClassGenerator} of length 24.}
+\usage{
+ArvadosFile
+}
+\description{
+Update description
+}
+\keyword{datasets}
diff --git a/sdk/R/man/Collection-class.Rd b/sdk/R/man/Collection-class.Rd
deleted file mode 100644
index b84bbbd..0000000
--- a/sdk/R/man/Collection-class.Rd
+++ /dev/null
@@ -1,56 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Collection.R
-\docType{class}
-\name{Collection-class}
-\alias{Collection-class}
-\alias{Collection}
-\title{Collection Class}
-\arguments{
-\item{uuid}{Object ID}
-
-\item{etag}{Object version}
-
-\item{owner_uuid}{No description}
-
-\item{created_at}{No description}
-
-\item{modified_by_client_uuid}{No description}
-
-\item{modified_by_user_uuid}{No description}
-
-\item{modified_at}{No description}
-
-\item{portable_data_hash}{No description}
-
-\item{replication_desired}{No description}
-
-\item{replication_confirmed_at}{No description}
-
-\item{replication_confirmed}{No description}
-
-\item{updated_at}{No description}
-
-\item{manifest_text}{No description}
-
-\item{name}{No description}
-
-\item{description}{No description}
-
-\item{properties}{No description}
-
-\item{delete_at}{No description}
-
-\item{file_names}{No description}
-
-\item{trash_at}{No description}
-
-\item{is_trashed}{No description}
-}
-\description{
-Collection Class
-}
-\details{
-Todo: Update description
-Collection
-}
-
diff --git a/sdk/R/man/Collection.Rd b/sdk/R/man/Collection.Rd
new file mode 100644
index 0000000..46c76cb
--- /dev/null
+++ b/sdk/R/man/Collection.Rd
@@ -0,0 +1,17 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/Collection.R
+\docType{data}
+\name{Collection}
+\alias{Collection}
+\title{Arvados Collection Object}
+\format{An object of class \code{R6ClassGenerator} of length 24.}
+\usage{
+Collection
+}
+\description{
+Update description
+}
+\examples{
+arv = Collection$new(api, uuid)
+}
+\keyword{datasets}
diff --git a/sdk/R/man/HttrParser-class.Rd b/sdk/R/man/HttpParser.Rd
similarity index 52%
rename from sdk/R/man/HttrParser-class.Rd
rename to sdk/R/man/HttpParser.Rd
index 5a6d1c7..68d314f 100644
--- a/sdk/R/man/HttrParser-class.Rd
+++ b/sdk/R/man/HttpParser.Rd
@@ -1,11 +1,14 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/HttpParser.R
-\docType{class}
-\name{HttrParser-class}
-\alias{HttrParser-class}
+\docType{data}
+\name{HttpParser}
 \alias{HttpParser}
 \title{HttpParser}
+\format{An object of class \code{R6ClassGenerator} of length 24.}
+\usage{
+HttpParser
+}
 \description{
 HttpParser
 }
-
+\keyword{datasets}
diff --git a/sdk/R/man/Subcollection-class.Rd b/sdk/R/man/Subcollection-class.Rd
deleted file mode 100644
index 72449fa..0000000
--- a/sdk/R/man/Subcollection-class.Rd
+++ /dev/null
@@ -1,15 +0,0 @@
-% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/Subcollection.R
-\docType{class}
-\name{Subcollection-class}
-\alias{Subcollection-class}
-\alias{Subcollection}
-\title{Subcollection Class}
-\description{
-Subcollection Class
-}
-\details{
-Todo: Update description
-Subcollection
-}
-
diff --git a/sdk/R/man/Subcollection.Rd b/sdk/R/man/Subcollection.Rd
new file mode 100644
index 0000000..e644e02
--- /dev/null
+++ b/sdk/R/man/Subcollection.Rd
@@ -0,0 +1,14 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/Subcollection.R
+\docType{data}
+\name{Subcollection}
+\alias{Subcollection}
+\title{Arvados SubCollection Object}
+\format{An object of class \code{R6ClassGenerator} of length 24.}
+\usage{
+Subcollection
+}
+\description{
+Update description
+}
+\keyword{datasets}

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list