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 2013/01/08 20:07:29 UTC

svn commit: r1430447 [3/10] - in /jena/branches/streaming-update: ./ apache-jena/ apache-jena/bat/ apache-jena/bin/ jena-arq/ jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/ jena-core/ jena-core/src/main/java/com/hp/hpl/jena/assembler/ jena-core/s...

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMem.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMem.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMem.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMem.java Tue Jan  8 19:07:23 2013
@@ -19,186 +19,146 @@
 package com.hp.hpl.jena.mem;
 
 import com.hp.hpl.jena.graph.* ;
-import com.hp.hpl.jena.graph.Reifier.Util ;
-import com.hp.hpl.jena.graph.impl.SimpleReifier ;
 import com.hp.hpl.jena.graph.impl.TripleStore ;
-import com.hp.hpl.jena.graph.query.* ;
-import com.hp.hpl.jena.shared.ReificationStyle ;
 import com.hp.hpl.jena.util.iterator.ExtendedIterator ;
 
 public class GraphMem extends GraphMemBase
-    {
+{
     public GraphMem()
-        { this( ReificationStyle.Minimal ); }
-    
-    public GraphMem( ReificationStyle style )
-        { super( style ); }
+    { super(  ); }
 
     @Override protected TripleStore createTripleStore()
-        { return new GraphTripleStoreMem( this ); }
+    { return new GraphTripleStoreMem( this ); }
 
     @Override protected void destroy()
-        { store.close(); }
+    { store.close(); }
 
     @Override public void performAdd( Triple t )
-        { if (!getReifier().handledAdd( t )) store.add( t ); }
+    { store.add( t ); }
 
     @Override public void performDelete( Triple t )
-        { if (!getReifier().handledRemove( t )) store.delete( t ); }
+    { store.delete( t ); }
 
     @Override public int graphBaseSize()  
-        { return store.size(); }
-    
-    @Override public QueryHandler queryHandler()
-        { 
-        if (queryHandler == null) queryHandler = new GraphMemQueryHandler( this );
-        return queryHandler;
-        }
+    { return store.size(); }
 
     @Override protected GraphStatisticsHandler createStatisticsHandler()
-        { return new GraphMemStatisticsHandler( (GraphTripleStoreMem) store, getReifier() ); }
-    
+    { return new GraphMemStatisticsHandler( (GraphTripleStoreMem) store ); }
+
     /**
         The GraphMemStatisticsHandler exploits the existing TripleStoreMem
         indexes to deliver statistics information for single-concrete-node queries
         and for trivial cases of two-concrete-node queries.        
-    */
+     */
     protected static class GraphMemStatisticsHandler implements GraphStatisticsHandler
-        {
+    {
         protected final GraphTripleStoreMem store;
-        protected final Reifier reifier;
-        
-        public GraphMemStatisticsHandler( GraphTripleStoreMem store, Reifier reifier )
-            { this.store = store; this.reifier = reifier; }
+
+        public GraphMemStatisticsHandler( GraphTripleStoreMem store )
+        { this.store = store; }
 
         private static class C 
-            {
+        {
             static final int NONE = 0;
             static final int S = 1, P = 2, O = 4;
             static final int SP = S + P, SO = S + O, PO = P + O;
             static final int SPO = S + P + O;
-            }
-        
+        }
+
         /**
             Answer a good estimate of the number of triples matching (S, P, O)
             if cheaply possible.
-            
+
             <p>If there are any reifier triples, return -1. (We may be able to
             improve this later.)
-            
+
             <p>If only one of S, P, O is concrete, answers the number of triples
             with that value in that field.
-            
+
             <p>If two of S, P, P are concrete and at least one of them has no
             corresponding triples, answers 0.
-            
+
             <p>Otherwise answers -1, ie, no information available. (May change;
             the two degenerate cases might deserve an answer.)
-            
+
          	@see com.hp.hpl.jena.graph.GraphStatisticsHandler#getStatistic(com.hp.hpl.jena.graph.Node, com.hp.hpl.jena.graph.Node, com.hp.hpl.jena.graph.Node)
          */
         @Override
         public long getStatistic( Node S, Node P, Node O )
-            {
-            if (reifier.size() > 0) return -1;
+        {
             int concrete = (S.isConcrete() ? C.S : 0) + (P.isConcrete() ? C.P : 0) + (O.isConcrete() ? C.O : 0);
             switch (concrete)
-                {
+            {
                 case C.NONE:
                     return store.size();
-                
+
                 case C.S:
                     return countInMap( S, store.getSubjects() );
-                    
+
                 case C.SP:
                     return countsInMap( S, store.getSubjects(), P, store.getPredicates() );
-                
+
                 case C.SO:
                     return countsInMap( S, store.getSubjects(), O, store.getObjects() );
-                    
+
                 case C.P:
                     return countInMap( P, store.getPredicates() );
-                    
+
                 case C.PO:
                     return countsInMap( P, store.getPredicates(), O, store.getObjects() );
-                
+
                 case C.O:
                     return countInMap( O, store.getObjects() );
-                    
+
                 case C.SPO:
                     return store.contains( Triple.create( S, P, O ) ) ? 1 : 0;
-                }
-            return -1;
             }
+            return -1;
+        }
 
         public long countsInMap( Node a, NodeToTriplesMapMem mapA, Node b, NodeToTriplesMapMem mapB )
-            {
+        {
             long countA = countInMap( a, mapA ), countB = countInMap( b, mapB );
             return countA == 0 || countB == 0 ? 0 : -1L;
-            }
-        
+        }
+
         public long countInMap( Node n, NodeToTriplesMapMem map )
-            {
+        {
             TripleBunch b = map.get( n.getIndexingValue() );
             return b == null ? 0 : b.size();
-            }
         }
-    
+    }
+
     /**
          Answer an ExtendedIterator over all the triples in this graph that match the
          triple-pattern <code>m</code>. Delegated to the store.
      */
     @Override public ExtendedIterator<Triple> graphBaseFind( TripleMatch m ) 
-        { return store.find( m.asTriple() ); }
-
-    public Applyer createApplyer( ProcessedTriple pt )
-        { 
-        Applyer plain = ((GraphTripleStoreMem) store).createApplyer( pt ); 
-        return matchesReification( pt ) && hasReifications() ? withReification( plain, pt ) : plain;
-        }
-
-    protected boolean hasReifications()
-        { return reifier != null && reifier.size() > 0; }
-
-    public static boolean matchesReification( QueryTriple pt )
-        {
-        return 
-            pt.P.node.isVariable()
-            || Util.isReificationPredicate( pt.P.node )
-            || Util.isReificationType( pt.P.node, pt.O.node )
-            ;
-        }
-    
-    protected Applyer withReification( final Applyer plain, final QueryTriple pt )
-        {
-        return new Applyer() 
-            {
-            @Override public void applyToTriples( Domain d, Matcher m, StageElement next )
-                {
-                plain.applyToTriples( d, m, next );
-                Triple tm = new Triple
-                    ( pt.S.finder( d ), pt.P.finder( d ), pt.O.finder( d ) );
-                ExtendedIterator<Triple> it = reifier.findExposed( tm );
-                while (it.hasNext())
-                    if (m.match( d, it.next() )) next.run( d );
-                }
-            };
-        }
+    { return store.find( m.asTriple() ); }
 
     /**
          Answer true iff this graph contains <code>t</code>. If <code>t</code>
          happens to be concrete, then we hand responsibility over to the store.
          Otherwise we use the default implementation.
-    */
+     */
     @Override public boolean graphBaseContains( Triple t )
-        { return t.isConcrete() ? store.contains( t ) : super.graphBaseContains( t ); }
-    
+    { return t.isConcrete() ? store.contains( t ) : super.graphBaseContains( t ); }
+
     /**
         Clear this GraphMem, ie remove all its triples (delegated to the store).
-    */
+     */
     @Override public void clear()
-        { 
-        store.clear(); 
-        ((SimpleReifier) getReifier()).clear();
-        }
+    { 
+        clearStore(); 
+        getEventManager().notifyEvent(this, GraphEvents.removeAll ) ;   
+    }
+    
+    /**
+    Clear this GraphMem, ie remove all its triples (delegated to the store).
+     */
+    public void clearStore()
+    { 
+        store.clear();
     }
+    
+}

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMemBase.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMemBase.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMemBase.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMemBase.java Tue Jan  8 19:07:23 2013
@@ -18,9 +18,10 @@
 
 package com.hp.hpl.jena.mem;
 
-import com.hp.hpl.jena.graph.*;
-import com.hp.hpl.jena.graph.impl.*;
-import com.hp.hpl.jena.shared.ReificationStyle;
+import com.hp.hpl.jena.graph.BulkUpdateHandler ;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.graph.impl.GraphBase ;
+import com.hp.hpl.jena.graph.impl.TripleStore ;
 
 /**
      GraphMemBase - a common base class for GraphMem and SmallGraphMem.
@@ -45,14 +46,13 @@ public abstract class GraphMemBase exten
     public final TripleStore store;
     
     /**
-         initialise a GraphMemBase withn its count set to 1.
+         initialise a GraphMemBase with its count set to 1.
     */
-    public GraphMemBase( ReificationStyle style )
-        { 
-        super( style );
+    public GraphMemBase( )
+    {
         store = createTripleStore();
         count = 1; 
-        }
+    }
     
     protected abstract TripleStore createTripleStore();
     
@@ -86,12 +86,8 @@ public abstract class GraphMemBase exten
             }
         }
     
-    /**
-         Remove all triples from this graph; used to implement removeAll.
-    */
-    public abstract void clear();
-
     @Override
+    @Deprecated
     public BulkUpdateHandler getBulkUpdateHandler()
         {
         if (bulkHandler == null) bulkHandler = new GraphMemBulkUpdateHandler( this );

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMemBulkUpdateHandler.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMemBulkUpdateHandler.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMemBulkUpdateHandler.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphMemBulkUpdateHandler.java Tue Jan  8 19:07:23 2013
@@ -32,6 +32,7 @@ public class GraphMemBulkUpdateHandler e
 	    { super( graph ); }
 	
 	@Override
+	@Deprecated
     public void removeAll()
 	    {
 	    clearComponents();

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphTripleStoreMem.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphTripleStoreMem.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphTripleStoreMem.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/GraphTripleStoreMem.java Tue Jan  8 19:07:23 2013
@@ -18,14 +18,9 @@
 
 package com.hp.hpl.jena.mem;
 
-import java.util.Iterator ;
-
 import com.hp.hpl.jena.graph.Graph ;
-import com.hp.hpl.jena.graph.Node ;
-import com.hp.hpl.jena.graph.Triple ;
 import com.hp.hpl.jena.graph.Triple.Field ;
 import com.hp.hpl.jena.graph.impl.TripleStore ;
-import com.hp.hpl.jena.graph.query.* ;
 
 public class GraphTripleStoreMem extends GraphTripleStoreBase implements TripleStore
     {    
@@ -47,54 +42,4 @@ public class GraphTripleStoreMem extends
     public NodeToTriplesMapMem getObjects()
         { return (NodeToTriplesMapMem) objects; }
     
-    public Applyer createApplyer( ProcessedTriple pt )
-        {
-        if (pt.hasNoVariables())
-            return containsApplyer( pt );
-        if (pt.S instanceof QueryNode.Fixed) 
-            return getSubjects().createFixedSApplyer( pt );
-        if (pt.O instanceof QueryNode.Fixed) 
-            return getObjects().createFixedOApplyer( pt );
-        if (pt.S instanceof QueryNode.Bound) 
-            return getSubjects().createBoundSApplyer( pt );
-        if (pt.O instanceof QueryNode.Bound) 
-            return getObjects().createBoundOApplyer( pt );
-        return varSvarOApplyer( pt );
-        }
-
-    protected Applyer containsApplyer( final ProcessedTriple pt )
-        { 
-        return new Applyer()
-            {
-            @Override
-            public void applyToTriples( Domain d, Matcher m, StageElement next )
-                {
-                Triple t = new Triple( pt.S.finder( d ), pt.P.finder( d ), pt.O.finder( d ) );
-                if (objects.containsBySameValueAs( t )) next.run( d );
-                }    
-            };
-        }
-
-    protected Applyer varSvarOApplyer( final QueryTriple pt )
-        { 
-        return new Applyer()
-            {
-            protected final QueryNode p = pt.P;
-        
-            public Iterator<Triple> find( Domain d )
-                {
-                Node P = p.finder( d );
-                if (P.isConcrete())
-                    return predicates.iterator( P, Node.ANY, Node.ANY );
-                else
-                    return subjects.iterateAll();
-                }
-    
-            @Override public void applyToTriples( Domain d, Matcher m, StageElement next )
-                {
-                Iterator<Triple> it = find( d );
-                while (it.hasNext()) if (m.match( d, it.next() )) next.run( d );
-                }
-            };
-        }
     }

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/HashedTripleBunch.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/HashedTripleBunch.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/HashedTripleBunch.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/HashedTripleBunch.java Tue Jan  8 19:07:23 2013
@@ -18,11 +18,10 @@
 
 package com.hp.hpl.jena.mem;
 
-import java.util.*;
+import java.util.Iterator ;
 
-import com.hp.hpl.jena.graph.Triple;
-import com.hp.hpl.jena.graph.query.*;
-import com.hp.hpl.jena.util.iterator.*;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.util.iterator.ExtendedIterator ;
 
 public class HashedTripleBunch extends HashCommon<Triple> implements TripleBunch
     {    
@@ -106,15 +105,4 @@ public class HashedTripleBunch extends H
     public ExtendedIterator<Triple> iterator( final NotifyEmpty container )
         { return keyIterator( container ); }
     
-    @Override
-    public void app( Domain d, StageElement next, MatchOrBind s )
-        {
-        int i = capacity, initialChanges = changes;
-        while (i > 0)
-            {
-            if (changes > initialChanges) throw new ConcurrentModificationException();
-            Object t = keys[--i];
-            if (t != null  && s.matches( (Triple) t )) next.run( d );
-            }
-        }
-    }
+}
\ No newline at end of file

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/NodeToTriplesMapMem.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/NodeToTriplesMapMem.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/NodeToTriplesMapMem.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/NodeToTriplesMapMem.java Tue Jan  8 19:07:23 2013
@@ -23,10 +23,6 @@ import java.util.Iterator ;
 import com.hp.hpl.jena.graph.Node ;
 import com.hp.hpl.jena.graph.Triple ;
 import com.hp.hpl.jena.graph.Triple.Field ;
-import com.hp.hpl.jena.graph.query.Applyer ;
-import com.hp.hpl.jena.graph.query.Domain ;
-import com.hp.hpl.jena.graph.query.Matcher ;
-import com.hp.hpl.jena.graph.query.StageElement ;
 import com.hp.hpl.jena.shared.JenaException ;
 import com.hp.hpl.jena.util.iterator.ExtendedIterator ;
 import com.hp.hpl.jena.util.iterator.NullIterator ;
@@ -133,69 +129,6 @@ public class NodeToTriplesMapMem extends
            ;
        }    
 
-    public Applyer createFixedOApplyer( final ProcessedTriple Q )
-        {        
-        final TripleBunch ss = bunchMap.get( Q.O.node.getIndexingValue() );
-        if (ss == null)
-            return Applyer.empty;
-        else
-            {
-            return new Applyer() 
-                {
-                final MatchOrBind x = MatchOrBind.createSP( Q );
-                
-                @Override
-                public void applyToTriples( Domain d, Matcher m, StageElement next )
-                    { ss.app( d, next, x.reset( d ) ); }
-                };
-            }
-        }
-
-    public Applyer createBoundOApplyer( final ProcessedTriple pt )
-        {        
-        return new Applyer()
-            {
-            final MatchOrBind x = MatchOrBind.createSP( pt );
-            
-            @Override public void applyToTriples( Domain d, Matcher m, StageElement next )
-                {
-                TripleBunch c = bunchMap.get( pt.O.finder( d ).getIndexingValue() );
-                if (c != null) c.app( d, next, x.reset( d ) );
-                }
-            };
-        }
-    
-    public Applyer createBoundSApplyer( final ProcessedTriple pt )
-        {
-        return new Applyer()
-            {
-            final MatchOrBind x = MatchOrBind.createPO( pt );
-            
-            @Override public void applyToTriples( Domain d, Matcher m, StageElement next )
-                {
-                TripleBunch c = bunchMap.get( pt.S.finder( d ) );
-                if (c != null) c.app( d, next, x.reset( d ) );
-                }
-            };
-        }
-
-    public Applyer createFixedSApplyer( final ProcessedTriple Q )
-        {
-        final TripleBunch ss = bunchMap.get( Q.S.node );
-        if (ss == null)
-            return Applyer.empty;
-        else
-            {
-            return new Applyer() 
-                {
-                final MatchOrBind x = MatchOrBind.createPO( Q );
-                
-                @Override public void applyToTriples( Domain d, Matcher m, StageElement next )
-                    { ss.app( d, next, x.reset( d ) ); }
-                };
-            }
-        }
-       
     protected TripleBunch get( Object index )
         { return bunchMap.get( index ); }
     

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/SetBunch.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/SetBunch.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/SetBunch.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/SetBunch.java Tue Jan  8 19:07:23 2013
@@ -18,15 +18,14 @@
 
 package com.hp.hpl.jena.mem;
 
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import com.hp.hpl.jena.graph.*;
-import com.hp.hpl.jena.graph.query.Domain;
-import com.hp.hpl.jena.graph.query.StageElement;
-import com.hp.hpl.jena.util.iterator.ExtendedIterator;
-import com.hp.hpl.jena.util.iterator.WrappedIterator;
+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.util.iterator.ExtendedIterator ;
+import com.hp.hpl.jena.util.iterator.WrappedIterator ;
 
 public class SetBunch implements TripleBunch
     {
@@ -82,11 +81,4 @@ public class SetBunch implements TripleB
     public ExtendedIterator<Triple> iterator()
         { return WrappedIterator.create( elements.iterator() ); }        
     
-    @Override
-    public void app( Domain d, StageElement next, MatchOrBind s )
-        {
-        Iterator<Triple> it = iterator();
-        while (it.hasNext())
-            if (s.matches( it.next() )) next.run( d );
-        }
     }

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/TripleBunch.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/TripleBunch.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/TripleBunch.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/mem/TripleBunch.java Tue Jan  8 19:07:23 2013
@@ -18,11 +18,8 @@
 
 package com.hp.hpl.jena.mem;
 
-import com.hp.hpl.jena.graph.Triple;
-import com.hp.hpl.jena.graph.query.Domain;
-import com.hp.hpl.jena.graph.query.StageElement;
-
-import com.hp.hpl.jena.util.iterator.ExtendedIterator;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.util.iterator.ExtendedIterator ;
 
 /**
     A bunch of triples - a stripped-down set with specialized methods. A
@@ -76,14 +73,4 @@ public interface TripleBunch 
     */
     public abstract ExtendedIterator<Triple> iterator( HashCommon.NotifyEmpty container );
     
-    /**
-         For every triple t in this bunch that matches <code>s<code>, invoke
-         <code>next.run(d)</code>. <code>d</code> may have been 
-         side-effected by the match. <code>app</code> is the main reason
-         that TripleBunch exists at all: it's a way to iterate as fast as possible
-         over the triples in the context of a graph query, without having to
-         construct an Iterator object which has to maintain the iteration state
-         in instance variables.
-    */
-    public abstract void app( Domain d, StageElement next, MatchOrBind s );
     }

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/n3/N3JenaWriterCommon.java Tue Jan  8 19:07:23 2013
@@ -232,10 +232,9 @@ public class N3JenaWriterCommon implemen
     protected void finishWriting() {}
     protected void prepare(Model model) {}
     
