Package org.openntf.domino.big.impl

Examples of org.openntf.domino.big.impl.NoteCoordinate


      notecoll.buildCollection();
      //      DocumentCollection coll = db.search("@Begins(Title; \"B\")");
      timelog("Starting note coordinates of " + notecoll.getCount() + " documents");
      //      for (Document doc : notecoll) {
      for (String nid : notecoll) {
        NoteCoordinate nc = new NoteCoordinate(notecoll, nid);
        notelist.add(nc);
      }

      //      Database eventDb = session.getDatabase("", "events4.nsf");
      //      NoteCollection eventNotecoll = eventDb.createNoteCollection(false);
      //      eventNotecoll.setSelectDocuments(true);
      //      eventNotecoll.buildCollection();
      //      timelog("Continuing note coordinates of " + eventNotecoll.getCount() + " documents");
      //      for (String nid : eventNotecoll) {
      //        NoteCoordinate nc = new NoteCoordinate(eventNotecoll, nid);
      //        notelist.add(nc);
      //      }
      //      Database xspextDb = session.getDatabase("", "openntf/xpagesext.nsf");
      //      NoteCollection xspextNotecoll = xspextDb.createNoteCollection(false);
      //      xspextNotecoll.setSelectDocuments(true);
      //      xspextNotecoll.buildCollection();
      //      timelog("Continuing note coordinates of " + xspextNotecoll.getCount() + " documents");
      //      for (String nid : xspextNotecoll) {
      //        NoteCoordinate nc = new NoteCoordinate(xspextNotecoll, nid);
      //        notelist.add(nc);
      //      }

      byte[] bytes = notelist.toByteArray();
      int byteSize = bytes.length;
      timelog("Resulting bytearray is " + bytes.length + " so we expect " + (bytes.length / (2500 * 24)) + " items");
      //      File file = File.createTempFile("foo", "bar");
      //      FileOutputStream fos = new FileOutputStream(file);
      //      fos.write(bytes);
      //      fos.close();

      storeTest.writeBinary("imdbNoteList", bytes, 2500 * 24);
      storeTest.save();
      String storeId = storeTest.getUniversalID();
      storeTest.recycle();
      storeTest = null;

      //      coll.recycle();
      //      coll = null;

      notecoll.recycle();
      notecoll = null;
      //      eventNotecoll.recycle();
      //      eventNotecoll = null;
      //      eventDb.recycle();
      //      eventDb = null;
      //      xspextNotecoll.recycle();
      //      xspextNotecoll = null;
      //      xspextDb.recycle();
      //      xspextDb = null;
      db.recycle();
      db = null;
      notelist = null;
      System.gc();

      timelog("Binary data serialized out. Reloading...");
      storeTest = log.getDocumentByUNID(storeId);
      //      FileInputStream fis = new FileInputStream(file);

      DbCache cache = new DbCache();
      NoteCoordinate.setDbCache(cache);
      NoteList notelist2 = new NoteList(cache, NoteList.getComparator("Title"));
      byte[] loaded = storeTest.readBinary("imdbNoteList");

      //      byte[] loaded = new byte[byteSize];
      //      fis.read(loaded);
      notelist2.loadByteArray(loaded);
      timelog("Done reloading " + notelist2.size() + " sorted notes. Iterating...");
      int notecount = 0;
      try {
        for (NoteCoordinate nc : notelist2) {
          Document doc = nc.getDocument();
          notecount++;
          //          System.out.println("doc " + doc.getNoteID() + " " + doc.getItemValue("$UpdatedBy", String.class));
        }
      } catch (Exception e) {
        e.printStackTrace();
View Full Code Here


          edgeIds = ((NoteList) o);
        } else if (o instanceof java.util.Collection) {
          NoteList result = new NoteList(true);
          for (Object raw : (Collection) o) {
            if (raw instanceof String) {
              result.add(new NoteCoordinate(""/*TODO NTF This should be some default replid*/, (String) raw));
            } else {
              //TODO NTF
            }
          }
          edgeIds = result;
View Full Code Here

          edgeIds = ((NoteList) o);
        } else if (o instanceof java.util.Collection) {
          NoteList result = new NoteList(true);
          for (Object raw : (Collection) o) {
            if (raw instanceof String) {
              result.add(new NoteCoordinate(""/*TODO NTF This should be some default replid*/, (String) raw));
            } else {
              //TODO NTF
            }
          }
          edgeIds = result;
View Full Code Here

TOP

Related Classes of org.openntf.domino.big.impl.NoteCoordinate

Copyright © 2018 www.massapicom. 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.