You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2011/07/20 16:14:30 UTC

svn commit: r1148783 - in /incubator/jena/Jena2/ARQ/trunk: ./ src-dev/reports/ src-test/com/hp/hpl/jena/sparql/graph/ src/com/hp/hpl/jena/sparql/core/ src/com/hp/hpl/jena/sparql/graph/ src/com/hp/hpl/jena/sparql/util/ src/com/hp/hpl/jena/sparql/util/gr...

Author: andy
Date: Wed Jul 20 14:14:28 2011
New Revision: 1148783

URL: http://svn.apache.org/viewvc?rev=1148783&view=rev
Log:
JENA-82: Reifier2 didn't delete reifications of one triple correctly.

Added:
    incubator/jena/Jena2/ARQ/trunk/src-dev/reports/ReportReifierRemove.java   (with props)
    incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/graph/TestReifier2.java   (with props)
    incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphMemSimple2.java   (with props)
    incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/PlainGraphMem.java
      - copied, changed from r1148637, incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/PlainGraphMem.java
    incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/Reifier2.java
      - copied, changed from r1148637, incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/Reifier2.java
Removed:
    incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/Reifier2.java
    incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/PlainGraphMem.java
Modified:
    incubator/jena/Jena2/ARQ/trunk/D.ttl
    incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphBase2.java
    incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/graph/GraphFactory.java

Modified: incubator/jena/Jena2/ARQ/trunk/D.ttl
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/D.ttl?rev=1148783&r1=1148782&r2=1148783&view=diff
==============================================================================
Binary files - no diff available.

