diff --git a/scripts/admin/acl/create-authorization.sh b/scripts/admin/acl/create-authorization.sh index cee395d97..887a1f9a0 100755 --- a/scripts/admin/acl/create-authorization.sh +++ b/scripts/admin/acl/create-authorization.sh @@ -15,7 +15,6 @@ print_usage() printf " --label LABEL Label of the authorization\n" printf " --comment COMMENT Description of the authorization (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --uri URI URI of the authorization (optional)\n" printf " --agent AGENT_URI URI of the agent (optional)\n" @@ -72,11 +71,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --uri) uri="$2" shift # past argument @@ -186,7 +180,6 @@ args+=("-t") args+=("text/turtle") # content type args+=("${container}${encoded_slug}/") -turtle+="@prefix ldh: .\n" turtle+="@prefix dh: .\n" turtle+="@prefix rdfs: .\n" turtle+="@prefix acl: .\n" @@ -203,9 +196,6 @@ turtle+="<${container}${encoded_slug}/> dct:title \"${label}\" .\n" if [ -n "$comment" ] ; then turtle+="${auth} rdfs:comment \"${comment}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="${auth} ldh:fragment \"${fragment}\" .\n" -fi for agent in "${agents[@]}" do diff --git a/scripts/admin/acl/create-group.sh b/scripts/admin/acl/create-group.sh index 788e64f67..348a2b567 100755 --- a/scripts/admin/acl/create-group.sh +++ b/scripts/admin/acl/create-group.sh @@ -15,7 +15,6 @@ print_usage() printf " --name NAME Name of the group\n" printf " --description DESCRIPTION Description of the group (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --uri URI URI of the group (optional)\n" printf " --member MEMBER_URI URI of the member agent (optional)\n" @@ -64,11 +63,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --uri) uri="$2" shift # past argument @@ -130,7 +124,6 @@ args+=("-t") args+=("text/turtle") # content type args+=("${container}${encoded_slug}/") -turtle+="@prefix ldh: .\n" turtle+="@prefix dh: .\n" turtle+="@prefix dct: .\n" turtle+="@prefix foaf: .\n" @@ -145,9 +138,6 @@ turtle+="<${container}${encoded_slug}/> dct:title \"${label}\" .\n" if [ -n "$description" ] ; then turtle+="${group} dct:description \"${description}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="${group} ldh:fragment \"${fragment}\" .\n" -fi for member in "${members[@]}" do diff --git a/scripts/admin/model/add-class.sh b/scripts/admin/model/add-class.sh index ba0cfe736..97c06c73f 100755 --- a/scripts/admin/model/add-class.sh +++ b/scripts/admin/model/add-class.sh @@ -15,7 +15,6 @@ print_usage() printf " --label LABEL Label of the class\n" printf " --comment COMMENT Description of the class (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --uri URI URI of the class (optional)\n" printf " --constructor CONSTRUCT_URI URI of the constructor CONSTRUCT query (optional)\n" @@ -68,11 +67,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --uri) uri="$2" shift # past argument @@ -143,7 +137,6 @@ args+=("$cert_password") args+=("-t") args+=("text/turtle") # content type -turtle+="@prefix ldh: .\n" turtle+="@prefix dh: .\n" turtle+="@prefix owl: .\n" turtle+="@prefix rdfs: .\n" @@ -162,9 +155,6 @@ turtle+="<${container}${encoded_slug}/> dct:title \"${label}\" .\n" if [ -n "$comment" ] ; then turtle+="${class} rdfs:comment \"${comment}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="${class} ldh:fragment \"${fragment}\" .\n" -fi if [ -n "$constructor" ] ; then turtle+="${class} spin:constructor <$constructor> .\n" fi diff --git a/scripts/admin/model/add-construct.sh b/scripts/admin/model/add-construct.sh index 20201bf11..7ca4d299e 100755 --- a/scripts/admin/model/add-construct.sh +++ b/scripts/admin/model/add-construct.sh @@ -15,7 +15,6 @@ print_usage() printf " --label LABEL Label of the query\n" printf " --comment COMMENT Description of the query (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --uri URI URI of the query (optional)\n" printf " --query-file ABS_PATH Absolute path to the text file with the SPARQL query string\n" @@ -64,11 +63,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --uri) uri="$2" shift # past argument @@ -134,7 +128,6 @@ args+=("$cert_password") args+=("-t") args+=("text/turtle") # content type -turtle+="@prefix ldh: .\n" turtle+="@prefix dh: .\n" turtle+="@prefix sp: .\n" turtle+="@prefix rdfs: .\n" @@ -152,9 +145,6 @@ turtle+="<${container}${encoded_slug}/> dct:title \"${label}\" .\n" if [ -n "$comment" ] ; then turtle+="${query} rdfs:comment \"${comment}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="${query} ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ../../post.sh "${args[@]}" \ No newline at end of file diff --git a/scripts/admin/model/add-property-constraint.sh b/scripts/admin/model/add-property-constraint.sh index cf94b345f..c89e874c5 100755 --- a/scripts/admin/model/add-property-constraint.sh +++ b/scripts/admin/model/add-property-constraint.sh @@ -15,7 +15,6 @@ print_usage() printf " --label LABEL Label of the constraint\n" printf " --comment COMMENT Description of the constraint (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --uri URI URI of the constraint (optional)\n" printf " --property PROPERTY_URI URI of the constrained property\n" @@ -64,11 +63,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --uri) uri="$2" shift # past argument @@ -151,9 +145,6 @@ turtle+="<${container}${encoded_slug}/> dct:title \"${label}\" .\n" if [ -n "$comment" ] ; then turtle+="${constraint} rdfs:comment \"${comment}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="${constraint} ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ../../post.sh "${args[@]}" \ No newline at end of file diff --git a/scripts/admin/model/add-restriction.sh b/scripts/admin/model/add-restriction.sh index 39fd67517..c7d51ab15 100755 --- a/scripts/admin/model/add-restriction.sh +++ b/scripts/admin/model/add-restriction.sh @@ -15,7 +15,6 @@ print_usage() printf " --label LABEL Label of the restriction\n" printf " --comment COMMENT Description of the restriction (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --uri URI URI of the restriction (optional)\n" printf " --on-property PROPERTY_URI URI of the restricted property (optional)\n" @@ -66,11 +65,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --uri) uri="$2" shift # past argument @@ -141,7 +135,6 @@ args+=("$cert_password") args+=("-t") args+=("text/turtle") # content type -turtle+="@prefix ldh: .\n" turtle+="@prefix dh: .\n" turtle+="@prefix owl: .\n" turtle+="@prefix rdfs: .\n" @@ -160,10 +153,6 @@ turtle+="_:item dct:title \"${label}\" .\n" if [ -n "$comment" ] ; then turtle+="${restriction} rdfs:comment \"${comment}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="${restriction} ldh:fragment \"${fragment}\" .\n" -fi - if [ -n "$on_property" ] ; then turtle+="${restriction} owl:onProperty <$on_property> .\n" fi diff --git a/scripts/admin/model/add-select.sh b/scripts/admin/model/add-select.sh index 2f95f8c01..697359fba 100755 --- a/scripts/admin/model/add-select.sh +++ b/scripts/admin/model/add-select.sh @@ -15,7 +15,6 @@ print_usage() printf " --label LABEL Label of the query\n" printf " --comment COMMENT Description of the query (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --uri URI URI of the query (optional)\n" printf " --query-file ABS_PATH Absolute path to the text file with the SPARQL query string\n" @@ -65,11 +64,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --uri) uri="$2" shift # past argument @@ -162,9 +156,6 @@ if [ -n "$service" ] ; then turtle+="@prefix ldh: .\n" turtle+="${query} ldh:service <${service}> .\n" fi -if [ -n "$fragment" ] ; then - turtle+="${query} ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ../../post.sh "${args[@]}" \ No newline at end of file diff --git a/scripts/admin/model/create-ontology.sh b/scripts/admin/model/create-ontology.sh index 2de3852f6..f6b9bcefe 100755 --- a/scripts/admin/model/create-ontology.sh +++ b/scripts/admin/model/create-ontology.sh @@ -15,7 +15,6 @@ print_usage() printf " --label LABEL Label of the ontology\n" printf " --comment COMMENT Description of the ontology (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --uri URI URI of the ontology (optional)\n" } @@ -63,11 +62,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --uri) uri="$2" shift # past argument @@ -120,7 +114,6 @@ args+=("-t") args+=("text/turtle") # content type args+=("${container}${encoded_slug}/") -turtle+="@prefix ldh: .\n" turtle+="@prefix dh: .\n" turtle+="@prefix owl: .\n" turtle+="@prefix rdfs: .\n" @@ -138,9 +131,6 @@ turtle+="<${container}${encoded_slug}/> dct:title \"${label}\" .\n" if [ -n "$comment" ] ; then turtle+="${ontology} rdfs:comment \"${comment}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="${ontology} ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ../../put.sh "${args[@]}" \ No newline at end of file diff --git a/scripts/create-generic-service.sh b/scripts/create-generic-service.sh index 28dc922f0..f6b92543c 100755 --- a/scripts/create-generic-service.sh +++ b/scripts/create-generic-service.sh @@ -15,7 +15,6 @@ print_usage() printf " --title TITLE Title of the service\n" printf " --description DESCRIPTION Description of the service (optional)\n" printf " --slug SLUG String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --endpoint ENDPOINT_URI Endpoint URI\n" printf " --graph-store GRAPH_STORE_URI Graph Store URI (optional)\n" @@ -66,11 +65,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --endpoint) endpoint="$2" shift # past argument @@ -163,9 +157,6 @@ fi if [ -n "$description" ] ; then turtle+="_:query dct:description \"${description}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="_:service ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ./put.sh "${args[@]}" \ No newline at end of file diff --git a/scripts/create-result-set-chart.sh b/scripts/create-result-set-chart.sh index ef39bc0cd..3d6e7dae1 100755 --- a/scripts/create-result-set-chart.sh +++ b/scripts/create-result-set-chart.sh @@ -15,7 +15,6 @@ print_usage() printf " --title TITLE Title of the chart\n" printf " --description DESCRIPTION Description of the chart (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --query QUERY_URI URI of the SELECT query\n" printf " --chart-type TYPE_URI URI of the chart type\n" @@ -66,11 +65,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --query) query="$2" shift # past argument @@ -167,9 +161,6 @@ turtle+="<${container}${encoded_slug}/> sioc:has_container <${container}> .\n" if [ -n "$description" ] ; then turtle+="_:chart dct:description \"${description}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="_:chart ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ./put.sh "${args[@]}" \ No newline at end of file diff --git a/scripts/create-select.sh b/scripts/create-select.sh index f58b75a7a..4fc8fa1cf 100755 --- a/scripts/create-select.sh +++ b/scripts/create-select.sh @@ -15,7 +15,6 @@ print_usage() printf " --title TITLE Title of the chart\n" printf " --description DESCRIPTION Description of the chart (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --query-file ABS_PATH Absolute path to the text file with the SPARQL query string\n" printf " --service SERVICE_URI URI of the SPARQL service specific to this query (optional)\n" @@ -64,11 +63,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --query-file) query_file="$2" shift # past argument @@ -144,9 +138,6 @@ fi if [ -n "$description" ] ; then turtle+="_:query dct:description \"${description}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="_:query ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ./put.sh "${args[@]}" \ No newline at end of file diff --git a/scripts/imports/create-csv-import.sh b/scripts/imports/create-csv-import.sh index 588a5f0ca..c111902cd 100755 --- a/scripts/imports/create-csv-import.sh +++ b/scripts/imports/create-csv-import.sh @@ -15,7 +15,6 @@ print_usage() printf " --title TITLE Title of the container\n" printf " --description DESCRIPTION Description of the container (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --query QUERY_URI URI of the CONSTRUCT mapping query\n" printf " --file FILE_URI URI of the CSV file\n" @@ -65,11 +64,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --query) query="$2" shift # past argument @@ -156,9 +150,6 @@ turtle+="<${container}${encoded_slug}/> dct:title \"${title}\" .\n" if [ -n "$description" ] ; then turtle+="_:import dct:description \"${description}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="_:import ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ../put.sh "${args[@]}" \ No newline at end of file diff --git a/scripts/imports/create-query.sh b/scripts/imports/create-query.sh index a7351ebc7..be55aeaf6 100755 --- a/scripts/imports/create-query.sh +++ b/scripts/imports/create-query.sh @@ -15,7 +15,6 @@ print_usage() printf " --title TITLE Title of the chart\n" printf " --description DESCRIPTION Description of the chart (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --query-file ABS_PATH Absolute path to the text file with the SPARQL query string\n" } @@ -63,11 +62,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --query-file) query_file="$2" shift # past argument @@ -135,9 +129,6 @@ turtle+="<${container}${encoded_slug}/> dct:title \"${title}\" .\n" if [ -n "$description" ] ; then turtle+="_:query dct:description \"${description}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="_:query ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ../put.sh "${args[@]}" \ No newline at end of file diff --git a/scripts/imports/create-rdf-import.sh b/scripts/imports/create-rdf-import.sh index e318cd5b9..862dc0022 100755 --- a/scripts/imports/create-rdf-import.sh +++ b/scripts/imports/create-rdf-import.sh @@ -15,7 +15,6 @@ print_usage() printf " --title TITLE Title of the container\n" printf " --description DESCRIPTION Description of the container (optional)\n" printf " --slug STRING String that will be used as URI path segment (optional)\n" - printf " --fragment STRING String that will be used as URI fragment identifier (optional)\n" printf "\n" printf " --query QUERY_URI URI of the CONSTRUCT mapping query (optional)\n" printf " --graph GRAPH_URI URI of the graph (optional)\n" @@ -65,11 +64,6 @@ do shift # past argument shift # past value ;; - --fragment) - fragment="$2" - shift # past argument - shift # past value - ;; --graph) graph="$2" shift # past argument @@ -153,9 +147,6 @@ fi if [ -n "$description" ] ; then turtle+="_:import dct:description \"${description}\" .\n" fi -if [ -n "$fragment" ] ; then - turtle+="_:import ldh:fragment \"${fragment}\" .\n" -fi # submit Turtle doc to the server echo -e "$turtle" | turtle --base="$base" | ../put.sh "${args[@]}" \ No newline at end of file diff --git a/src/main/java/com/atomgraph/linkeddatahub/resource/admin/oauth2/Login.java b/src/main/java/com/atomgraph/linkeddatahub/resource/admin/oauth2/Login.java index 91230d467..6f35c20c5 100644 --- a/src/main/java/com/atomgraph/linkeddatahub/resource/admin/oauth2/Login.java +++ b/src/main/java/com/atomgraph/linkeddatahub/resource/admin/oauth2/Login.java @@ -251,7 +251,7 @@ public Response get(@QueryParam("default") @DefaultValue("false") Boolean defaul userAccount.addProperty(SIOC.ACCOUNT_OF, agent); new Skolemizer(userAccountGraphUri.toString()).apply(accountModel); - Response userAccountResponse = super.post(accountModel, false, userAccountGraphUri); + Response userAccountResponse = super.put(accountModel, false, userAccountGraphUri); if (userAccountResponse.getStatus() != Response.Status.CREATED.getStatusCode()) { if (log.isErrorEnabled()) log.error("Cannot create UserAccount"); @@ -267,7 +267,7 @@ public Response get(@QueryParam("default") @DefaultValue("false") Boolean defaul URI agentUri = URI.create(agent.getURI()); // get Agent's document URI by stripping the fragment identifier from the Agent's URI URI agentGraphUri = new URI(agentUri.getScheme(), agentUri.getSchemeSpecificPart(), null).normalize(); - Response agentResponse = super.post(agentModel, false, agentGraphUri); + Response agentResponse = super.put(agentModel, false, agentGraphUri); if ((!agentExists && agentResponse.getStatus() != Response.Status.CREATED.getStatusCode()) || (agentExists && agentResponse.getStatus() != Response.Status.OK.getStatusCode())) { @@ -285,7 +285,7 @@ public Response get(@QueryParam("default") @DefaultValue("false") Boolean defaul userAccountGraphUri); new Skolemizer(authGraphUri.toString()).apply(authModel); - Response authResponse = super.post(authModel, false, authGraphUri); + Response authResponse = super.put(authModel, false, authGraphUri); if (authResponse.getStatus() != Response.Status.CREATED.getStatusCode()) { if (log.isErrorEnabled()) log.error("Cannot create Authorization");