-    protected void processModel(Model baseModel)
+    protected void processModel(Model model)
     {
-        prefixMap = baseModel.getNsPrefixMap() ;
-        Model model = ModelFactory.withHiddenStatements( baseModel );
+        prefixMap = model.getNsPrefixMap() ;
         bNodesMap = new HashMap<Resource, String>() ;
 
         // PrefixMapping (to Jena 2.5.7 at least)

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntModel.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntModel.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntModel.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/OntModel.java Tue Jan  8 19:07:23 2013
@@ -23,15 +23,14 @@ package com.hp.hpl.jena.ontology;
 
 // Imports
 ///////////////
-import com.hp.hpl.jena.graph.Graph;
-import com.hp.hpl.jena.graph.query.BindingQueryPlan;
-import com.hp.hpl.jena.rdf.model.*;
-import com.hp.hpl.jena.util.iterator.ExtendedIterator;
-
-import java.io.*;
-import java.util.*;
-
-
+import java.io.OutputStream ;
+import java.io.Writer ;
+import java.util.List ;
+import java.util.Set ;
+
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.rdf.model.* ;
+import com.hp.hpl.jena.util.iterator.ExtendedIterator ;
 
 /**
  * <p>
@@ -1535,23 +1534,6 @@ public interface OntModel
     public OntModelSpec getSpecification();
 
 
-    /**
-     * <p>
-     * Answer the iterator over the resources from the graph that satisfy the given
-     * query, followed by the answers to the alternative queries (if specified). A
-     * typical scenario is that the main query gets resources of a given class (say,
-     * <code>rdfs:Class</code>), while the altQueries query for aliases for that
-     * type (such as <code>daml:Class</code>).
-     * </p>
-     *
-     * @param query A query to run against the model
-     * @param altQueries An optional list of subsidiary queries to chain on to the first
-     * @return ExtendedIterator An iterator over the (assumed single) results of
-     * executing the queries.
-     */
-    public <T extends RDFNode> ExtendedIterator<T> queryFor( BindingQueryPlan query, List<BindingQueryPlan> altQueries, Class<T> asKey );
-
-
     // output operations
 
     /**

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntClassImpl.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntClassImpl.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntClassImpl.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntClassImpl.java Tue Jan  8 19:07:23 2013
@@ -30,8 +30,6 @@ import com.hp.hpl.jena.enhanced.EnhGraph
 import com.hp.hpl.jena.enhanced.EnhNode ;
 import com.hp.hpl.jena.enhanced.Implementation ;
 import com.hp.hpl.jena.graph.Node ;
-import com.hp.hpl.jena.graph.query.BindingQueryPlan ;
-import com.hp.hpl.jena.graph.query.GraphQuery ;
 import com.hp.hpl.jena.ontology.* ;
 import com.hp.hpl.jena.rdf.model.* ;
 import com.hp.hpl.jena.reasoner.InfGraph ;
@@ -102,11 +100,6 @@ public class OntClassImpl
     // Instance variables
     //////////////////////////////////
 
-    /** Query for properties with this class as domain */
-    protected BindingQueryPlan m_domainQuery;
-
-    /** Query for properties restricted by this class */
-    protected BindingQueryPlan m_restrictionPropQuery = null;
 
 
     // Constructors
@@ -122,25 +115,8 @@ public class OntClassImpl
      */
     public OntClassImpl( Node n, EnhGraph g ) {
         super( n, g );
-
-        // pre-built queries
-        // ?x a rdf:Property ; rdfs:domain this.
-        GraphQuery q = new GraphQuery();
-        q.addMatch( GraphQuery.X, getProfile().DOMAIN().asNode(), asNode() );
-
-        m_domainQuery = getModel().queryHandler().prepareBindings( q, new Node[] {GraphQuery.X} );
-
-        // this rdfs:subClassOf ?x. ?x owl:onProperty ?y.
-        if (getProfile().ON_PROPERTY() != null) {
-            q = new GraphQuery();
-            q.addMatch( asNode(), getProfile().SUB_CLASS_OF().asNode(), GraphQuery.X );
-            q.addMatch( GraphQuery.X, getProfile().ON_PROPERTY().asNode(), GraphQuery.Y );
-
-            m_restrictionPropQuery = getModel().queryHandler().prepareBindings( q, new Node[] {GraphQuery.Y} );
-        }
     }
 
-
     // External signature methods
     //////////////////////////////////
 

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntModelImpl.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntModelImpl.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntModelImpl.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/ontology/impl/OntModelImpl.java Tue Jan  8 19:07:23 2013
@@ -23,38 +23,41 @@ package com.hp.hpl.jena.ontology.impl;
 
 // Imports
 ///////////////
-import java.io.*;
-import java.util.*;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.hp.hpl.jena.enhanced.BuiltinPersonalities;
-import com.hp.hpl.jena.enhanced.EnhNode;
-import com.hp.hpl.jena.graph.*;
-import com.hp.hpl.jena.graph.compose.MultiUnion;
-import com.hp.hpl.jena.graph.query.*;
-import com.hp.hpl.jena.ontology.*;
-import com.hp.hpl.jena.rdf.listeners.StatementListener;
-import com.hp.hpl.jena.rdf.model.*;
-import com.hp.hpl.jena.rdf.model.impl.IteratorFactory;
-import com.hp.hpl.jena.rdf.model.impl.ModelCom;
-import com.hp.hpl.jena.reasoner.*;
-import com.hp.hpl.jena.shared.ConfigException;
-import com.hp.hpl.jena.util.iterator.*;
-import com.hp.hpl.jena.vocabulary.*;
-
-
+import java.io.InputStream ;
+import java.io.OutputStream ;
+import java.io.Reader ;
+import java.io.Writer ;
+import java.util.* ;
+
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
+
+import com.hp.hpl.jena.enhanced.BuiltinPersonalities ;
+import com.hp.hpl.jena.enhanced.EnhNode ;
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.graph.compose.MultiUnion ;
+import com.hp.hpl.jena.ontology.* ;
+import com.hp.hpl.jena.rdf.listeners.StatementListener ;
+import com.hp.hpl.jena.rdf.model.* ;
+import com.hp.hpl.jena.rdf.model.impl.IteratorFactory ;
+import com.hp.hpl.jena.rdf.model.impl.ModelCom ;
+import com.hp.hpl.jena.reasoner.Derivation ;
+import com.hp.hpl.jena.reasoner.InfGraph ;
+import com.hp.hpl.jena.reasoner.Reasoner ;
+import com.hp.hpl.jena.reasoner.ValidityReport ;
+import com.hp.hpl.jena.shared.ConfigException ;
+import com.hp.hpl.jena.util.iterator.* ;
+import com.hp.hpl.jena.vocabulary.RDF ;
+import com.hp.hpl.jena.vocabulary.RDFS ;
+import com.hp.hpl.jena.vocabulary.ReasonerVocabulary ;
 
 /**
  * <p>
  * Implementation of a model that can process general ontologies in OWL
  * and similar languages.
  * </p>
- *
- * @author Ian Dickinson, HP Labs
- *         (<a  href="mailto:ian_dickinson@users.sourceforge.net" >email</a>)
- * @version CVS $Id: OntModelImpl.java,v 1.2 2009-10-06 13:04:42 ian_dickinson Exp $
  */
 public class OntModelImpl extends ModelCom implements OntModel
 {
@@ -2618,41 +2621,6 @@ public class OntModelImpl extends ModelC
         return m_spec;
     }
 
-
-    /**
-     * <p>
-     * Answer the iterator over the resources from the graph that satisfy the given
-     * query, followed by the answers to the alternative queries (if specified). A
-     * typical scenario is that the main query gets resources of a given class (say,
-     * <code>rdfs:Class</code>), while the altQueries query for aliases for that
-     * type (such as <code>daml:Class</code>).
-     * </p>
-     *
-     * @param query A query to run against the model
-     * @param altQueries An optional list of subsidiary queries to chain on to the first
-     * @return ExtendedIterator An iterator over the (assumed single) results of
-     * executing the queries.
-     */
-    @Override
-    public <T extends RDFNode> ExtendedIterator<T> queryFor( BindingQueryPlan query, List<BindingQueryPlan> altQueries, Class<T> asKey ) {
-        GetBinding firstBinding  = new GetBinding( 0 );
-
-        // get the results from the main query
-        ExtendedIterator<Node> mainQuery = query.executeBindings().mapWith( firstBinding );
-
-        // now add the alternate queries, if defined
-        if (altQueries != null) {
-            for (Iterator<BindingQueryPlan> i = altQueries.iterator();  i.hasNext();  ) {
-                ExtendedIterator<Node> altQuery = i.next().executeBindings().mapWith( firstBinding );
-                mainQuery = mainQuery.andThen( altQuery );
-            }
-        }
-
-        // map each answer value to the appropriate ehnanced node
-        return mainQuery.filterKeep( new NodeCanAs<T>( asKey ) )
-                        .mapWith( new NodeAs<T>( asKey ) );
-    }
-
     // output operations - delegate to base model
 
     @Override
@@ -2990,31 +2958,6 @@ public class OntModelImpl extends ModelC
         return findByType( type ).mapWith( new SubjectNodeAs<T>( asKey ) );
     }
 
