# OpenSilex API
#
# No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
#
# OpenAPI spec version: 1.0.0-rc+2
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' @title VueJsOntologyExtension operations
#' @description opensilexClientToolsR.VueJsOntologyExtension
#'
#' @field path Stores url path of the request.
#' @field apiClient Handles the client-server communication.
#' @field userAgent Set the user agent of the request.
#'
#' @importFrom R6 R6Class
#'
#' @section Methods:
#' \describe{
#'
#' create_rdf_type Create a custom class
#'
#'
#' delete_rdf_type Delete a RDF type
#'
#'
#' get_data_types1 Return literal datatypes definition
#'
#'
#' get_object_types Return object types definition
#'
#'
#' get_rdf_type1 Return rdf type model definition with properties
#'
#'
#' get_rdf_type_properties Return class model properties definitions
#'
#'
#' get_rdf_types_parameters Return RDF types parameters for Vue.js application
#'
#'
#' set_rdf_type_properties_order Define properties order
#'
#'
#' update_rdf_type Update a custom class
#'
#' }
#'
#' @export
VueJsOntologyExtensionApi <- R6::R6Class(
'VueJsOntologyExtensionApi',
public = list(
userAgent = "Swagger-Codegen/1.0.0/r",
apiClient = NULL,
initialize = function(apiClient){
if (!missing(apiClient)) {
self$apiClient <- apiClient
}
else {
self$apiClient <- ApiClient$new()
}
},
create_rdf_type = function(body,...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToOpenSILEX")
}
#if (!missing(`authorization`)) {
# headerParams['Authorization'] <- authorization
#}
#if (!missing(`accept_language`)) {
# headerParams['Accept-Language'] <- accept_language
#}
if (!missing(`body`)) {
if(is.list(`body`)){
bodyList <- lapply(`body`, function(x){x$toJSONString()})
bodyListPaste <- paste(bodyList, collapse=', ' )
body <- paste('[',bodyListPaste,']')
}else{
body <- paste(`body`$toJSONString())
}
} else {
body <- NULL
}
urlPath <- "/vuejs/owl_extension/rdf_type"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "POST"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- ObjectUriResponse$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$metadata$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
},
delete_rdf_type = function(rdf_type,...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToOpenSILEX")
}
#if (!missing(`authorization`)) {
# headerParams['Authorization'] <- authorization
#}
#if (!missing(`accept_language`)) {
# headerParams['Accept-Language'] <- accept_language
#}
if (!missing(`rdf_type`)) {
queryParams['rdf_type'] <- rdf_type
}
urlPath <- "/vuejs/owl_extension/rdf_type"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "DELETE"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- RDFPropertyDTO$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$metadata$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
},
get_data_types1 = function(...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToOpenSILEX")
}
urlPath <- "/vuejs/owl_extension/data_types"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "GET"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- VueDataTypeDTO$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$metadata$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
},
get_object_types = function(...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToOpenSILEX")
}
urlPath <- "/vuejs/owl_extension/object_types"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "GET"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- VueObjectTypeDTO$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$metadata$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
},
get_rdf_type1 = function(rdf_type,parent_type,...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToOpenSILEX")
}
#if (!missing(`authorization`)) {
# headerParams['Authorization'] <- authorization
#}
#if (!missing(`accept_language`)) {
# headerParams['Accept-Language'] <- accept_language
#}
if (!missing(`rdf_type`)) {
queryParams['rdf_type'] <- rdf_type
}
if (!missing(`parent_type`)) {
queryParams['parentType'] <- parent_type
}
urlPath <- "/vuejs/owl_extension/rdf_type"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "GET"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- VueRDFTypeDTO$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$metadata$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
},
get_rdf_type_properties = function(rdf_type,parent_type,...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToOpenSILEX")
}
#if (!missing(`authorization`)) {
# headerParams['Authorization'] <- authorization
#}
#if (!missing(`accept_language`)) {
# headerParams['Accept-Language'] <- accept_language
#}
if (!missing(`rdf_type`)) {
queryParams['rdf_type'] <- rdf_type
}
if (!missing(`parent_type`)) {
queryParams['parent_type'] <- parent_type
}
urlPath <- "/vuejs/owl_extension/rdf_type_properties"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "GET"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- VueRDFTypeDTO$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$metadata$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
},
get_rdf_types_parameters = function(...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToOpenSILEX")
}
urlPath <- "/vuejs/owl_extension/rdf_types_parameters"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "GET"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- VueRDFTypeParameterDTO$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$metadata$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
},
set_rdf_type_properties_order = function(rdf_type,body,...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToOpenSILEX")
}
#if (!missing(`authorization`)) {
# headerParams['Authorization'] <- authorization
#}
#if (!missing(`accept_language`)) {
# headerParams['Accept-Language'] <- accept_language
#}
if (!missing(`rdf_type`)) {
queryParams['rdf_type'] <- rdf_type
}
if (!missing(`body`)) {
if(is.list(`body`)){
bodyList <- lapply(`body`, function(x){x$toJSONString()})
bodyListPaste <- paste(bodyList, collapse=', ' )
body <- paste('[',bodyListPaste,']')
}else{
body <- paste(`body`$toJSONString())
}
} else {
body <- NULL
}
urlPath <- "/vuejs/owl_extension/properties_order"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PUT",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "PUT"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- ObjectUriResponse$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$metadata$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
},
update_rdf_type = function(body,...){
args <- list(...)
queryParams <- list()
headerParams <- character()
self$apiClient$basePath = sub("/$", "",get("BASE_PATH",opensilexWSClientR:::configWS))
if(self$apiClient$basePath == ""){
stop("Wrong you must first connect with connectToOpenSILEX")
}
#if (!missing(`authorization`)) {
# headerParams['Authorization'] <- authorization
#}
#if (!missing(`accept_language`)) {
# headerParams['Accept-Language'] <- accept_language
#}
if (!missing(`body`)) {
if(is.list(`body`)){
bodyList <- lapply(`body`, function(x){x$toJSONString()})
bodyListPaste <- paste(bodyList, collapse=', ' )
body <- paste('[',bodyListPaste,']')
}else{
body <- paste(`body`$toJSONString())
}
} else {
body <- NULL
}
urlPath <- "/vuejs/owl_extension/rdf_type"
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PUT",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
method = "PUT"
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
if(method == "GET"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
data <- json$result
returnedOjects = list()
for(i in 1:nrow(data)){
row <- data[i,]
returnObject <- ObjectUriResponse$new()
returnObject$fromJSONObject(row)
returnedOjects = c(returnedOjects,returnObject)
}
return(Response$new(json$metadata,returnedOjects, resp, TRUE))
}
if(method == "POST" || method == "PUT"){
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json$metadata$datafiles, resp, TRUE))
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
json <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
return(Response$new(json$metadata, json, resp, FALSE))
}
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.