Package com.hp.hpl.jena.tdb.base.objectfile

Examples of com.hp.hpl.jena.tdb.base.objectfile.ObjectFile.all()


   
    // Only call when the dataset is not in TDBMaker or in StoreConnection 
    private int countRDFNodes() {
        ObjectFile objects = FileFactory.createObjectFileDisk( location.getPath(Names.indexId2Node, Names.extNodeData) ) ;
        int count = 0 ;
        Iterator<Pair<Long,ByteBuffer>> iter = objects.all() ;
        while ( iter.hasNext() ) {
            iter.next() ;
            count++ ;
        }
        objects.close() ;
View Full Code Here


   
    // Only call when the dataset is not in TDBMaker or in StoreConnection 
    private int countRDFNodes() {
        ObjectFile objects = FileFactory.createObjectFileDisk( location.getPath(Names.indexId2Node, Names.extNodeData) ) ;
        int count = 0 ;
        Iterator<Pair<Long,ByteBuffer>> iter = objects.all() ;
        while ( iter.hasNext() ) {
            iter.next() ;
            count++ ;
        }
        objects.close() ;
View Full Code Here

   
    // Only call when the dataset is not in TDBMaker or in StoreConnection 
    private int countRDFNodes() {
        ObjectFile objects = FileFactory.createObjectFileDisk( location.getPath(Names.indexId2Node, Names.extNodeData) ) ;
        int count = 0 ;
        Iterator<Pair<Long,ByteBuffer>> iter = objects.all() ;
        while ( iter.hasNext() ) {
            iter.next() ;
            count++ ;
        }
        objects.close() ;
View Full Code Here

   
    // Only call when the dataset is not in TDBMaker or in StoreConnection 
    private int countRDFNodes() {
        ObjectFile objects = FileFactory.createObjectFileDisk( location.getPath(Names.indexId2Node, Names.extNodeData) ) ;
        int count = 0 ;
        Iterator<Pair<Long,ByteBuffer>> iter = objects.all() ;
        while ( iter.hasNext() ) {
            iter.next() ;
            count++ ;
        }
        objects.close() ;
View Full Code Here

  @SuppressWarnings("unused")
  private static void dumpObject (Location location) {
    log.debug("{}", location);
    String path = location.getDirectoryPath() ;
    ObjectFile objects = FileFactory.createObjectFileDisk(path + File.separator + "nodes.dat");
    Iterator<Pair<Long,ByteBuffer>> iter = objects.all();
    while ( iter.hasNext() ) {
      Pair<Long, ByteBuffer> pair = iter.next();
      long id = pair.getLeft() ;
      Node node = NodeLib.fetchDecode(id, objects) ;
      log.debug("{} : {}", id, node);
View Full Code Here

      Pair<Long, ByteBuffer> pair = it1.next() ;
      System.out.println(pair.getLeft() + ":" + NodeLib.decode(pair.getRight()));
    }
   
    System.out.println("Node table 02: nodes.dat (i.e. object file)") ;
    Iterator<Pair<Long, ByteBuffer>> it2 = of2.all() ;
    while ( it2.hasNext() ) {
      Pair<Long, ByteBuffer> pair = it2.next() ;
      System.out.println(pair.getLeft() + ":" + NodeLib.decode(pair.getRight()));
    }
   
View Full Code Here

public class DumpNodeTable {

  public static void main(String[] args) {
//    ObjectFile objects = FileFactory.createObjectFileDisk("/tmp/b-snsthurs-0av5u129/live/nodes.dat") ;
    ObjectFile objects = FileFactory.createObjectFileDisk("/home/castagna/Desktop/tdb/nodes.dat") ;
    Iterator<Pair<Long, ByteBuffer>> iter = objects.all() ;
    while ( iter.hasNext() ) {
      Pair<Long, ByteBuffer> pair = iter.next();
      System.out.println( pair ) ;
    }
  }
View Full Code Here

public class nodesdump {
  public static void main(String[] args) {
    if ( args.length != 1 ) { print_usage(); }
   
    ObjectFile objects = FileFactory.createObjectFileDisk(args[0]);
    Iterator<Pair<Long, ByteBuffer>> iter = objects.all();
    while ( iter.hasNext() ) {
      Pair<Long, ByteBuffer> pair = iter.next();
      System.out.println(pair.getLeft() + " : " + pair.getRight());
    }
  }
View Full Code Here

  private static Set<Long> verifyNodeTable(final Location location) {
    System.out.println ("---- Scanning node table ... ----");
    Set<Long> nodeIds = new HashSet<Long>();
    String filename = location.absolute(Names.indexId2Node, Names.extNodeData);
    ObjectFile objects = FileFactory.createObjectFileDisk(filename);
    Iterator<Pair<Long, ByteBuffer>> iter = objects.all();
    int countRdfNodes = 0;
    Long nodeId = 0L;
    ByteBuffer nodeValue = null;
    while (iter.hasNext()) {
      Pair<Long, ByteBuffer> entry = iter.next();
View Full Code Here

    ObjectFile objects = FileFactory.createObjectFileDisk(path + File.separator + "nodes.dat");
    Index nodeToId = SetupTDB.makeIndex(location, Names.indexNode2Id, LenNodeHash, SizeOfNodeId, -1 ,-1) ;
    RecordFactory recordFactory = nodeToId.getRecordFactory();


    Iterator<Pair<Long,ByteBuffer>> iter = objects.all();
    while ( iter.hasNext() ) {
      Pair<Long, ByteBuffer> pair = iter.next();
      long id = pair.getLeft() ;
      Node node = NodeLib.fetchDecode(id, objects) ;
          Hash hash = new Hash(recordFactory.keyLength()) ;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.