jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject svn commit: r1499466 - in /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena: sparql/algebra/optimize/Optimize.java sparql/modify/UpdateProcessRemote.java sparql/modify/UpdateProcessRemoteForm.java update/UpdateExecutionFactory.java
Date Wed, 03 Jul 2013 16:31:23 GMT
Author: rvesse
Date: Wed Jul  3 16:31:23 2013
New Revision: 1499466

URL: http://svn.apache.org/r1499466
Log:
Add overloads for UpdateExecutionFactory.createRemote() and createRemoteForm() that take HttpAuthenticator
(JENA-480)

Modified:
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteForm.java
    jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/update/UpdateExecutionFactory.java

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java?rev=1499466&r1=1499465&r2=1499466&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java
(original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/algebra/optimize/Optimize.java
Wed Jul  3 16:31:23 2013
@@ -146,7 +146,7 @@ public class Optimize implements Rewrite
         // ** TransformScopeRename::
         // This is a requirement for the linearization execution that the default
         // ARQ query engine uses where possible.  
-        // This transformation must be done (e.g. by QueryEngineBase) if no other optimziation
is done. 
+        // This transformation must be done (e.g. by QueryEngineBase) if no other optimization
is done. 
         op = TransformScopeRename.transform(op) ;
         
         // Remove "group of one" join

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java?rev=1499466&r1=1499465&r2=1499466&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java
(original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java
Wed Jul  3 16:31:23 2013
@@ -18,6 +18,7 @@
 
 package com.hp.hpl.jena.sparql.modify;
 
+import org.apache.jena.atlas.web.auth.HttpAuthenticator;
 import org.apache.jena.riot.WebContent ;
 import org.apache.jena.riot.web.HttpOp ;
 
@@ -41,6 +42,19 @@ public class UpdateProcessRemote extends
     {
         super(request, endpoint, context);
     }
+    
+    /**
+     * Creates a new remote update processor that uses the application/sparql-update submission
method
+     * @param request Update request
+     * @param endpoint Update endpoint
+     * @param context Context
+     * @param authenticator HTTP Authenticator
+     */
+    public UpdateProcessRemote(UpdateRequest request, String endpoint, Context context, HttpAuthenticator
authenticator)
+    {
+        this(request, endpoint, context);
+        this.setAuthenticator(authenticator);
+    }
 
     @Override
     public void execute()

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteForm.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteForm.java?rev=1499466&r1=1499465&r2=1499466&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteForm.java
(original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteForm.java
Wed Jul  3 16:31:23 2013
@@ -18,6 +18,7 @@
 
 package com.hp.hpl.jena.sparql.modify;
 
+import org.apache.jena.atlas.web.auth.HttpAuthenticator;
 import org.apache.jena.riot.web.HttpOp ;
 import org.apache.jena.riot.web.HttpResponseLib ;
 
@@ -45,6 +46,19 @@ public class UpdateProcessRemoteForm ext
     {
         super(request, endpoint, context);
     }
+    
+    /**
+     * Creates a new remote update processor that uses the form URL encoded submission method
+     * @param request Update request
+     * @param endpoint Update endpoint
+     * @param context Context
+     * @param authenticator HTTP Authenticator
+     */
+    public UpdateProcessRemoteForm(UpdateRequest request , String endpoint, Context context,
HttpAuthenticator authenticator)
+    {
+        this(request, endpoint, context);
+        this.setAuthenticator(authenticator);
+    }
 
     @Override
     public void execute()

Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/update/UpdateExecutionFactory.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/update/UpdateExecutionFactory.java?rev=1499466&r1=1499465&r2=1499466&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/update/UpdateExecutionFactory.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/update/UpdateExecutionFactory.java Wed
Jul  3 16:31:23 2013
@@ -18,6 +18,8 @@
 
 package com.hp.hpl.jena.update;
 
+import org.apache.jena.atlas.web.auth.HttpAuthenticator;
+
 import com.hp.hpl.jena.query.ARQ ;
 import com.hp.hpl.jena.sparql.modify.UpdateEngineFactory ;
 import com.hp.hpl.jena.sparql.modify.UpdateEngineRegistry ;
@@ -118,78 +120,178 @@ public class UpdateExecutionFactory
     
     
     /** Create an UpdateProcessor that send the update to a remote SPARQL Update service.
-     * @param update
-     * @param remoteEndpoint
+     * @param update Updates
+     * @param remoteEndpoint Endpoint URL
+     * @return Remote Update processor
      */
     public static UpdateProcessor createRemote(Update update, String remoteEndpoint)
     {
-        return createRemote(update, remoteEndpoint, null) ;
+        return createRemote(new UpdateRequest(update), remoteEndpoint, null, null) ;
     }
     
     /** Create an UpdateProcessor that send the update to a remote SPARQL Update service.
-     * @param update
-     * @param remoteEndpoint
-     * @param context
+     * @param update Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param authenticator HTTP Authenticator
+     * @return Remote Update processor
+     */
+    public static UpdateProcessor createRemote(Update update, String remoteEndpoint, HttpAuthenticator
authenticator)
+    {
+        return createRemote(new UpdateRequest(update), remoteEndpoint, null, authenticator)
;
+    }
+    
+    /** Create an UpdateProcessor that send the update to a remote SPARQL Update service.
+     * @param update Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param context Context
+     * @return Remote Update processor
      */
     public static UpdateProcessor createRemote(Update update, String remoteEndpoint, Context
context)
     {
-        return createRemote(new UpdateRequest(update), remoteEndpoint, context) ;
+        return createRemote(new UpdateRequest(update), remoteEndpoint, context, null) ;
     }
     
+    /** Create an UpdateProcessor that send the update to a remote SPARQL Update service.
+     * @param update Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param context Context
+     * @param authenticator HTTP Authenticator
+     * @return Remote Update processor
+     */
+    public static UpdateProcessor createRemote(Update update, String remoteEndpoint, Context
context, HttpAuthenticator authenticator)
+    {
+        return createRemote(new UpdateRequest(update), remoteEndpoint, context, authenticator)
;
+    }
+        
     /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service.
-     * @param updateRequest
-     * @param remoteEndpoint
+     * @param updateRequest Updates
+     * @param remoteEndpoint Endpoint URL
+     * @return Remote Update processor
      */
     public static UpdateProcessor createRemote(UpdateRequest updateRequest, String remoteEndpoint)
     {
-        return new UpdateProcessRemote(updateRequest, remoteEndpoint, null) ;
+        return createRemote(updateRequest, remoteEndpoint, null, null) ;
+    }
+    
+    /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service.
+     * @param updateRequest Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param authenticator HTTP Authenticator
+     * @return Remote Update processor
+     */
+    public static UpdateProcessor createRemote(UpdateRequest updateRequest, String remoteEndpoint,
HttpAuthenticator authenticator)
+    {
+        return createRemote(updateRequest, remoteEndpoint, null, authenticator) ;
     }
 
     /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service.
-     * @param updateRequest
-     * @param remoteEndpoint
-     * @param context
+     * @param updateRequest Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param context Context
+     * @return Remote Update processor
      */
     public static UpdateProcessor createRemote(UpdateRequest updateRequest, String remoteEndpoint,
Context context)
     {
-        return new UpdateProcessRemote(updateRequest, remoteEndpoint, context) ;
+        return createRemote(updateRequest, remoteEndpoint, context, null) ;
+    }
+    
+    /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service.
+     * @param updateRequest Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param context Context
+     * @param authenticator HTTP Authenticator
+     * @return Remote Update processor
+     */
+    public static UpdateProcessor createRemote(UpdateRequest updateRequest, String remoteEndpoint,
Context context, HttpAuthenticator authenticator)
+    {
+        return new UpdateProcessRemote(updateRequest, remoteEndpoint, context, authenticator)
;
     }
     
     /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service using an HTML form
-     * @param update
-     * @param remoteEndpoint
+     * @param update Updates
+     * @param remoteEndpoint Endpoint URL
+     * @return Remote Update processor
      */
     public static UpdateProcessor createRemoteForm(Update update, String remoteEndpoint)
     {
-        return createRemoteForm(update, remoteEndpoint, null) ;
+        return createRemoteForm(update, remoteEndpoint, null, null) ;
     }
     
     /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service using an HTML form
-     * @param update
-     * @param remoteEndpoint
-     * @param context
+     * @param update Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param authenticator HTTP Authenticator
+     * @return Remote Update processor
+     */
+    public static UpdateProcessor createRemoteForm(Update update, String remoteEndpoint,
HttpAuthenticator authenticator)
+    {
+        return createRemoteForm(update, remoteEndpoint, null, null) ;
+    }
+    
+    /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service using an HTML form
+     * @param update Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param context Context
+     * @return Remote Update processor
      */
     public static UpdateProcessor createRemoteForm(Update update, String remoteEndpoint,
Context context)
     {
-        return new UpdateProcessRemoteForm(new UpdateRequest(update), remoteEndpoint, null)
;
+        return createRemoteForm(new UpdateRequest(update), remoteEndpoint, null, null) ;
     }
     
     /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service using an HTML form
-     * @param updateRequest
-     * @param remoteEndpoint
+     * @param update Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param context Context
+     * @param authenticator HTTP Authenticator
+     * @return Remote Update processor
+     */
+    public static UpdateProcessor createRemoteForm(Update update, String remoteEndpoint,
Context context, HttpAuthenticator authenticator)
+    {
+        return createRemoteForm(new UpdateRequest(update), remoteEndpoint, null, authenticator)
;
+    }
+    
+    /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service using an HTML form
+     * @param updateRequest Updates
+     * @param remoteEndpoint Endpoint URL
+     * @return Remote Update processor
      */
     public static UpdateProcessor createRemoteForm(UpdateRequest updateRequest, String remoteEndpoint)
     {
-        return createRemoteForm(updateRequest, remoteEndpoint, null) ;
+        return createRemoteForm(updateRequest, remoteEndpoint, null, null) ;
     }
     
     /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service using an HTML form
-     * @param updateRequest
-     * @param remoteEndpoint
-     * @param context
+     * @param updateRequest Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param authenticator HTTP Authenticator
+     * @return Remote Update processor
+     */
+    public static UpdateProcessor createRemoteForm(UpdateRequest updateRequest, String remoteEndpoint,
HttpAuthenticator authenticator)
+    {
+        return createRemoteForm(updateRequest, remoteEndpoint, null, authenticator) ;
+    }
+    
+    /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service using an HTML form
+     * @param updateRequest Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param context Context
+     * @return Remote Update processor
      */
     public static UpdateProcessor createRemoteForm(UpdateRequest updateRequest, String remoteEndpoint,
Context context)
     {
         return new UpdateProcessRemoteForm(updateRequest, remoteEndpoint, context) ;
     }
+    
+    /** Create an UpdateProcessor that send the update request to a remote SPARQL Update
service using an HTML form
+     * @param updateRequest Updates
+     * @param remoteEndpoint Endpoint URL
+     * @param context Context
+     * @param authenticator HTTP Authenticator
+     * @return Remote Update processor
+     */
+    public static UpdateProcessor createRemoteForm(UpdateRequest updateRequest, String remoteEndpoint,
Context context, HttpAuthenticator authenticator)
+    {
+        return new UpdateProcessRemoteForm(updateRequest, remoteEndpoint, context, authenticator)
;
+    }
 }



Mime
View raw message