Added: incubator/jena/Jena2/ARQ/trunk/src-dev/reports/ReportReifierRemove.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src-dev/reports/ReportReifierRemove.java?rev=1148783&view=auto
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src-dev/reports/ReportReifierRemove.java (added)
+++ incubator/jena/Jena2/ARQ/trunk/src-dev/reports/ReportReifierRemove.java Wed Jul 20 14:14:28 2011
@@ -0,0 +1,71 @@
+/*
+ * 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 reports;
+
+import org.junit.Test ;
+import static org.junit.Assert.* ;
+
+import com.hp.hpl.jena.graph.Reifier ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
+import com.hp.hpl.jena.rdf.model.Property ;
+import com.hp.hpl.jena.rdf.model.Resource ;
+import com.hp.hpl.jena.rdf.model.Statement ;
+import com.hp.hpl.jena.sparql.graph.Reifier2 ;
+
+public class ReportReifierRemove
+{
+    @Test
+    public void testOverenthusiasticDeletion_1() {
+        
+        
+        Model model = ModelFactory.createDefaultModel() ;
+        model.setNsPrefix("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#") ;
+        model.setNsPrefix("rex", "http://jug.basistech.com/2011/01/rex-entity#") ;
+        model.setNsPrefix("g", "urn:jug:global#") ;
+
+        Resource per1 = model.createResource("urn:jug:global#per1");
+        Resource per2 = model.createResource("urn:jug:global#per2");
+        Property pred1 = model.createProperty("http://jug.basistech.com/2011/01/rex-entity#coOccurInSentence");
+        Property pred2 = model.createProperty("http://jug.basistech.com/2011/01/rex-entity#hasSibling");
+        Statement s1 = model.createStatement(per1, pred1, per2);
+        Statement s2 = model.createStatement(per2, pred2, per2);
+        
+        s1.createReifiedStatement();
+        s2.createReifiedStatement();
+        
+        model.write(System.out, "TTL") ;
+        System.out.println() ;
+        System.out.println() ;
+        System.out.println() ;
+        System.out.println() ;
+        assertEquals(2, model.listReifiedStatements().toList().size());
+        
+        Reifier r = new Reifier2(model.getGraph()) ;
+        
+        //r = model.getGraph().getReifier() ;
+        
+        r.remove(s2.asTriple()) ;
+        //s2.removeReification();
+        model.write(System.out, "TTL") ;
+        assertEquals(1, model.listReifiedStatements().toList().size());
+    }
+    
+}

Propchange: incubator/jena/Jena2/ARQ/trunk/src-dev/reports/ReportReifierRemove.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/graph/TestReifier2.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/graph/TestReifier2.java?rev=1148783&view=auto
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/graph/TestReifier2.java (added)
+++ incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/graph/TestReifier2.java Wed Jul 20 14:14:28 2011
@@ -0,0 +1,102 @@
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ * [See end of file]
+ */
+
+package com.hp.hpl.jena.sparql.graph;
+
+
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.graph.Reifier ;
+import com.hp.hpl.jena.graph.test.AbstractTestReifier ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.ModelFactory ;
+import com.hp.hpl.jena.rdf.model.Property ;
+import com.hp.hpl.jena.rdf.model.Resource ;
+import com.hp.hpl.jena.rdf.model.Statement ;
+import com.hp.hpl.jena.shared.ReificationStyle ;
+
+public class TestReifier2 extends AbstractTestReifier
+{
+    public TestReifier2()
+    {
+        super("Reifier2") ;
+    }
+
+    @Override
+    public Graph getGraph()
+    {
+        return new GraphMemSimple2() ;
+    }
+
+    @Override
+    public Graph getGraph(ReificationStyle style)
+    {
+        if ( style != ReificationStyle.Standard )
+        {}
+        return new GraphMemSimple2() ;
+    }
+
+    // Standard only.
+    @Override public void testStyle() { assertSame( ReificationStyle.Standard, 
+                                                    getGraph( ReificationStyle.Standard ).getReifier().getStyle() ); }
+    
+    // These are tests on other styles.
+    @Override public void testIntercept() {}              // "Convenient"
+    @Override public void testMinimalExplode() {}         // "Minimal"
+    @Override public void testDynamicHiddenTriples() {}   // "Minimal"
+
+//    @Override public void testBulkClearReificationTriples() {}
+//    @Override public void testBulkClearReificationTriples2() {}
+    
+    /*@Test*/ public void testRemoveReification()
+    {
+        // Test from Benson Margulies : JENA-82
+        Model model= ModelFactory.createModelForGraph(getGraph()) ;
+        Resource per1 = model.createResource("urn:x:global#per1");
+        Resource per2 = model.createResource("urn:x:global#per2");
+        Property pred1 = model.createProperty("http://example/ns#prop1");
+        Property pred2 = model.createProperty("http://example/ns#prop2") ;
+        Statement s1 = model.createStatement(per1, pred1, per2);
+        Statement s2 = model.createStatement(per2, pred2, per2);
+        
+        s1.createReifiedStatement();
+        s2.createReifiedStatement();
+        
+        assertEquals(2, model.listReifiedStatements().toList().size());
+        
+        Reifier r = new Reifier2(model.getGraph()) ;
+        //r = model.getGraph().getReifier() ;
+        r.remove(s2.asTriple()) ;
+        assertEquals(1, model.listReifiedStatements().toList().size());
+    }
+    
+}
+
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
\ No newline at end of file

Propchange: incubator/jena/Jena2/ARQ/trunk/src-test/com/hp/hpl/jena/sparql/graph/TestReifier2.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphBase2.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphBase2.java?rev=1148783&r1=1148782&r2=1148783&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphBase2.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphBase2.java Wed Jul 20 14:14:28 2011
@@ -19,7 +19,6 @@ import com.hp.hpl.jena.shared.AddDeniedE
 import com.hp.hpl.jena.shared.ClosedException ;
 import com.hp.hpl.jena.shared.DeleteDeniedException ;
 import com.hp.hpl.jena.shared.PrefixMapping ;
-import com.hp.hpl.jena.sparql.core.Reifier2 ;
 import com.hp.hpl.jena.util.iterator.ClosableIterator ;
 import com.hp.hpl.jena.util.iterator.ExtendedIterator ;
 

