* tdb.cache.blockread.size=10000
* tdb.synctick=100000
*/
String propertiesFile = "tdb.properties" ;
MetaFile metafile = locationMetadata(location) ;
// dupulicate
Properties config = new Properties(globalConfig) ;
boolean localProperties = false ;
if ( location.exists(propertiesFile) )
{
// Load now to test for errors.
localProperties = true ;
try { PropertyUtils.loadFromFile(config, propertiesFile) ; }
catch (IOException ex) { throw new TDBException(ex) ; }
}
// Only support this so far.
if ( ! metafile.propertyEquals("tdb.layout", "v1") )
SetupTDB_OLD.error(log, "Excepted 'v1': Wrong layout: "+metafile.getProperty("tdb.layout")) ;
if ( ! metafile.propertyEquals("tdb.type", "standalone") )
SetupTDB_OLD.error(log, "Not marked as a standalone type: "+metafile.getProperty("tdb.type")) ;
// Check expectations.
metafile.checkOrSetMetadata("tdb.nodeid.size", Integer.toString(SizeOfNodeId)) ;
metafile.checkOrSetMetadata("tdb.node.hashsize", Integer.toString(LenNodeHash)) ;
metafile.checkOrSetMetadata("tdb.record.triple", Integer.toString(LenIndexTripleRecord)) ;
metafile.checkOrSetMetadata("tdb.record.quad", Integer.toString(LenIndexQuadRecord)) ;
// ---------------------
// ---- Logical structure
// -- Node Table.
String indexNode2Id = metafile.getProperty("tdb.nodetable.mapping.node2id") ;
String indexId2Node = metafile.getProperty("tdb.nodetable.mapping.id2node") ;
String nodesdata = metafile.getProperty("tdb.nodetable.mapping.data") ;
log.debug("Object table: "+indexNode2Id+" - "+indexId2Node) ;
int n2idCacheSize = PropertyUtils.getPropertyAsInteger(config, Names.pNode2NodeIdCacheSize) ;
int id2nCacheSize = PropertyUtils.getPropertyAsInteger(config, Names.pNodeId2NodeCacheSize) ;
int nodeMissCacheSize = PropertyUtils.getPropertyAsInteger(config, Names.pNodeMissesCacheSize) ;
// Cache sizes should come from this.info.
NodeTable nodeTable = makeNodeTable(location,
indexNode2Id, n2idCacheSize,
indexId2Node, id2nCacheSize,
nodeMissCacheSize) ;
DatasetControl policy = createConcurrencyPolicy() ;
TripleTable tripleTable = makeTripleTable(location, config, nodeTable,
Names.primaryIndexTriples, Names.tripleIndexes, policy) ;
QuadTable quadTable = makeQuadTable(location, config, nodeTable,
Names.primaryIndexQuads, Names.quadIndexes, policy) ;
DatasetPrefixesTDB prefixes = makePrefixes(location, config, policy) ;
// ---- Create the DatasetGraph object
StoreConfig storeConfig = new StoreConfig(location, null, null, null, null) ;
DatasetGraphTDB dsg = new DatasetGraphTDB(tripleTable, quadTable, prefixes, chooseOptimizer(location), storeConfig) ;
// Finalize
metafile.flush() ;
// Set TDB features.
if ( localProperties )
{
/*