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 2014/02/02 18:59:24 UTC

svn commit: r1563689 - /jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/Location.java

Author: andy
Date: Sun Feb  2 17:59:23 2014
New Revision: 1563689

URL: http://svn.apache.org/r1563689
Log:
In-memory, named Locations.

Modified:
    jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/Location.java

Modified: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/Location.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/Location.java?rev=1563689&r1=1563688&r2=1563689&view=diff
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/Location.java (original)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/base/file/Location.java Sun Feb  2 17:59:23 2014
@@ -34,6 +34,8 @@ import com.hp.hpl.jena.tdb.sys.Names ;
 public class Location {
     static String    pathSeparator = File.separator ; // Or just "/"
 
+    private static String memNamePath = Names.memName+pathSeparator ;
+    
     private String   pathname ;
     private MetaFile metafile      = null ;
     private boolean  isMem         = false ;
@@ -77,6 +79,11 @@ public class Location {
             memInit(this, null) ;
             return ;
         }
+        if ( rootname.startsWith(memNamePath) ) {
+            String name = rootname.substring(memNamePath.length()) ;
+            memInit(this, name) ;
+            return ;
+        }
 
         ensure(rootname) ;
         pathname = fixupName(rootname) ;