Added: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphMemSimple2.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphMemSimple2.java?rev=1148783&view=auto
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphMemSimple2.java (added)
+++ incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphMemSimple2.java Wed Jul 20 14:14:28 2011
@@ -0,0 +1,154 @@
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ * [See end of file]
+ */
+
+package com.hp.hpl.jena.sparql.graph;
+
+import java.util.HashSet ;
+import java.util.Iterator ;
+import java.util.Set ;
+
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.graph.TripleMatch ;
+import com.hp.hpl.jena.graph.impl.SimpleEventManager ;
+import com.hp.hpl.jena.graph.query.QueryHandler ;
+import com.hp.hpl.jena.graph.query.SimpleQueryHandler ;
+import com.hp.hpl.jena.shared.PrefixMapping ;
+import com.hp.hpl.jena.shared.impl.PrefixMappingImpl ;
+import com.hp.hpl.jena.util.iterator.ClosableIterator ;
+import com.hp.hpl.jena.util.iterator.ExtendedIterator ;
+import com.hp.hpl.jena.util.iterator.Filter ;
+
+public class GraphMemSimple2 extends GraphBase2
+{
+    private Set<Triple> triples = new HashSet<Triple>() ;
+    
+    public GraphMemSimple2() {}
+    
+    @Override
+    public void performAdd( Triple t )
+    { triples.add(t) ; }
+
+    @Override
+    public void performDelete( Triple t ) 
+    { triples.remove(t) ; }
+    
+    @Override
+    public QueryHandler queryHandler()
+    {
+        return new SimpleQueryHandler(this) ;
+    }
+
+    @Override
+    protected PrefixMapping createPrefixMapping()
+    {
+        return new PrefixMappingImpl() ;
+    }
+
+    @Override
+    public boolean graphBaseContains( Triple t ) 
+    {
+        if ( t.isConcrete() )
+            return triples.contains( t ) ;
+        
+        ClosableIterator<Triple> it = find( t );
+        try {
+            for ( ; it.hasNext() ; )
+            {
+                Triple t2 = it.next() ;
+                if ( tripleContained(t, t2) )
+                    return true ;
+            }
+        } finally { it.close(); }
+        return false ;
+    }
+    
+    @Override
+    protected ExtendedIterator<Triple> graphBaseFind(TripleMatch m)
+    {
+        Iterator<Triple> iter = triples.iterator() ;
+        return 
+            SimpleEventManager.notifyingRemove( this, iter ) 
+            .filterKeep ( new TripleMatchFilterEquality( m.asTriple() ) );
+    }
+    
+    static boolean tripleContained(Triple patternTriple, Triple dataTriple)
+    {
+        return
+            equalNode(patternTriple.getSubject(),   dataTriple.getSubject()) &&
+            equalNode(patternTriple.getPredicate(), dataTriple.getPredicate()) &&
+            equalNode(patternTriple.getObject(),    dataTriple.getObject()) ;
+    }
+    
+    private static boolean equalNode(Node m, Node n)
+    {
+        // m should not be null unless .getMatchXXXX used to get the node.
+        // Language tag canonicalization
+        n = fixupNode(n) ;
+        m = fixupNode(m) ;
+        return (m==null) || (m == Node.ANY) || m.equals(n) ;
+    }
+    
+    private static Node fixupNode(Node node)
+    {
+        if ( node == null || node == Node.ANY )
+            return node ;
+
+        // RDF says ... language tags should be canonicalized to lower case.
+        if ( node.isLiteral() )
+        {
+            String lang = node.getLiteralLanguage() ;
+            if ( lang != null && ! lang.equals("") )
+                node = Node.createLiteral(node.getLiteralLexicalForm(),
+                                          lang.toLowerCase(),
+                                          node.getLiteralDatatype()) ;
+        }
+        return node ; 
+    }
+    
+    static class TripleMatchFilterEquality extends Filter<Triple>
+    {
+        final protected Triple tMatch;
+    
+        /** Creates new TripleMatchFilter */
+        public TripleMatchFilterEquality(Triple tMatch) 
+            { this.tMatch = tMatch; }
+        
+        @Override
+        public boolean accept(Triple t)
+        {
+            return tripleContained(tMatch, t) ;
+        }
+        
+    }
+    
+}
+/*
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
\ No newline at end of file

Propchange: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/GraphMemSimple2.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/PlainGraphMem.java (from r1148637, incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/PlainGraphMem.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/PlainGraphMem.java?p2=incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/PlainGraphMem.java&p1=incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/PlainGraphMem.java&r1=1148637&r2=1148783&rev=1148783&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/PlainGraphMem.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/PlainGraphMem.java Wed Jul 20 14:14:28 2011
@@ -4,7 +4,7 @@
  * [See end of file]
  */
 
-package com.hp.hpl.jena.sparql.util;
+package com.hp.hpl.jena.sparql.graph;
 
 import java.util.Iterator ;
 
