jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [05/51] [partial] jena git commit: Rename com.hp.hpl.jena.* as org.apache.jena.*
Date Thu, 23 Apr 2015 19:56:21 GMT
http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineNonStreaming.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineNonStreaming.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineNonStreaming.java
deleted file mode 100644
index d986df3..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineNonStreaming.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.modify.request.UpdateVisitor ;
-import com.hp.hpl.jena.sparql.util.Context ;
-import com.hp.hpl.jena.update.GraphStore ;
-import com.hp.hpl.jena.update.Update ;
-import com.hp.hpl.jena.update.UpdateRequest ;
-
-/**
- * Example implementation of an update engine that does not stream data, instead it will build it up into an
- * in-memory UpdateRequest, and then traverse it after all update operations have finished.
- */
-public class UpdateEngineNonStreaming extends UpdateEngineMain
-{
-    // This is the internal accumulator of update operations.
-    // It is used to accumulate Updates so as not to alter
-    // the UpdateRequest at the application level.
-    protected final UpdateRequest accRequests ;
-    protected final UpdateSink    updateSink ;
-    
-    /**
-     * Creates a new Update Engine
-     * @param graphStore Graph Store the updates operate over
-     * @param inputBinding Initial binding to be applied to Update operations that can apply an initial binding (i.e. UpdateDeleteWhere, UpdateModify)
-     * @param context Execution Context
-     */
-    public UpdateEngineNonStreaming(GraphStore graphStore, Binding inputBinding, Context context)
-    {
-        super(graphStore, inputBinding, context) ;
-        accRequests = new UpdateRequest();
-        updateSink = new UpdateRequestSink(accRequests)
-        {
-            @Override
-            public void close()
-            {
-                // Override the close() method to call execute() when we're done accepting update operations
-                super.close();
-                execute();
-            }
-        } ;
-    }
-
-    @Override
-    public void startRequest()
-    {
-        graphStore.startRequest() ;
-    }
-    
-    @Override
-    public void finishRequest()
-    {
-        graphStore.finishRequest();
-    }
-    
-    /**
-     * Returns an {@link UpdateSink} that adds all update operations into an internal {@link UpdateRequest} object.
-     * After the last update operation has been added, the {@link #execute()} method is called.
-     */
-    @Override
-    public UpdateSink getUpdateSink() { return updateSink ; }
-    
-    /**
-     * Called after all of the update operations have been added to {@link #accRequests}.
-     */
-    protected void execute()
-    {
-        UpdateVisitor worker = this.prepareWorker() ;
-        for ( Update up : accRequests )
-        {
-            up.visit(worker) ;
-        }
-    }
-    
-    private static UpdateEngineFactory factory = new UpdateEngineFactory()
-    {
-        @Override
-        public boolean accept(GraphStore graphStore, Context context)
-        {
-            return true ;
-        }
-        
-        @Override
-        public UpdateEngine create(GraphStore graphStore, Binding inputBinding, Context context)
-        {
-            return new UpdateEngineNonStreaming(graphStore, inputBinding, context);
-        }
-    } ;
-
-    public static UpdateEngineFactory getFactory() { return factory ; }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineRegistry.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineRegistry.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineRegistry.java
deleted file mode 100644
index f4d91df..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineRegistry.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import java.util.ArrayList ;
-import java.util.List ;
-
-import com.hp.hpl.jena.sparql.util.Context ;
-import com.hp.hpl.jena.update.GraphStore ;
-
-public class UpdateEngineRegistry
-{
-    List<UpdateEngineFactory> factories = new ArrayList<>() ;
-    static { init() ; }
-    
-    // Singleton
-    static UpdateEngineRegistry registry = null ;
-    static public UpdateEngineRegistry get()
-    { 
-        if ( registry == null )
-            init() ;
-        return registry;
-    }
-    
-    private UpdateEngineRegistry() { }
-    
-    private static synchronized void init()
-    {
-        registry = new UpdateEngineRegistry() ;
-        registry.add(UpdateEngineMain.getFactory()) ;
-    }
-    
-    /** Locate a suitable factory for this dataset from the default registry
-     * 
-     * @param graphStore The graph store
-     * @return A QueryExecutionFactory or null if none accept the request
-     */
-    public static UpdateEngineFactory findFactory(GraphStore graphStore, Context context)
-    { return get().find(graphStore, context) ; }
-    
-    /** Locate a suitable factory for this dataset
-     * 
-     * @param graphStore    A GraphStore
-     * @return A UpdateProcessorFactroy or null if none accept the request
-     */
-    public UpdateEngineFactory find(GraphStore graphStore, Context context)
-    {
-        for ( UpdateEngineFactory f : factories )
-        {
-            if ( f.accept(graphStore, context) )
-                return f ;
-        }
-        return null ;
-    }
-    
-    /** Add a QueryExecutionFactory to the default registry */
-    public static void addFactory(UpdateEngineFactory f) { get().add(f) ; }
-    
-    /** Add a QueryExecutionFactory */
-    public void add(UpdateEngineFactory f)
-    {
-        // Add to low end so that newer factories are tried first
-        factories.add(0, f) ; 
-    }
-    
-    /** Remove a QueryExecutionFactory */
-    public static void removeFactory(UpdateEngineFactory f)  { get().remove(f) ; }
-    
-    /** Remove a QueryExecutionFactory */
-    public void remove(UpdateEngineFactory f)  { factories.remove(f) ; }
-    
-    /** Allow <b>careful</b> manipulation of the factories list */
-    public List<UpdateEngineFactory> factories() { return factories ; }
-
-    /** Check whether a query engine factory is already registered in the default registry*/
-    public static boolean containsFactory(UpdateEngineFactory f) { return get().contains(f) ; }
-
-    /** Check whether a query engine factory is already registered */
-    public boolean contains(UpdateEngineFactory f) { return factories.contains(f) ; }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineWorker.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineWorker.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineWorker.java
deleted file mode 100644
index 061feb8..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateEngineWorker.java
+++ /dev/null
@@ -1,639 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import static com.hp.hpl.jena.sparql.modify.TemplateLib.template ;
-
-import java.util.Iterator ;
-import java.util.List ;
-
-import org.apache.jena.atlas.data.BagFactory ;
-import org.apache.jena.atlas.data.DataBag ;
-import org.apache.jena.atlas.data.ThresholdPolicy ;
-import org.apache.jena.atlas.data.ThresholdPolicyFactory ;
-import org.apache.jena.atlas.iterator.Iter ;
-import org.apache.jena.atlas.lib.Sink ;
-import org.apache.jena.atlas.web.TypedInputStream ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.riot.RDFLanguages ;
-import org.apache.jena.riot.system.SerializationFactoryFinder ;
-import org.apache.jena.riot.system.StreamRDF ;
-import org.apache.jena.riot.system.StreamRDFLib ;
-
-import com.hp.hpl.jena.graph.Graph ;
-import com.hp.hpl.jena.graph.GraphUtil ;
-import com.hp.hpl.jena.graph.Node ;
-import com.hp.hpl.jena.graph.Triple ;
-import com.hp.hpl.jena.query.Query ;
-import com.hp.hpl.jena.query.QueryExecutionFactory ;
-import com.hp.hpl.jena.sparql.ARQInternalErrorException ;
-import com.hp.hpl.jena.sparql.SystemARQ ;
-import com.hp.hpl.jena.sparql.core.* ;
-import com.hp.hpl.jena.sparql.engine.Plan ;
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.engine.binding.BindingRoot ;
-import com.hp.hpl.jena.sparql.graph.GraphFactory ;
-import com.hp.hpl.jena.sparql.graph.GraphOps ;
-import com.hp.hpl.jena.sparql.graph.NodeTransform ;
-import com.hp.hpl.jena.sparql.graph.NodeTransformLib ;
-import com.hp.hpl.jena.sparql.modify.request.* ;
-import com.hp.hpl.jena.sparql.syntax.Element ;
-import com.hp.hpl.jena.sparql.syntax.ElementGroup ;
-import com.hp.hpl.jena.sparql.syntax.ElementNamedGraph ;
-import com.hp.hpl.jena.sparql.syntax.ElementTriplesBlock ;
-import com.hp.hpl.jena.sparql.util.Context ;
-import com.hp.hpl.jena.update.GraphStore ;
-import com.hp.hpl.jena.update.UpdateException ;
-
-/** Implementation of general purpose update request execution */ 
-public class UpdateEngineWorker implements UpdateVisitor
-{
-    protected final GraphStore graphStore ;
-    protected final boolean alwaysSilent = true ;
-    protected final Binding inputBinding;  // Used for UpdateModify and UpdateDeleteWhere only
-    protected final Context context ;
-
-    public UpdateEngineWorker(GraphStore graphStore, Binding inputBinding, Context context)
-    {
-        this.graphStore = graphStore ;
-        this.inputBinding = inputBinding ;
-        this.context = context ;
-    }
-
-    @Override
-    public void visit(UpdateDrop update)
-    { execDropClear(update, false) ; }
-
-    @Override
-    public void visit(UpdateClear update)
-    { execDropClear(update, true) ; }
-
-    protected void execDropClear(UpdateDropClear update, boolean isClear)
-    {
-        if ( update.isAll() )
-        {
-            execDropClear(update, null, true) ;    // Always clear.
-            execDropClearAllNamed(update, isClear) ;
-        }
-        else if ( update.isAllNamed() )
-            execDropClearAllNamed(update, isClear) ;
-        else if ( update.isDefault() )
-            execDropClear(update, null, true) ;
-        else if ( update.isOneGraph() )
-            execDropClear(update, update.getGraph(), isClear) ;
-        else
-            throw new ARQInternalErrorException("Target is undefined: "+update.getTarget()) ;
-    }
-
-    protected void execDropClear(UpdateDropClear update, Node g, boolean isClear)
-    {
-        if ( ! alwaysSilent )
-        {
-            if ( g != null && ! graphStore.containsGraph(g) && ! update.isSilent())
-                error("No such graph: "+g) ;
-        }
-        
-        if ( isClear )
-        {
-            if ( g == null || graphStore.containsGraph(g) )
-                graph(graphStore, g).clear() ;
-        }
-        else
-            graphStore.removeGraph(g) ;
-    }
-
-    protected void execDropClearAllNamed(UpdateDropClear update, boolean isClear)
-    {
-        // Avoid ConcurrentModificationException
-        List<Node> list = Iter.toList(graphStore.listGraphNodes()) ;
-        
-        for ( Node gn : list )
-            execDropClear(update, gn, isClear) ;
-    }
-
-    @Override
-    public void visit(UpdateCreate update)
-    {
-        Node g = update.getGraph() ;
-        if ( g == null )
-            return ;
-        if ( graphStore.containsGraph(g) )
-        {
-            if ( ! alwaysSilent && ! update.isSilent() )
-                error("Graph store already contains graph : "+g) ;
-            return ;
-        }
-        // In-memory specific 
-        graphStore.addGraph(g, GraphFactory.createDefaultGraph()) ;
-    }
-
-    @Override
-    public void visit(UpdateLoad update)
-    {
-        String source = update.getSource() ;
-        Node dest = update.getDest() ;
-        try {
-            // Read into temporary storage to protect against parse errors.
-            TypedInputStream s = RDFDataMgr.open(source) ;
-            Lang lang = RDFDataMgr.determineLang(source, s.getContentType(), null) ;
-            
-            if ( RDFLanguages.isTriples(lang) ) {
-                // Triples
-                Graph g = GraphFactory.createGraphMem() ;
-                StreamRDF stream = StreamRDFLib.graph(g) ;
-                RDFDataMgr.parse(stream, s, source) ;
-                Graph g2 = graph(graphStore, dest) ;
-                GraphUtil.addInto(g2, g) ;
-            } else {
-                // Quads
-                if ( dest != null )
-                    throw new UpdateException("Attempt to load quads into a graph") ;
-                DatasetGraph dsg = DatasetGraphFactory.createMem() ;
-                StreamRDF stream = StreamRDFLib.dataset(dsg) ;
-                RDFDataMgr.parse(stream, s, source) ;
-                Iterator<Quad>  iter = dsg.find() ; 
-                for ( ; iter.hasNext() ; )
-                {
-                    Quad q = iter.next() ;
-                    graphStore.add(q) ;
-                }
-            }
-        } catch (RuntimeException ex)
-        {
-            if ( ! update.getSilent() )
-            {
-                if ( ex instanceof UpdateException )
-                    throw (UpdateException)ex ;  
-                throw new UpdateException("Failed to LOAD '"+source+"'", ex) ;
-            }
-        }
-    }
-    
-    @Override
-    public void visit(UpdateAdd update)
-    { 
-        if ( ! validBinaryGraphOp(update) ) return ;
-        if ( update.getSrc().equals(update.getDest()) )
-            return ;
-        //  ADD (DEFAULT or GRAPH) TO (DEFAULT or GRAPH)
-        // Different source and destination.
-        gsCopyTriples(graphStore, update.getSrc(), update.getDest()) ;
-    }
-
-    @Override
-    public void visit(UpdateCopy update)
-    { 
-        if ( ! validBinaryGraphOp(update) ) return ;
-        if ( update.getSrc().equals(update.getDest()) )
-            return ;
-        // COPY (DEFAULT or GRAPH) TO (DEFAULT or GRAPH) 
-        gsCopy(graphStore, update.getSrc(), update.getDest(), update.getSilent()) ;
-    }
-
-    @Override
-    public void visit(UpdateMove update)
-    { 
-        if ( ! validBinaryGraphOp(update) ) return ;
-        if ( update.getSrc().equals(update.getDest()) )
-            return ;
-        // MOVE (DEFAULT or GRAPH) TO (DEFAULT or GRAPH)
-        // Difefrent source and destination.
-        gsCopy(graphStore, update.getSrc(), update.getDest(), update.getSilent()) ;
-        gsDrop(graphStore, update.getSrc(), true) ;
-    }
-
-    private boolean validBinaryGraphOp(UpdateBinaryOp update)
-    {
-        if ( update.getSrc().isDefault() )
-            return true ;
-        
-        if ( update.getSrc().isOneNamedGraph() )
-        {
-            Node gn =  update.getSrc().getGraph() ;
-            if ( ! graphStore.containsGraph(gn) )
-            {
-                if ( ! update.getSilent() )
-                    error("No such graph: "+gn) ;
-                return false ;
-            }
-            return true ;
-        }
-        error("Invalid source target for oepration; "+update.getSrc()) ;
-        return false ;
-    }
-
-    // ----
-    // Core operations
-    
-    protected static void gsCopy(GraphStore gStore, Target src, Target dest, boolean isSilent)
-    {
-        if ( dest.equals(src) ) 
-            return ;
-        gsClear(gStore, dest, true) ;
-        gsCopyTriples(gStore, src, dest) ;
-    }
-
-    protected static void gsCopyTriples(GraphStore gStore, Target src, Target dest)
-    {
-        Graph gSrc = graph(gStore, src) ;
-        Graph gDest = graph(gStore, dest) ;
-        
-        // Avoids concurrency problems by reading fully before writing
-        ThresholdPolicy<Triple> policy = ThresholdPolicyFactory.policyFromContext(gStore.getContext());
-        DataBag<Triple> db = BagFactory.newDefaultBag(policy, SerializationFactoryFinder.tripleSerializationFactory()) ;
-        try
-        {
-            Iterator<Triple> triples = gSrc.find(null, null, null) ;
-            db.addAll(triples) ;
-            Iter.close(triples) ;
-            GraphOps.addAll(gDest, db.iterator()) ;
-        }
-        finally { db.close() ; }
-    }
-
-    protected static void gsClear(GraphStore gStore, Target target, boolean isSilent)
-    {
-        // No create - we tested earlier.
-        Graph g = graph(gStore, target) ;
-        g.clear() ;
-    }
-
-    protected static void gsDrop(GraphStore gStore, Target target, boolean isSilent)
-    {
-        if ( target.isDefault() )
-            gStore.getDefaultGraph().clear() ;
-        else
-            gStore.removeGraph(target.getGraph()) ;
-    }
-    
-    // ----
-    
-    @Override
-    public Sink<Quad> createInsertDataSink()
-    {
-        return new Sink<Quad>()
-        {
-            @Override
-            public void send(Quad quad)
-            {
-                addToGraphStore(graphStore, quad);
-            }
-
-            @Override
-            public void flush()
-            {
-                SystemARQ.sync(graphStore);
-            }
-    
-            @Override
-            public void close()
-            { }
-        };
-    }
-    
-    @Override
-    public void visit(UpdateDataInsert update)
-    {
-        for ( Quad quad : update.getQuads() )
-            addToGraphStore(graphStore, quad) ;
-    }
-    
-    @Override
-    public Sink<Quad> createDeleteDataSink()
-    {
-        return new Sink<Quad>()
-        {
-            @Override
-            public void send(Quad quad)
-            {
-                deleteFromGraphStore(graphStore, quad);
-            }
-
-            @Override
-            public void flush()
-            {
-                SystemARQ.sync(graphStore);
-            }
-    
-            @Override
-            public void close()
-            { }
-        };
-    }
-
-    @Override
-    public void visit(UpdateDataDelete update)
-    {
-        for ( Quad quad : update.getQuads() )
-            deleteFromGraphStore(graphStore, quad) ;
-    }
-
-    @Override
-    public void visit(UpdateDeleteWhere update)
-    {
-        List<Quad> quads = update.getQuads() ;
-        // Convert bNodes to named variables first.
-//        if ( false )
-//            // Removed from SPARQL
-//            quads = convertBNodesToVariables(quads) ;
-        // Convert quads to a pattern.
-        Element el = elementFromQuads(quads) ;
-        
-        // Decided to serialize the bindings, but could also have decided to
-        // serialize the quads after applying the template instead.
-        
-        ThresholdPolicy<Binding> policy = ThresholdPolicyFactory.policyFromContext(graphStore.getContext());
-        DataBag<Binding> db = BagFactory.newDefaultBag(policy, SerializationFactoryFinder.bindingSerializationFactory()) ;
-        try
-        {
-            Iterator<Binding> bindings = evalBindings(el, null) ;
-            db.addAll(bindings) ;
-            Iter.close(bindings) ;
-            
-            Iterator<Binding> it = db.iterator() ;
-            execDelete(quads, null, it) ;
-            Iter.close(it) ;
-        }
-        finally
-        {
-            db.close() ;
-        }
-    }
-    
-    @Override
-    public void visit(UpdateModify update)
-    {
-        Node withGraph = update.getWithIRI() ;
-        Element elt = update.getWherePattern() ;
-        
-        // null or a dataset for USING clause. 
-        // USING/USING NAMED
-        DatasetGraph dsg = processUsing(update) ;
-        
-        // -------------------
-        // WITH
-        // USING overrides WITH
-        if ( dsg == null && withGraph != null ) {
-            if ( false ) 
-                // Ye Olde way - create a special dataset
-                dsg = processWith(update) ;
-            else
-                // Better, 
-                // Wrap WHERE clause in GRAPH <with_uri>
-                // and can remove DatasetGraphAltDefaultGraph, 
-                // or at least comment its implications.
-                elt = new ElementNamedGraph(withGraph, elt) ;
-        }
-
-        // WITH :
-        // The quads from deletion/insertion are altered when streamed
-        // into the templates later on. 
-        
-        // -------------------
-        
-        if ( dsg == null )
-            dsg = graphStore ;
-        
-        Query query = elementToQuery(elt) ;
-        ThresholdPolicy<Binding> policy = ThresholdPolicyFactory.policyFromContext(graphStore.getContext());
-        DataBag<Binding> db = BagFactory.newDefaultBag(policy, SerializationFactoryFinder.bindingSerializationFactory()) ;
-        try
-        {
-            Iterator<Binding> bindings = evalBindings(query, dsg, inputBinding, context) ;
-            
-            if ( false )
-            {   
-//                System.out.println("=======================================") ;
-//                System.out.println(graphStore) ;
-                List<Binding> x = Iter.toList(bindings) ;
-                System.out.printf("====>> Bindings (%d)\n", x.size()) ;
-                Iter.print(System.out, x.iterator()) ;
-                System.out.println("====<<") ;
-                bindings = Iter.iter(x) ;
-            }
-            
-            db.addAll(bindings) ;
-            Iter.close(bindings) ;
-            
-            Iterator<Binding> it = db.iterator() ;
-            execDelete(update.getDeleteQuads(), withGraph, it) ;
-            Iter.close(it) ;
-            
-            Iterator<Binding> it2 = db.iterator() ;
-            execInsert(update.getInsertQuads(), withGraph, it2) ;
-            Iter.close(it2) ;
-        }
-        finally
-        {
-            db.close() ;
-        }
-    }
-
-    // Indirection for subsystems to support USING/USING NAMED.
-    protected DatasetGraph processUsing(UpdateModify update)
-    {
-        if ( update.getUsing().size() == 0 && update.getUsingNamed().size() == 0 )
-            return null ;
-     
-        return DynamicDatasets.dynamicDataset(update.getUsing(), update.getUsingNamed(), graphStore, false) ;
-    }
-    
-    protected DatasetGraph processWith(UpdateModify update)
-    {
-        Node withGraph = update.getWithIRI() ;
-        if ( withGraph == null )
-            return null ;
-        Graph g = graphOrDummy(graphStore, withGraph) ;
-        DatasetGraph dsg = new DatasetGraphAltDefaultGraph(graphStore, g) ;
-        return dsg ;
-    }
-    
-    private Graph graphOrDummy(DatasetGraph dsg, Node gn)
-    {
-        Graph g = graph(graphStore, gn) ;
-        if ( g == null )
-            g = GraphFactory.createGraphMem() ;
-        return g ;
-    }
-    
-    protected static List<Quad> unused_convertBNodesToVariables(List<Quad> quads)
-    {
-        NodeTransform bnodesToVariables = new NodeTransformBNodesToVariables() ;
-        return NodeTransformLib.transformQuads(bnodesToVariables, quads) ;
-    }
-    
-    protected Element elementFromQuads(List<Quad> quads)
-    {
-        ElementGroup el = new ElementGroup() ;
-        ElementTriplesBlock x = new ElementTriplesBlock() ;
-        // Maybe empty??
-        el.addElement(x) ;
-        Node g = Quad.defaultGraphNodeGenerated ;
-        
-        for ( Quad q : quads )
-        {
-            if ( q.getGraph() != g )
-            {
-                g = q.getGraph() ;
-                x = new ElementTriplesBlock() ;
-                if ( g == null || g == Quad.defaultGraphNodeGenerated )
-                    el.addElement(x) ;
-                else
-                {
-                    ElementNamedGraph eng = new ElementNamedGraph(g, x) ;
-                    el.addElement(eng) ;
-                }
-            }
-            x.addTriple(q.asTriple()) ;
-        }
-        return el ;
-    }
-
-    protected void execDelete(List<Quad> quads, Node dftGraph, Iterator<Binding> bindings)
-    {
-        Iterator<Quad> it = template(quads, dftGraph, bindings) ;
-        if ( it == null ) return ;
-        
-        while (it.hasNext())
-        {
-            Quad q = it.next();
-            graphStore.delete(q);
-        }
-        
-        
-        // Alternate implementation that can use the graph BulkUpdateHandler, but forces all quads into
-        // memory (we don't want that!).  The issue is that all of the quads can be mixed up based on the
-        // user supplied template.  If graph stores can benefit from bulk insert/delete operations, then we
-        // need to expose a bulk update interface on GraphStore, not just Graph.
-//        MultiMap<Node, Triple> acc = MultiMap.createMapList() ;
-//        while (it.hasNext())
-//        {
-//            Quad q = it.next();
-//            acc.put(q.getGraph(), q.asTriple()) ;
-//        }
-//        for ( Node gn : acc.keys() )
-//        {
-//            Collection<Triple> triples = acc.get(gn) ;
-//            graph(graphStore, gn).getBulkUpdateHandler().delete(triples.iterator()) ;
-//        }
-    }
-
-    protected void execInsert(List<Quad> quads, Node dftGraph, Iterator<Binding> bindings)
-    {
-        Iterator<Quad> it = template(quads, dftGraph, bindings) ;
-        if ( it == null ) return ;
-        
-        while (it.hasNext())
-        {
-            Quad q = it.next();
-            addToGraphStore(graphStore, q);
-        }
-    }
-    
-    // Catch all individual adds of quads (and deletes - mainly for symmetry). 
-    private static void addToGraphStore(GraphStore graphStore, Quad quad) 
-    {
-        // Check legal triple.
-        if ( quad.isLegalAsData() )
-            graphStore.add(quad);
-        // Else drop.
-        //Log.warn(UpdateEngineWorker.class, "Bad quad as data: "+quad) ;
-    }
-
-    private static void deleteFromGraphStore(GraphStore graphStore, Quad quad)
-    {
-        graphStore.delete(quad) ;
-    }
-
-    protected Query elementToQuery(Element pattern)
-    {
-        if ( pattern == null )
-            return null ;
-        Query query = new Query() ;
-        query.setQueryPattern(pattern) ;
-        query.setQuerySelectType() ;
-        query.setQueryResultStar(true) ;
-        query.setResultVars() ;
-        return query ;
-    }
-    
-    protected Iterator<Binding> evalBindings(Element pattern, Node dftGraph)
-    {
-        return evalBindings(elementToQuery(pattern), dftGraph) ;
-    }
-    
-    protected Iterator<Binding> evalBindings(Query query, Node dftGraph)
-    {
-        DatasetGraph dsg = graphStore ;
-        if ( query != null )
-        {
-            if ( dftGraph != null )
-            {
-                Graph g = graphOrDummy(dsg, dftGraph) ;
-                dsg = new DatasetGraphAltDefaultGraph(dsg, g) ;
-            }
-        }
-        
-        return evalBindings(query, dsg, inputBinding, context) ;
-        
-    }
-    
-    protected static Iterator<Binding> evalBindings(Query query, DatasetGraph dsg, Binding inputBinding, Context context)
-    {
-        // SET UP CONTEXT
-        // The UpdateProcessorBase already copied the context and made it safe ... but that's going to happen again :-(
-        
-        Iterator<Binding> toReturn ;
-        
-        if ( query != null )
-        {
-            Plan plan = QueryExecutionFactory.createPlan(query, dsg, inputBinding, context) ;
-            toReturn = plan.iterator();
-        }
-        else
-        {
-            toReturn = Iter.singleton((null != inputBinding) ? inputBinding : BindingRoot.create()) ;
-        }
-        return toReturn ;
-    }
-    
-    protected static Graph graph(GraphStore graphStore, Node gn)
-    {
-        if ( gn == null || gn == Quad.defaultGraphNodeGenerated )
-            return graphStore.getDefaultGraph() ;
-        else
-            return graphStore.getGraph(gn) ;
-    }
-
-    protected static Graph graph(GraphStore graphStore, Target target)
-    {
-        if ( target.isDefault() )
-            return graphStore.getDefaultGraph() ;
-        if ( target.isOneNamedGraph() )
-            return graph(graphStore, target.getGraph()) ;
-        error("Target does not name one graph: "+target) ;
-        return null ;
-    }
-
-    protected static void error(String msg)
-    {
-        throw new UpdateException(msg) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java
deleted file mode 100644
index 6ec2c3a..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-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 ;
-
-import com.hp.hpl.jena.sparql.ARQException ;
-import com.hp.hpl.jena.sparql.util.Context ;
-import com.hp.hpl.jena.update.UpdateProcessor ;
-import com.hp.hpl.jena.update.UpdateRequest ;
-
-/**
- * UpdateProcess that send the request to a SPARQL endpoint by using POST of application/sparql-update.  
- */
-public class UpdateProcessRemote extends UpdateProcessRemoteBase implements UpdateProcessor
-{    
-    /**
-     * 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
-     */
-    public UpdateProcessRemote(UpdateRequest request, String endpoint, Context context )
-    {
-        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);
-        // Don't want to overwrite credentials we may have picked up from
-        // service context in the parent constructor if the specified
-        // authenticator is null
-        if (authenticator != null)
-            this.setAuthenticator(authenticator);
-    }
-
-    @Override
-    public void execute()
-    {
-        // Validation
-        if ( this.getEndpoint() == null )
-            throw new ARQException("Null endpoint for remote update") ;
-        if ( this.getUpdateRequest() == null )
-            throw new ARQException("Null update request for remote update") ;
-        
-        // Build endpoint URL
-        String endpoint = this.getEndpoint();
-        String querystring = this.getQueryString();
-        if (querystring != null && !querystring.equals("")) {
-            endpoint = endpoint.contains("?") ? endpoint + "&" + querystring : endpoint + "?" + querystring;
-        }
-        
-        // Execution
-        String reqStr = this.getUpdateRequest().toString() ;
-        HttpOp.execHttpPost(endpoint, WebContent.contentTypeSPARQLUpdate, reqStr, null, getHttpContext(), getAuthenticator()) ;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteBase.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteBase.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteBase.java
deleted file mode 100644
index 7e557ca..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteBase.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.http.protocol.HttpContext;
-import org.apache.jena.atlas.web.auth.HttpAuthenticator;
-import org.apache.jena.atlas.web.auth.SimpleAuthenticator;
-import org.apache.jena.riot.web.HttpOp;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.hp.hpl.jena.sparql.engine.http.HttpParams;
-import com.hp.hpl.jena.sparql.engine.http.Params;
-import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP;
-import com.hp.hpl.jena.sparql.engine.http.Service;
-import com.hp.hpl.jena.sparql.util.Context;
-import com.hp.hpl.jena.sparql.util.Symbol;
-import com.hp.hpl.jena.update.GraphStore;
-import com.hp.hpl.jena.update.UpdateProcessor;
-import com.hp.hpl.jena.update.UpdateRequest;
-
-/**
- * Abstract base class for update processors that perform remote updates over
- * HTTP
- * 
- */
-public abstract class UpdateProcessRemoteBase implements UpdateProcessor {
-    private static Logger log = LoggerFactory.getLogger(UpdateProcessRemoteBase.class);
-
-    /**
-     * Symbol used to set a {@link HttpContext} which will be used for HTTP
-     * requests
-     */
-    public static final Symbol HTTP_CONTEXT = Symbol.create("httpContext");
-
-    private final UpdateRequest request;
-    private final String endpoint;
-    private final Context context;
-    private HttpAuthenticator authenticator;
-    private Params params;
-
-    protected List<String> defaultGraphURIs = new ArrayList<>();
-    protected List<String> namedGraphURIs = new ArrayList<>();
-
-    /**
-     * Creates a new remote update processor
-     * 
-     * @param request
-     *            Update request
-     * @param endpoint
-     *            Update endpoint
-     * @param context
-     *            Context
-     */
-    public UpdateProcessRemoteBase(UpdateRequest request, String endpoint, Context context) {
-        super();
-
-        this.request = request;
-        this.endpoint = endpoint;
-        this.context = Context.setupContext(context, null);
-
-        // Apply service configuration if applicable
-        UpdateProcessRemoteBase.applyServiceConfig(endpoint, this);
-    }
-
-    /**
-     * <p>
-     * Helper method which applies configuration from the Context to the query
-     * engine if a service context exists for the given URI
-     * </p>
-     * <p>
-     * Based off proposed patch for JENA-405 but modified to apply all relevant
-     * configuration, this is in part also based off of the private
-     * {@code configureQuery()} method of the {@link Service} class though it
-     * omits parameter merging since that will be done automatically whenever
-     * the {@link QueryEngineHTTP} instance makes a query for remote submission.
-     * </p>
-     * 
-     * @param serviceURI
-     *            Service URI
-     */
-    private static void applyServiceConfig(String serviceURI, UpdateProcessRemoteBase engine) {
-        @SuppressWarnings("unchecked")
-        Map<String, Context> serviceContextMap = (Map<String, Context>) engine.context.get(Service.serviceContext);
-        if (serviceContextMap != null && serviceContextMap.containsKey(serviceURI)) {
-            Context serviceContext = serviceContextMap.get(serviceURI);
-            if (log.isDebugEnabled())
-                log.debug("Endpoint URI {} has SERVICE Context: {} ", serviceURI, serviceContext);
-
-            // Apply authentication settings
-            String user = serviceContext.getAsString(Service.queryAuthUser);
-            String pwd = serviceContext.getAsString(Service.queryAuthPwd);
-
-            if (user != null || pwd != null) {
-                user = user == null ? "" : user;
-                pwd = pwd == null ? "" : pwd;
-                if (log.isDebugEnabled())
-                    log.debug("Setting basic HTTP authentication for endpoint URI {} with username: {} ", serviceURI, user);
-
-                engine.setAuthentication(user, pwd.toCharArray());
-            }
-        }
-    }
-
-    @Override
-    public GraphStore getGraphStore() {
-        return null;
-    }
-
-    /**
-     * Gets the endpoint
-     * 
-     * @return Endpoint URI
-     */
-    public String getEndpoint() {
-        return this.endpoint;
-    }
-
-    /**
-     * Gets the generated query string portion of the endpoint URL if applicable
-     * <p>
-     * Generated string will not include leading ? so that consuming code can
-     * decide whether to add this themselves since the generated query string
-     * may be being used in addition to an existing query string.
-     * </p>
-     * 
-     * @return Generated query string
-     */
-    public String getQueryString() {
-        return this.getParams().httpString();
-    }
-
-    /**
-     * Gets the parameters for the execution
-     * 
-     * @return Parameters
-     */
-    public Params getParams() {
-        Params ps = this.params != null ? new Params(this.params) : new Params();
-        if (this.defaultGraphURIs != null) {
-            for (String defaultGraph : this.defaultGraphURIs) {
-                ps.addParam(HttpParams.pUsingGraph, defaultGraph);
-            }
-        }
-        if (this.namedGraphURIs != null) {
-            for (String namedGraph : this.namedGraphURIs) {
-                ps.addParam(HttpParams.pUsingNamedGraph, namedGraph);
-            }
-        }
-        return ps;
-    }
-
-    /**
-     * Gets the update request
-     * 
-     * @return Update request
-     */
-    public UpdateRequest getUpdateRequest() {
-        return this.request;
-    }
-
-    /**
-     * Adds a default graph
-     * 
-     * @param defaultGraph
-     *            Default Graph URI
-     */
-    public void addDefaultGraph(String defaultGraph) {
-        if (this.defaultGraphURIs == null) {
-            this.defaultGraphURIs = new ArrayList<>();
-        }
-        this.defaultGraphURIs.add(defaultGraph);
-    }
-
-    /**
-     * Adds a named graph
-     * 
-     * @param namedGraph
-     *            Named Graph URi
-     */
-    public void addNamedGraph(String namedGraph) {
-        if (this.namedGraphURIs == null) {
-            this.namedGraphURIs = new ArrayList<>();
-        }
-        this.namedGraphURIs.add(namedGraph);
-    }
-
-    /**
-     * Adds a custom parameter to the request
-     * 
-     * @param field
-     *            Field
-     * @param value
-     *            Value
-     */
-    public void addParam(String field, String value) {
-        if (this.params == null)
-            this.params = new Params();
-        this.params.addParam(field, value);
-    }
-
-    /**
-     * Sets the default graphs
-     * 
-     * @param defaultGraphs
-     *            Default Graphs
-     */
-    public void setDefaultGraphs(List<String> defaultGraphs) {
-        this.defaultGraphURIs = defaultGraphs;
-    }
-
-    /**
-     * Sets the named graphs
-     * 
-     * @param namedGraphs
-     *            Named Graphs
-     */
-    public void setNamedGraphs(List<String> namedGraphs) {
-        this.namedGraphURIs = namedGraphs;
-    }
-
-    /**
-     * Convenience method to set the {@link HttpContext}
-     * 
-     * @param httpContext
-     *            HTTP Context
-     */
-    public void setHttpContext(HttpContext httpContext) {
-        getContext().put(HTTP_CONTEXT, httpContext);
-    }
-
-    /**
-     * Convenience method to get the {@link HttpContext}
-     * 
-     * @return HttpContext
-     */
-    public HttpContext getHttpContext() {
-        return (HttpContext) getContext().get(HTTP_CONTEXT);
-    }
-
-    @Override
-    public Context getContext() {
-        return context;
-    }
-
-    /**
-     * Sets authentication credentials for remote updates
-     * <p>
-     * May be better to use {@link #setAuthenticator(HttpAuthenticator)} as that
-     * allows for more complex authentication to be used
-     * </p>
-     * 
-     * @param username
-     *            User name
-     * @param password
-     *            Password
-     */
-    public void setAuthentication(String username, char[] password) {
-        this.setAuthenticator(new SimpleAuthenticator(username, password));
-    }
-
-    /**
-     * Sets the authenticator to use
-     * <p>
-     * Note that you can globally set an authenticator via
-     * {@link HttpOp#setDefaultAuthenticator(HttpAuthenticator)} to avoid the
-     * need to set authentication on a per-request basis
-     * </p>
-     * 
-     * @param authenticator
-     *            HTTP Authenticator
-     */
-    public void setAuthenticator(HttpAuthenticator authenticator) {
-        this.authenticator = authenticator;
-    }
-
-    /**
-     * Gets the authenticator that has been set (if any)
-     * <p>
-     * If no authenticator is used then the default authenticator will be used,
-     * this can be configured via the
-     * {@link HttpOp#setDefaultAuthenticator(HttpAuthenticator)} method.
-     * </p>
-     * 
-     * @return HTTP Authenticator if set, null otherwise
-     */
-    public HttpAuthenticator getAuthenticator() {
-        return this.authenticator;
-    }
-
-    /**
-     * Gets whether any authenticator has been set
-     * 
-     * @return True if an authenticator has been set, false otherwise
-     */
-    public boolean isUsingAuthentication() {
-        return this.authenticator != null;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteForm.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteForm.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteForm.java
deleted file mode 100644
index f5c9b1e..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessRemoteForm.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-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;
-
-import com.hp.hpl.jena.sparql.ARQException;
-import com.hp.hpl.jena.sparql.engine.http.HttpParams;
-import com.hp.hpl.jena.sparql.engine.http.Params;
-import com.hp.hpl.jena.sparql.util.Context;
-import com.hp.hpl.jena.update.UpdateProcessor;
-import com.hp.hpl.jena.update.UpdateRequest;
-
-/**
- * UpdateProcess that send the request to a SPARQL endpoint by using an HTML
- * form and POST Use of application/sparql-update via @link{UpdateProcessRemote}
- * is preferred.
- */
-public class UpdateProcessRemoteForm extends UpdateProcessRemoteBase implements UpdateProcessor {
-
-    /**
-     * 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
-     */
-    public UpdateProcessRemoteForm(UpdateRequest request, String endpoint, Context context) {
-        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);
-        // Don't want to overwrite credentials we may have picked up from
-        // service context in the parent constructor if the specified
-        // authenticator is null
-        if (authenticator != null)
-            this.setAuthenticator(authenticator);
-    }
-
-    @Override
-    public void execute() {
-        // Validation
-        if (this.getEndpoint() == null)
-            throw new ARQException("Null endpoint for remote update by form");
-        if (this.getUpdateRequest() == null)
-            throw new ARQException("Null update request for remote update");
-
-        // Execution
-        String reqStr = this.getUpdateRequest().toString();
-        Params ps = new Params(this.getParams());
-        ps.addParam(HttpParams.pUpdate, reqStr);
-        HttpOp.execHttpPostForm(this.getEndpoint(), ps, null, HttpResponseLib.nullResponse, null, getHttpContext(),
-                getAuthenticator());
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessorBase.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessorBase.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessorBase.java
deleted file mode 100644
index a80f46c..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessorBase.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import org.apache.jena.atlas.iterator.Iter ;
-
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.util.Context ;
-import com.hp.hpl.jena.update.GraphStore ;
-import com.hp.hpl.jena.update.UpdateProcessor ;
-import com.hp.hpl.jena.update.UpdateRequest ;
-
-/** Class to hold the general state of a update request execution.
- *  See query ExecutionContext
- */
-public class UpdateProcessorBase implements UpdateProcessor
-{
-    protected final UpdateRequest request ;
-    protected final GraphStore graphStore ;
-    protected final Binding inputBinding;
-    protected final UpdateEngineFactory factory ;
-    protected final Context context ;
-
-    public UpdateProcessorBase(UpdateRequest request, 
-                               GraphStore graphStore, 
-                               Binding inputBinding,
-                               Context context, 
-                               UpdateEngineFactory factory)
-    {
-        this.request = request ;
-        this.graphStore = graphStore ;
-        this.inputBinding = inputBinding;
-        this.context = Context.setupContext(context, graphStore) ;
-        this.factory = factory ;
-    }
-
-    @Override
-    public void execute()
-    {
-        UpdateEngine uProc = factory.create(graphStore, inputBinding, context);
-        uProc.startRequest();
-        
-        try {
-            UpdateSink sink = uProc.getUpdateSink();
-            Iter.sendToSink(request, sink);     // Will call close on sink if there are no exceptions
-        } finally {
-            uProc.finishRequest() ;
-        }
-    }
-
-    @Override
-    public GraphStore getGraphStore()
-    {
-        return graphStore ;
-    }
-
-    @Override
-    public Context getContext()
-    {
-        return context ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessorStreamingBase.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessorStreamingBase.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessorStreamingBase.java
deleted file mode 100644
index 2b541c4..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateProcessorStreamingBase.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import com.hp.hpl.jena.sparql.engine.binding.Binding ;
-import com.hp.hpl.jena.sparql.util.Context ;
-import com.hp.hpl.jena.update.GraphStore ;
-import com.hp.hpl.jena.update.UpdateProcessorStreaming ;
-
-/** Class to hold the general state of a update request execution.
- *  See query ExecutionContext
- */
-public class UpdateProcessorStreamingBase implements UpdateProcessorStreaming
-{
-    protected final GraphStore graphStore ;
-    protected final Context context ;
-    
-    protected final UpdateEngine proc;
-
-    public UpdateProcessorStreamingBase(GraphStore graphStore, Binding inputBinding, Context context, UpdateEngineFactory factory)
-    {
-        this.graphStore = graphStore ;
-        this.context = Context.setupContext(context, graphStore) ;
-        
-        proc = factory.create(graphStore, inputBinding, context) ;
-    }
-    
-    @Override
-    public void startRequest()
-    {
-        proc.startRequest();
-    }
-    
-    @Override
-    public void finishRequest()
-    {
-        proc.finishRequest();
-    }
-    
-    @Override
-    public UpdateSink getUpdateSink()
-    {
-        return proc.getUpdateSink();
-    }
-
-    @Override
-    public GraphStore getGraphStore()
-    {
-        return graphStore ;
-    }
-    
-    @Override
-    public Context getContext()
-    {
-        return context ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateRequestSink.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateRequestSink.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateRequestSink.java
deleted file mode 100644
index 54c5d77..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateRequestSink.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import com.hp.hpl.jena.sparql.core.Prologue;
-import com.hp.hpl.jena.sparql.modify.request.QuadDataAcc;
-import com.hp.hpl.jena.sparql.modify.request.QuadDataAccSink;
-import com.hp.hpl.jena.sparql.modify.request.UpdateDataDelete;
-import com.hp.hpl.jena.sparql.modify.request.UpdateDataInsert;
-import com.hp.hpl.jena.update.Update ;
-import com.hp.hpl.jena.update.UpdateRequest ;
-
-public class UpdateRequestSink implements UpdateSink
-{
-    final UpdateRequest updateRequest;
-    
-    public UpdateRequestSink(UpdateRequest updateRequest)
-    {
-        this.updateRequest = updateRequest;
-    }
-    
-    @Override
-    public void send(Update update)
-    {
-        updateRequest.add(update);
-    }
-    
-    @Override
-    public void flush()
-    { }
-    
-    @Override
-    public void close()
-    { }
-    
-    @Override
-    public Prologue getPrologue()
-    {
-        return updateRequest;
-    }
-    
-    @Override
-    public QuadDataAccSink createInsertDataSink()
-    {
-        QuadDataAcc quads = new QuadDataAcc();
-        send(new UpdateDataInsert(quads));
-        
-        return quads;
-    }
-    
-    @Override
-    public QuadDataAccSink createDeleteDataSink()
-    {
-        QuadDataAcc quads = new QuadDataAcc();
-        send(new UpdateDataDelete(quads));
-        
-        return quads;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateSink.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateSink.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateSink.java
deleted file mode 100644
index ec49159..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateSink.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import org.apache.jena.atlas.lib.Sink ;
-
-import com.hp.hpl.jena.sparql.core.Prologue ;
-import com.hp.hpl.jena.sparql.modify.request.QuadDataAccSink ;
-import com.hp.hpl.jena.update.Update ;
-
-/**
- * An {@link UpdateSink} is an object usually created by a container (such as a storage engine
- * or an {@link com.hp.hpl.jena.update.UpdateRequest}) that can process or store a single SPARQL Update
- * request which consists of one or more SPARQL Update operations.
- */
-// TODO More documentation!
-public interface UpdateSink extends Sink<Update>
-{
-    public Prologue getPrologue();
-
-    // TODO make an interface for the quad sinks
-    public QuadDataAccSink createInsertDataSink();
-
-    public QuadDataAccSink createDeleteDataSink();
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateVisitorSink.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateVisitorSink.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateVisitorSink.java
deleted file mode 100644
index 0484205..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UpdateVisitorSink.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import com.hp.hpl.jena.sparql.core.Prologue ;
-import com.hp.hpl.jena.sparql.modify.request.QuadDataAccSink ;
-import com.hp.hpl.jena.sparql.modify.request.UpdateVisitor ;
-import com.hp.hpl.jena.update.Update ;
-
-public class UpdateVisitorSink implements UpdateSink
-{
-    private final Prologue prologue;
-    private final UpdateVisitor worker;
-    
-    public UpdateVisitorSink(UpdateVisitor worker)
-    {
-        this.prologue = new Prologue();
-        this.worker = worker;
-    }
-    
-    @Override
-    public Prologue getPrologue()
-    {
-        return prologue;
-    }
-    
-    @Override
-    public void send(Update update)
-    {
-        update.visit(worker);
-    }
-    
-    @Override
-    public QuadDataAccSink createInsertDataSink()
-    {
-        return new QuadDataAccSink(worker.createInsertDataSink());
-    }
-    
-    @Override
-    public QuadDataAccSink createDeleteDataSink()
-    {
-        return new QuadDataAccSink(worker.createDeleteDataSink());
-    }
-
-    @Override
-    public void flush()
-    { }
-
-    @Override
-    public void close()
-    { }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UsingList.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UsingList.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UsingList.java
deleted file mode 100644
index ceb948d..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UsingList.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import com.hp.hpl.jena.graph.Node;
-
-public class UsingList
-{
-    public UsingList() { }
-    
-    private List<Node> using = new ArrayList<>() ;
-    private List<Node> usingNamed = new ArrayList<>() ;
-    
-    public void addUsing(Node node)                      { using.add(node) ; }
-    public void addAllUsing(Collection<Node> nodes)      { using.addAll(nodes); }
-    public void addUsingNamed(Node node)                 { usingNamed.add(node) ; }
-    public void addAllUsingNamed(Collection<Node> nodes) { usingNamed.addAll(nodes); }
-    
-    public List<Node> getUsing()                         { return Collections.unmodifiableList(using) ; }
-    public List<Node> getUsingNamed()                    { return Collections.unmodifiableList(usingNamed) ; }
-    
-    public boolean usingIsPresent()                      { return using.size() > 0 || usingNamed.size() > 0 ; }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UsingUpdateSink.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UsingUpdateSink.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UsingUpdateSink.java
deleted file mode 100644
index 2160329..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/UsingUpdateSink.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify;
-
-import com.hp.hpl.jena.graph.Node ;
-import com.hp.hpl.jena.sparql.core.Prologue ;
-import com.hp.hpl.jena.sparql.modify.request.QuadDataAccSink ;
-import com.hp.hpl.jena.sparql.modify.request.UpdateWithUsing ;
-import com.hp.hpl.jena.update.Update ;
-import com.hp.hpl.jena.update.UpdateException ;
-
-/**
- * Adds using clauses from the UsingList to UpdateWithUsing operations; will throw an UpdateException if the modify operation already contains a using clause. 
- */
-public class UsingUpdateSink implements UpdateSink
-{
-    private final UpdateSink sink; 
-    private final UsingList usingList;
-    
-    public UsingUpdateSink(UpdateSink sink, UsingList usingList)
-    {
-        this.sink = sink;
-        this.usingList = usingList;
-    }
-    
-    @Override
-    public void send(Update update)
-    {
-        // ---- check USING/USING NAMED/WITH not used.
-        // ---- update request to have USING/USING NAMED 
-        if ( null != usingList && usingList.usingIsPresent() )
-        {
-            if ( update instanceof UpdateWithUsing )
-            {
-                UpdateWithUsing upu = (UpdateWithUsing)update ;
-                if ( upu.getUsing().size() != 0 || upu.getUsingNamed().size() != 0 || upu.getWithIRI() != null )
-                    throw new UpdateException("SPARQL Update: Protocol using-graph-uri or using-named-graph-uri present where update request has USING, USING NAMED or WITH") ;
-                for ( Node node : usingList.getUsing() )
-                    upu.addUsing(node) ;
-                for ( Node node : usingList.getUsingNamed() )
-                    upu.addUsingNamed(node) ;
-            }
-        }
-        
-        sink.send(update);
-    }
-
-    @Override
-    public QuadDataAccSink createInsertDataSink()
-    {
-        return sink.createInsertDataSink();
-    }
-    
-    @Override
-    public QuadDataAccSink createDeleteDataSink()
-    {
-        return sink.createDeleteDataSink();
-    }
-    
-    @Override
-    public void flush()
-    {
-        sink.flush();
-    }
-
-    @Override
-    public void close()
-    {
-        sink.close();
-    }
-
-    @Override
-    public Prologue getPrologue()
-    {
-        return sink.getPrologue();
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadAcc.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadAcc.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadAcc.java
deleted file mode 100644
index a765ea7..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadAcc.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify.request;
-
-import java.util.ArrayList ;
-import java.util.Collections ;
-import java.util.List ;
-
-import org.apache.jena.atlas.lib.SinkToCollection ;
-
-import com.hp.hpl.jena.sparql.core.Quad ;
-
-/** Accumulate quads (including allowing variables) during parsing. */
-public class QuadAcc extends QuadAccSink
-{
-    // A lists of Pairs: Node and Triple connector
-    
-    private final List<Quad> quads ;
-    private final List<Quad> quadsView ;
-    
-    public QuadAcc()
-    {
-        this(new ArrayList<Quad>());
-    }
-    
-    public QuadAcc(List<Quad> quads)
-    {
-        super(new SinkToCollection<>(quads)) ;
-        this.quads = quads ;
-        this.quadsView = Collections.unmodifiableList(quads) ;
-    }
-    
-    public List<Quad> getQuads()
-    {
-        return quadsView ;
-    }
-    
-    @Override
-    public int hashCode() { return quads.hashCode() ; }
-
-    @Override
-    public boolean equals(Object other)
-    {
-        if ( ! ( other instanceof QuadAcc ) ) return false ;
-        QuadAcc acc = (QuadAcc)other ;
-        return quads.equals(acc.quads) ; 
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadAccSink.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadAccSink.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadAccSink.java
deleted file mode 100644
index d9fce8f..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadAccSink.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify.request;
-
-import org.apache.jena.atlas.lib.Closeable ;
-import org.apache.jena.atlas.lib.Sink ;
-
-import com.hp.hpl.jena.graph.Node ;
-import com.hp.hpl.jena.graph.Triple ;
-import com.hp.hpl.jena.sparql.core.Quad ;
-import com.hp.hpl.jena.sparql.core.TriplePath ;
-import com.hp.hpl.jena.sparql.syntax.TripleCollector ;
-
-/** Accumulate quads into a Sink (including allowing variables) during parsing. */
-public class QuadAccSink implements TripleCollector, Closeable
-{
-    protected Node graphNode = Quad.defaultGraphNodeGenerated ;
-    private final Sink<Quad> sink;
-    
-    public QuadAccSink(Sink<Quad> sink)
-    {
-        this.sink = sink;
-    }
-    
-    protected void check(Triple triple) {} 
-    protected void check(Quad quad) {} 
-    
-    public void setGraph(Node n) 
-    { 
-        graphNode = n ;
-    }
-    
-    public Node getGraph()    { return graphNode ; }
-    
-    public void addQuad(Quad quad)
-    {
-        check(quad) ;
-        sink.send(quad) ;
-    }
-
-    @Override
-    public void addTriple(Triple triple)
-    {
-        check(triple) ;
-        sink.send(new Quad(graphNode, triple)) ;
-    }
-
-    @Override
-    public void addTriplePath(TriplePath tPath)
-    { throw new UnsupportedOperationException("Can't add paths to quads") ; }
-
-    @Override
-    public void close()
-    {
-        sink.close();
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadDataAcc.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadDataAcc.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadDataAcc.java
deleted file mode 100644
index 20b1123..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadDataAcc.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify.request;
-
-import java.util.ArrayList ;
-import java.util.Collections ;
-import java.util.List ;
-
-import org.apache.jena.atlas.lib.SinkToCollection ;
-
-import com.hp.hpl.jena.graph.Triple ;
-import com.hp.hpl.jena.sparql.core.Quad ;
-import com.hp.hpl.jena.sparql.core.TriplePath ;
-import com.hp.hpl.jena.sparql.syntax.TripleCollectorMark ;
-
-/** Accumulate quads (excluding allowing variables) during parsing. */
-public class QuadDataAcc extends QuadDataAccSink implements TripleCollectorMark
-{
-    private final List<Quad> quads ;
-    private final List<Quad> quadsView ;
-    
-    public QuadDataAcc()
-    {
-        this(new ArrayList<Quad>());
-    }
-    
-    public QuadDataAcc(List<Quad> quads)
-    {
-        super(new SinkToCollection<>(quads));
-        this.quads = quads;
-        this.quadsView = Collections.unmodifiableList(quads) ;
-    }
-    
-    public List<Quad> getQuads()
-    {
-        return quadsView ;
-    }
-    
-    @Override
-    public int hashCode() { return quads.hashCode() ; }
-
-    @Override
-    public boolean equals(Object other)
-    {
-        if ( ! ( other instanceof QuadDataAcc ) ) return false ;
-        QuadDataAcc acc = (QuadDataAcc)other ;
-        return quads.equals(acc.quads) ; 
-    }
-
-    @Override
-    public int mark()
-    {
-        return quads.size() ;
-    }
-
-    @Override
-    public void addTriple(int index, Triple triple)
-    {
-        check(triple) ;
-        quads.add(index, new Quad(graphNode, triple)) ;
-    }
-
-    @Override
-    public void addTriplePath(int index, TriplePath tPath)
-    {
-        throw new UnsupportedOperationException("Can't add paths to quads") ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadDataAccSink.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadDataAccSink.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadDataAccSink.java
deleted file mode 100644
index e49f058..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/QuadDataAccSink.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify.request;
-
-import org.apache.jena.atlas.lib.Sink ;
-
-import com.hp.hpl.jena.graph.Triple ;
-import com.hp.hpl.jena.query.QueryParseException ;
-import com.hp.hpl.jena.sparql.core.Quad ;
-import com.hp.hpl.jena.sparql.core.Var ;
-
-/** Accumulate quads (excluding allowing variables) during parsing. */
-public class QuadDataAccSink extends QuadAccSink
-{
-    public QuadDataAccSink(Sink<Quad> sink)
-    {
-        super(sink);
-    }
-
-    @Override
-    protected void check(Triple t)
-    {
-        if ( Var.isVar(getGraph()) )
-            throw new QueryParseException("Variables not permitted in data quad", -1, -1) ;   
-        if ( Var.isVar(t.getSubject()) || Var.isVar(t.getPredicate()) || Var.isVar(t.getObject())) 
-            throw new QueryParseException("Variables not permitted in data quad", -1, -1) ;  
-        if ( t.getSubject().isLiteral() )
-            throw new QueryParseException("Literals not allowed as subjects in data", -1, -1) ;
-    }
-    
-    @Override
-    protected void check(Quad quad)
-    {
-        if ( Var.isVar(quad.getGraph()) || 
-             Var.isVar(quad.getSubject()) || 
-             Var.isVar(quad.getPredicate()) || 
-             Var.isVar(quad.getObject())) 
-            throw new QueryParseException("Variables not permitted in data quad", -1, -1) ;   
-        if ( quad.getSubject().isLiteral() )
-            throw new QueryParseException("Literals not allowed as subjects in quad data", -1, -1) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/Target.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/Target.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/Target.java
deleted file mode 100644
index 0a21402..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/Target.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify.request;
-
-import static com.hp.hpl.jena.sparql.modify.request.Target.Decl.ALL$ ;
-import static com.hp.hpl.jena.sparql.modify.request.Target.Decl.DEFAULT$ ;
-import static com.hp.hpl.jena.sparql.modify.request.Target.Decl.IRI$ ;
-import static com.hp.hpl.jena.sparql.modify.request.Target.Decl.NAMED$ ;
-
-import com.hp.hpl.jena.graph.Node ;
-import com.hp.hpl.jena.graph.NodeFactory ;
-import com.hp.hpl.jena.sparql.util.FmtUtils ;
-import com.hp.hpl.jena.sparql.util.NodeIsomorphismMap ;
-
-public class Target
-{
-    static enum Decl { DEFAULT$, NAMED$, ALL$, IRI$}
-    
-    public static final Target DEFAULT = new Target(DEFAULT$) ;
-    public static final Target NAMED = new Target(NAMED$) ;
-    public static final Target ALL = new Target(ALL$) ;
-
-    public static Target create(String iri)
-    { return new Target(NodeFactory.createURI(iri)) ; }
-
-    public static Target create(Node graphName)
-    { return new Target(graphName) ; }
-    
-    private final Decl decl ;
-    private final Node graphIRI ;
-    
-    private Target(Decl decl)           { this.graphIRI = null ; this.decl = decl ; } 
-    private Target(Node iri)            { this.graphIRI = iri ; this.decl = Decl.IRI$ ; }
-    
-    public boolean isDefault()          { return decl == DEFAULT$ ; }
-    public boolean isAll()              { return decl == ALL$ ; }
-    public boolean isAllNamed()         { return decl == NAMED$ ; }
-    public boolean isOneNamedGraph()    { return decl == IRI$ ; }
-    
-    public Node getGraph()              { return graphIRI ; }
-    
-    @Override
-    public String toString()
-    {
-        if ( isOneNamedGraph() )
-            return decl.toString()+" "+FmtUtils.stringForNode(graphIRI) ;
-        else    
-            return decl.toString() ;
-    }
-
-    public boolean equalTo(Target other, NodeIsomorphismMap isoMap) {
-        return equals(other) ;
-    }
-
-    @Override
-    public int hashCode()
-    {
-        final int prime = 31 ;
-        int result = 1 ;
-        result = prime * result + ((decl == null) ? 0 : decl.hashCode()) ;
-        // OK since a URI.
-        result = prime * result + ((graphIRI == null) ? 0 : graphIRI.hashCode()) ;
-        return result ;
-    }
-
-    @Override
-    public boolean equals(Object obj)
-    {
-        if (this == obj) return true ;
-        if (obj == null) return false ;
-        if (getClass() != obj.getClass()) return false ;
-        Target other = (Target)obj ;
-        if (decl != other.decl) return false ;
-        if (graphIRI == null)
-        {
-            if (other.graphIRI != null) return false ;
-        } else
-            if (!graphIRI.equals(other.graphIRI)) return false ;
-        return true ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateAdd.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateAdd.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateAdd.java
deleted file mode 100644
index a09514c..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateAdd.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify.request;
-
-
-public class UpdateAdd extends UpdateBinaryOp
-{
-    public UpdateAdd(Target src, Target dest)                  { super(src, dest, true) ; }
-    public UpdateAdd(Target src, Target dest, boolean silent)  { super(src, dest, silent) ; }
-
-    @Override
-    public void visit(UpdateVisitor visitor)
-    { visitor.visit(this) ; }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/56534eac/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateBinaryOp.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateBinaryOp.java b/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateBinaryOp.java
deleted file mode 100644
index c4595e5..0000000
--- a/jena-arq/src/main/java/com/hp/hpl/jena/sparql/modify/request/UpdateBinaryOp.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.hp.hpl.jena.sparql.modify.request;
-
-import com.hp.hpl.jena.sparql.ARQException ;
-import com.hp.hpl.jena.sparql.util.NodeIsomorphismMap ;
-import com.hp.hpl.jena.update.Update ;
-
-public abstract class UpdateBinaryOp extends Update
-{
-    private Target src ;
-    private Target dest ;
-    private boolean silent ;
-
-    protected UpdateBinaryOp(Target src, Target dest, boolean silent)
-    {
-        checkTarget(src) ;
-        checkTarget(dest) ;
-        this.src = src ; 
-        this.dest = dest ;
-        this.silent = silent ;
-    }
-
-    private static void checkTarget(Target target)
-    {
-        if ( ! target.isDefault() && ! target.isOneNamedGraph() )
-            throw new ARQException("Illegal target: must identify a single graph: "+target) ; 
-    }
-
-    public Target getSrc()      { return src ; }
-
-    public Target getDest()     { return dest ; }
-    
-    public boolean getSilent()  { return silent ; }
-    
-    @Override
-    final
-    public boolean equalTo(Update obj, NodeIsomorphismMap isoMap) {
-        if (this == obj)
-            return true ;
-        if (getClass() != obj.getClass())
-            return false ;
-        UpdateBinaryOp other = (UpdateBinaryOp)obj ;
-        if (silent != other.silent)
-            return false ;
-
-        return  dest.equalTo(other.dest, isoMap) &&
-                src.equalTo(other.src, isoMap) ;
-    }
-}


Mime
View raw message