-
-    /**
-     * <p>
-     * Answer a binding query that will search for 'an X that has an
-     * rdf:type whose rdf:type is C' for some given resource C.
-     * </p>
-     *
-     * @param type The type of the type of the resources we're searching for
-     * @return BindingQueryPlan A binding query for the X resources.
-     */
-    protected BindingQueryPlan queryXTypeOfType( Resource type ) {
-        if (type != null) {
-            GraphQuery q = new GraphQuery();
-            // kers: this non-intuitive order should improve search performance
-            q.addMatch( GraphQuery.Y, RDF.type.asNode(), type.asNode() );
-            q.addMatch( GraphQuery.X, RDF.type.asNode(), GraphQuery.Y );
-
-            return queryHandler().prepareBindings( q, new Node[] {GraphQuery.X} );
-        }
-        else {
-            return null;
-        }
-    }
-
-
     /**
      * <p>
      * Answer an iterator over nodes that have p as a subject
@@ -3220,15 +3163,6 @@ public class OntModelImpl extends ModelC
         }
     }
 
-    /** Project out the first element of a list of bindings */
-    protected class GetBinding implements Map1<Domain, Node>
-    {
-        protected int m_index;
-        protected GetBinding( int index ) { m_index = index; }
-        @Override
-        public Node map1( Domain x ) { return x.get( m_index );  }
-    }
-
     /** Function to test the rdf type of a list */
     protected class RdfTypeTestFn implements RDFList.ReduceFn
     {

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaHandler.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaHandler.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaHandler.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaHandler.java Tue Jan  8 19:07:23 2013
@@ -18,28 +18,23 @@
 
 package com.hp.hpl.jena.rdf.arp;
 
-import java.util.Arrays;
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.rdf.arp.impl.ARPSaxErrorHandler ;
+import com.hp.hpl.jena.rdf.model.Model ;
+import com.hp.hpl.jena.rdf.model.RDFErrorHandler ;
+import com.hp.hpl.jena.shared.JenaException ;
+import com.hp.hpl.jena.shared.PrefixMapping ;
+import com.hp.hpl.jena.shared.impl.PrefixMappingImpl ;
 
-import com.hp.hpl.jena.graph.*;
-import com.hp.hpl.jena.rdf.arp.impl.ARPSaxErrorHandler;
-import com.hp.hpl.jena.rdf.model.*;
-import com.hp.hpl.jena.shared.JenaException;
-import com.hp.hpl.jena.shared.PrefixMapping;
-import com.hp.hpl.jena.shared.impl.PrefixMappingImpl;
-
-final class JenaHandler extends ARPSaxErrorHandler implements StatementHandler,
-        NamespaceHandler
+final class JenaHandler extends ARPSaxErrorHandler implements StatementHandler, NamespaceHandler
     {
-    static private final int BULK_UPDATE_SIZE = 1000;
-
-    private final BulkUpdateHandler bulk;
-
     private final PrefixMapping prefixMapping;
 
-    protected final Triple triples[];
-
     protected int here = 0;
 
+    private final Graph graph ;
+
     public JenaHandler( Model m, RDFErrorHandler e )
         { this( m.getGraph(), e ); }
 
@@ -52,8 +47,7 @@ final class JenaHandler extends ARPSaxEr
     private JenaHandler( Graph graph, PrefixMapping prefixMapping, RDFErrorHandler errorHandler )
         {
         super( errorHandler );
-        this.bulk = graph.getBulkUpdateHandler();
-        this.triples = new Triple[BULK_UPDATE_SIZE];
+        this.graph = graph ;
         this.prefixMapping = prefixMapping; 
         }
     
@@ -73,37 +67,30 @@ final class JenaHandler extends ARPSaxEr
         }
 
     @Override
-    public void statement( AResource subj, AResource pred, AResource obj )
-        {
+    public void statement(AResource subj, AResource pred, AResource obj)
+    {
         try
-            { triples[here++] = JenaReader.convert( subj, pred, obj ); }
-        catch (JenaException e)
-            { errorHandler.error( e ); }
-        if (here == BULK_UPDATE_SIZE) bulkUpdate();
+        {
+            Triple t = JenaReader.convert(subj, pred, obj) ;
+            graph.add(t) ;
+        } catch (JenaException e)
+        {
+            errorHandler.error(e) ;
         }
+    }
 
     @Override
-    public void statement( AResource subj, AResource pred, ALiteral lit )
-        {
+    public void statement(AResource subj, AResource pred, ALiteral lit)
+    {
         try
-            { triples[here++] = JenaReader.convert( subj, pred, lit ); }
-        catch (JenaException e)
-            { errorHandler.error( e ); }
-        if (here == BULK_UPDATE_SIZE) bulkUpdate();
-        }
-
-    public void bulkUpdate()
         {
-        try
-            {
-            if (here == BULK_UPDATE_SIZE) bulk.add( triples );
-            else bulk.add( Arrays.asList( triples ).subList( 0, here ) );
-            }
-        catch (JenaException e)
-            { errorHandler.error( e ); }
-        finally
-            { here = 0; }
+            Triple t = JenaReader.convert(subj, pred, lit) ;
+            graph.add(t) ;
+        } catch (JenaException e)
+        {
+            errorHandler.error(e) ;
         }
+    }
 
     @Override
     public void startPrefixMapping( String prefix, String uri )

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaReader.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaReader.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaReader.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/JenaReader.java Tue Jan  8 19:07:23 2013
@@ -171,7 +171,6 @@ public class JenaReader implements RDFRe
             handler = new JenaHandler(g, m, errorHandler);
             handler.useWith(arpf.getHandlers());
             arpf.parse(inputS, xmlBase);
-            handler.bulkUpdate();
         } catch (IOException e) {
             throw new WrappedIOException(e);
         } catch (SAXException e) {

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2Model.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2Model.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2Model.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/arp/SAX2Model.java Tue Jan  8 19:07:23 2013
@@ -145,8 +145,6 @@ public class SAX2Model extends SAX2RDF {
         // System.err.println("closing;");
         if (!closed) {
             super.close();
-            if (handler != null)
-              handler.bulkUpdate();
             closed = true;
         }
     }

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/Model.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/Model.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/Model.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/Model.java Tue Jan  8 19:07:23 2013
@@ -71,9 +71,6 @@ import java.util.*;
  *   System.getProperties().put("proxyHost","proxy.hostname");
  *   System.getProperties().put("proxyPort",port_number);
  * </pre></code>
- *
- * @author bwm
- * @version $Name: not supported by cvs2svn $ $Revision: 1.3 $Date: 2009/07/04 16:27:41 $'
  */
 public interface Model
     extends ModelCon, ModelGraphInterface,
@@ -364,7 +361,9 @@ public interface Model
         @param m the model containing the statements to add
         @param suppressReifications true to suppress adding reified statements
         @return this model for cascading
+        @deprecated suppressReifications no longer has any effect.
     */
+	@Deprecated
     Model add( Model m, boolean suppressReifications );
 
 	/** Add the RDF statements from an XML document.
@@ -809,7 +808,9 @@ public interface Model
     /**
         Answer the reification style of the model.
      	@return the reification style
+     	createMemModelMaker()
     */
+    @Deprecated
     ReificationStyle getReificationStyle();
 
 	/** Create a new model containing the statements matching a query.

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelCon.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelCon.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelCon.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelCon.java Tue Jan  8 19:07:23 2013
@@ -42,10 +42,6 @@ import com.hp.hpl.jena.graph.Node;
  *    resource created by an implementation in another class which adds
  *    the extra behaviour.  Factory objects are used to construct such
  *    enhanced resources.</p>
- * @author bwm
- * @version Release='$Name: not supported by cvs2svn $'
-            Revision='$Revision: 1.2 $'
-            Date='$Date: 2009-09-28 10:45:11 $'
  */
 public interface ModelCon {
 
@@ -617,8 +613,10 @@ public interface ModelCon {
         If suppressreifications is true, remove the reified statements of m as well.
         @param m the model containing the statements to remove
         @param suppressReifications true to remove reified statements too
-        @return this model for cascading 
+        @return this model for cascading
+        @deprecated suppressReifications now longer has any meaning or effect
     */
+    @Deprecated
     Model remove( Model m, boolean suppressReifications );
 
     /** 

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelFactory.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelFactory.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelFactory.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelFactory.java Tue Jan  8 19:07:23 2013
@@ -34,7 +34,6 @@ import com.hp.hpl.jena.ontology.impl.Ont
 import com.hp.hpl.jena.rdf.model.impl.InfModelImpl ;
 import com.hp.hpl.jena.rdf.model.impl.ModelCom ;
 import com.hp.hpl.jena.rdf.model.impl.ModelMakerImpl ;
-import com.hp.hpl.jena.rdf.model.impl.ModelReifier ;
 import com.hp.hpl.jena.reasoner.InfGraph ;
 import com.hp.hpl.jena.reasoner.Reasoner ;
 import com.hp.hpl.jena.reasoner.ReasonerRegistry ;
@@ -46,6 +45,7 @@ import com.hp.hpl.jena.shared.Reificatio
     (ModelFactoryBase is helper functions for it).
 */
 
+@SuppressWarnings("deprecation")
 public class ModelFactory extends ModelFactoryBase
 {
     /**
@@ -57,19 +57,25 @@ public class ModelFactory extends ModelF
     /**
         The standard reification style; quadlets contribute to reified statements,
         and are visible to listStatements().
+        @deprecated All models are ReificationStyle.Standard by default and there is no other supported style.
     */
+    @Deprecated
     public static final ReificationStyle Standard = ReificationStyle.Standard;
 
     /**
         The convenient reification style; quadlets contribute to reified statements,
         but are invisible to listStatements().
+        @deprecated All models are ReificationStyle.Standard by default and there is no other supported style.
     */
+    @Deprecated
     public static final ReificationStyle Convenient = ReificationStyle.Convenient;
 
     /**
         The minimal reification style; quadlets do not contribute to reified statements,
         and are visible to listStatements().
+        @deprecated All models are ReificationStyle.Standard by default and there is no other supported style.
     */
+    @Deprecated
     public static final ReificationStyle Minimal = ReificationStyle.Minimal;
 
     /**
@@ -128,33 +134,37 @@ public class ModelFactory extends ModelF
         { return Assembler.general.openModel( root ); }
 
     /**
-        Answer a fresh Model with the default specification and Standard reification style
-        [reification triples contribute to ReifiedStatements, and are visible to listStatements,
-        etc].
+        Answer a fresh Model with the default specification.
     */
     public static Model createDefaultModel()
-        { return createDefaultModel( Standard ); }
+        { return new ModelCom( Factory.createGraphMem( ) ); }
 
     /**
         Answer a new memory-based model with the given reification style
+        @deprecated     Hidden partial reifications not supported -- only style "Standard" 
     */
+    @Deprecated 
     public static Model createDefaultModel( ReificationStyle style )
-        { return new ModelCom( Factory.createGraphMem( style ) ); }
+        { return new ModelCom( Factory.createGraphMem( ) ); }
 
     /**
         Answer a read-only Model with all the statements of this Model and any
         statements "hidden" by reification. That model is dynamic, ie
         any changes this model will be reflected that one.
+        @deprecated Hidden partial reifications not supported -- only style "Standard" 
     */
+    @Deprecated
     public static Model withHiddenStatements( Model m )
-        { return ModelReifier.withHiddenStatements( m ); }
+        { return m ; }
 
     /**
         construct a new memory-based model that does not capture reification triples
         (but still handles reifyAs() and .as(ReifiedStatement).
+        @deprecated All models are ReificationStyle.Standard by default and there is no other supported style.
     */
+    @Deprecated
     public static Model createNonreifyingModel()
-        { return createDefaultModel( Minimal ); }
+        { return createDefaultModel( ); }
 
     /**
         Answer a model that encapsulates the given graph. Existing prefixes are
@@ -170,13 +180,12 @@ public class ModelFactory extends ModelF
         Answer a ModelMaker that constructs memory-based Models that
         are backed by files in the root directory. The Model is loaded from the
         file when it is opened, and when the Model is closed it is written back.
-        The model is given the Standard reification style.
 
         @param root the name of the directory in which the backing files are held
         @return a ModelMaker linked to the files in the root
     */
     public static ModelMaker createFileModelMaker( String root )
-        { return createFileModelMaker( root, Standard ); }
+        { return new ModelMakerImpl( new FileGraphMaker( root ) ); }
 
     /**
         Answer a ModelMaker that constructs memory-based Models that
@@ -187,18 +196,18 @@ public class ModelFactory extends ModelF
         @param style the desired reification style
         @return a ModelMaker linked to the files in the root
     */
+    @Deprecated
     public static ModelMaker createFileModelMaker( String root, ReificationStyle style )
-        { return new ModelMakerImpl( new FileGraphMaker( root, style ) ); }
+        { return new ModelMakerImpl( new FileGraphMaker( root ) ); }
 
     /**
         Answer a ModelMaker that constructs memory-based Models that do
-        not persist past JVM termination. The model has the Standard reification
-        style.
+        not persist past JVM termination.
 
         @return a ModelMaker that constructs memory-based models
     */
     public static ModelMaker createMemModelMaker()
-        { return createMemModelMaker( Standard ); }
+        { return new ModelMakerImpl( new SimpleGraphMaker( ) );  }
 
     /**
         Answer a ModelMaker that constructs memory-based Models that do
@@ -206,9 +215,11 @@ public class ModelFactory extends ModelF
 
         @param style the reification style for the model
         @return a ModelMaker that constructs memory-based models
+        @deprecated     Hidden partial reifications not support -- only style "Standard" 
     */
-      public static ModelMaker createMemModelMaker( ReificationStyle style )
-        { return new ModelMakerImpl( new SimpleGraphMaker( style ) ); }
+    @Deprecated 
+    public static ModelMaker createMemModelMaker( ReificationStyle style )
+    { return createMemModelMaker() ; }
 
     /**
      * Return a Model through which all the RDFS entailments

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelGraphInterface.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelGraphInterface.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelGraphInterface.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ModelGraphInterface.java Tue Jan  8 19:07:23 2013
@@ -18,15 +18,14 @@
 
 package com.hp.hpl.jena.rdf.model;
 
-import com.hp.hpl.jena.graph.*;
-import com.hp.hpl.jena.graph.query.*;
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.Triple ;
 
 /**
     ModelGraphInterface - this interface mediates between the API Model level
     and the SPI Graph level. It may change if the SPI changes, is more fluid than
     Model and ModelCon, so don't use if it you don't *need* to.
-    
-    @author kers
 */
 public interface ModelGraphInterface
     {
@@ -40,11 +39,6 @@ public interface ModelGraphInterface
     */
     Graph getGraph();
 
-    /** 
-       Answer the QueryHandler of the Graph this Model is presenting.
-    */
-    QueryHandler queryHandler();
-    
     /**
        Answer an RDF node wrapping <code>n</code> suitably; URI nodes
        become Resources with the same URI, blank nodes become Resources

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ResourceFactory.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ResourceFactory.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ResourceFactory.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/ResourceFactory.java Tue Jan  8 19:07:23 2013
@@ -92,9 +92,32 @@ public class ResourceFactory {
         return instance.createResource(uriref);
     }
     
+    /**
+    Answer a plain (untyped) literal with no language and the given content.
+    @param string the string which forms the value of the literal
+    @return a Literal node with that string as value
+     */
     public static Literal createPlainLiteral( String string ) {
         return instance.createPlainLiteral( string );
     }
+    
+    /**
+    Answer a plain (untyped) literal with no language and the given content.
+    @param string the string which forms the value of the literal
+    @param lang The language tag to be used
+    @return a Literal node with that string as value
+     */
+
+    public static Literal createLangLiteral( String string , String lang ) {
+        return instance.createLangLiteral( string , lang );
+    }
+
+    /**
+    Answer a typed literal.
+    @param string the string which forms the value of the literal
+    @param datatype RDFDatatype of the type literal
+    @return a Literal node with that string as value
+    */
 
     public static Literal createTypedLiteral( String string , RDFDatatype dType)
     {
@@ -173,6 +196,15 @@ public class ResourceFactory {
         public Literal createPlainLiteral( String string );
 
         /**
+        Answer a plain (untyped) literal with no language and the given content.
+        @param string the string which forms the value of the literal
+        @param lang The language tag to be used
+        @return a Literal node with that string as value
+         */
+
+        public Literal createLangLiteral( String string , String lang );
+
+        /**
         Answer a typed literal.
         @param string the string which forms the value of the literal
         @param datatype RDFDatatype of the type literal
@@ -237,6 +269,11 @@ public class ResourceFactory {
         }
 
         @Override
+        public Literal createLangLiteral( String string , String lang ) {
+            return new LiteralImpl(  Node.createLiteral( string, lang, false ), null );
+        }
+        
+        @Override
         public Literal createTypedLiteral( String string , RDFDatatype dType)
         {
             return new LiteralImpl(Node.createLiteral(string, "", dType), null) ;

Modified: jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java
URL: http://svn.apache.org/viewvc/jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java?rev=1430447&r1=1430446&r2=1430447&view=diff
==============================================================================
--- jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java (original)
+++ jena/branches/streaming-update/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java Tue Jan  8 19:07:23 2013
@@ -66,7 +66,7 @@ public class LiteralImpl extends EnhNode
         {
         return getModel() == m 
             ? this 
-            : (Literal) ((ModelCom) m).getRDFNode( asNode() )
+            : (Literal) m.getRDFNode( asNode() )
             ;
          }