@@ -25,6 +25,8 @@ import com.hp.hpl.jena.util.iterator.Fil
 
 public class PlainGraphMem extends SmallGraphMem
 {
+    public PlainGraphMem() {}
+    
     // In a normal memory graph, 
     // TripleMatchFilter uses
     //   Triple.matches uses

Copied: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/Reifier2.java (from r1148637, incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/Reifier2.java)
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/Reifier2.java?p2=incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/Reifier2.java&p1=incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/Reifier2.java&r1=1148637&r2=1148783&rev=1148783&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/core/Reifier2.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/graph/Reifier2.java Wed Jul 20 14:14:28 2011
@@ -4,7 +4,7 @@
  * [See end of file]
  */
 
-package com.hp.hpl.jena.sparql.core;
+package com.hp.hpl.jena.sparql.graph;
 
 
 import java.util.Collection ;
@@ -27,6 +27,9 @@ import com.hp.hpl.jena.shared.CannotReif
 import com.hp.hpl.jena.shared.ReificationStyle ;
 import com.hp.hpl.jena.sparql.algebra.Algebra ;
 import com.hp.hpl.jena.sparql.algebra.Op ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
+import com.hp.hpl.jena.sparql.core.Var ;
 import com.hp.hpl.jena.sparql.engine.Plan ;
 import com.hp.hpl.jena.sparql.engine.QueryEngineFactory ;
 import com.hp.hpl.jena.sparql.engine.QueryEngineRegistry ;
@@ -83,7 +86,7 @@ public class Reifier2 implements Reifier
     private static class MapperToNode extends NiceIterator<Node>
     {
         private final QueryIterator iter ;
-        private Var var ;
+        private final Var var ;
         MapperToNode(QueryIterator iter, Var var) { this.iter = iter ; this.var = var ; }
         @Override public boolean hasNext() { return iter.hasNext() ; } 
         @Override public Node next()
@@ -271,15 +274,14 @@ public class Reifier2 implements Reifier
     //@Override
     public void remove(Triple triple)
     {
-        remove(null, triple) ;
+        // Materialize the nodes to delete - avoid ConcurrentModificationException.
+        for ( Node n : Iter.toList(allNodes(triple)) )
+            remove(n, triple) ;
     }
 
     //@Override
     public void remove(Node node, Triple triple)
     {
-        if ( node == null )
-            node = Node.ANY ;
-        
         //QueryIterator qIter = nodesReifTriple(node, triple) ;
         Set<Triple> triples = new HashSet<Triple>();
         triplesToZap(triples, node, rdfType, statement) ;

Modified: incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/graph/GraphFactory.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/graph/GraphFactory.java?rev=1148783&r1=1148782&r2=1148783&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/graph/GraphFactory.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/com/hp/hpl/jena/sparql/util/graph/GraphFactory.java Wed Jul 20 14:14:28 2011
@@ -1,6 +1,7 @@
 /*
  * (c) Copyright 2008, 2009 Hewlett-Packard Development Company, LP
- * All rights reserved.
+ * (c) Copyright 2011 Epimorphics Ltd.
+s * All rights reserved.
  * [See end of file]
  */
 
@@ -11,7 +12,7 @@ import com.hp.hpl.jena.graph.Graph ;
 import com.hp.hpl.jena.query.ARQ ;
 import com.hp.hpl.jena.rdf.model.Model ;
 import com.hp.hpl.jena.rdf.model.ModelFactory ;
-import com.hp.hpl.jena.sparql.util.PlainGraphMem ;
+import com.hp.hpl.jena.sparql.graph.GraphMemSimple2 ;
 import com.hp.hpl.jena.sparql.util.RefBoolean ;
 
 /** Ways to make graphs and models */
@@ -42,7 +43,7 @@ public class GraphFactory
     /** Very simple graph that uses same-term for find() (small-scale use only) */
     public static Graph createPlainGraph()
     {
-        return new PlainGraphMem() ;
+        return new GraphMemSimple2() ; // new PlainGraphMem() ;
     }
 
     public static Graph sinkGraph()
@@ -68,6 +69,8 @@ public class GraphFactory
 
 /*
  * (c) Copyright 2008, 2009 Hewlett-Packard Development Company, LP
+ * (c) Copyright 2011 Epimorphics Ltd.
+ * 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without