Package org.openntf.domino

Examples of org.openntf.domino.DbDirectory


  public void run() {
    Session session = this.getSession();
    session.setFixEnable(Fixes.REPLACE_ITEM_NULL, true);
    session.setFixEnable(Fixes.REMOVE_ITEM, true);
    session.setFixEnable(Fixes.CREATE_DB, true);
    DbDirectory dir = session.getDbDirectory("");
    Database moviesDb = dir.createDatabase("imdb/movies.nsf", true);
    //    importMovies(moviesDb);
    //    importPlots(moviesDb);
    importGenres(moviesDb);
    //    Database actorsDb = dir.createDatabase("imdb/actors.nsf", true);
    //    Database directorsDb = dir.createDatabase("imdb/directors.nsf", true);
View Full Code Here


        } catch (Throwable t) {
          t.printStackTrace();
        }
      }
      String server = s.getServerName();
      DbDirectory dbDirectory = s.getDbDirectory(server);

      int dateCount = 0;
      int nameCount = 0;
      int docCount = 0;
View Full Code Here

      for (int i = 0; i < pow(16, places_); i++) {
        String hashChunk = Integer.toString(i, 16).toLowerCase();
        while (hashChunk.length() < places_)
          hashChunk = "0" + hashChunk;
        String server = serverStrategy_ == null ? server_ : serverStrategy_.getServerForHashChunk(hashChunk);
        DbDirectory dbdir = getDbDirectoryForHashChunk(hashChunk);
        String dbName = baseName_ + "-" + hashChunk + ".nsf";
        Database database = session_.getDatabase(server, dbName, true);
        if (!database.isOpen()) {
          database = createDatabase(dbdir, dbName);
        }
View Full Code Here

    if (!dbCache_.containsKey(dbName)) {
      String server = serverStrategy_ == null ? server_ : serverStrategy_.getServerForHashChunk(hashChunk);
      Database database = session_.getDatabase(server, dbName, true);
      if (!database.isOpen()) {
        DbDirectory dbdir = getDbDirectoryForHashChunk(hashChunk);
        database = createDatabase(dbdir, dbName);
      }
      dbCache_.put(dbName, database);
    }
View Full Code Here

    if (!dbCache_.containsKey(dbName)) {
      String server = serverStrategy_ == null ? server_ : serverStrategy_.getServerForHashChunk(hashChunk);
      Database database = session_.getDatabase(server, dbName, true);
      if (!database.isOpen()) {
        DbDirectory dbdir = getDbDirectoryForHashChunk(hashChunk);
        database = createDatabase(dbdir, dbName);
      }
      dbCache_.put(dbName, database);
    }
View Full Code Here

      for (int i = 0; i < pow(16, places_); i++) {
        String hashChunk = Integer.toString(i, 16).toLowerCase();
        while (hashChunk.length() < places_)
          hashChunk = "0" + hashChunk;
        String server = serverStrategy_ == null ? server_ : serverStrategy_.getServerForHashChunk(hashChunk);
        DbDirectory dbdir = getDbDirectoryForHashChunk(hashChunk);
        String dbName = baseName_ + "-" + hashChunk + ".nsf";
        Database database = session_.getDatabase(server, dbName, true);
        if (!database.isOpen()) {
          database = createDatabase(dbdir, dbName);
        }
View Full Code Here

    if (!dbCache_.containsKey(dbName)) {
      String server = serverStrategy_ == null ? server_ : serverStrategy_.getServerForHashChunk(hashChunk);
      Database database = session_.getDatabase(server, dbName, true);
      if (!database.isOpen()) {
        DbDirectory dbdir = getDbDirectoryForHashChunk(hashChunk);
        database = createDatabase(dbdir, dbName);
      }
      dbCache_.put(dbName, database);
    }
View Full Code Here

  }

  @Override
  public void run() {
    Session session = this.getSession();
    DbDirectory dir = session.getDbDirectory(null);
    dir.setDirectoryType(DbDirectory.Type.TEMPLATE);
    for (Database db : dir) {
      System.out.println(db.getApiPath() + ": " + db.getSize());
    }

    dir.setDirectoryType(DbDirectory.Type.DATABASE);
    for (Database db : dir) {
      System.out.println(db.getApiPath() + ": " + db.getSize());
    }
  }
View Full Code Here

    Session session = this.getSession();
    session.setConvertMIME(false);
    session.setFixEnable(Fixes.APPEND_ITEM_VALUE, true);
    session.setFixEnable(Fixes.FORCE_JAVA_DATES, true);
    session.setFixEnable(Fixes.CREATE_DB, true);
    DbDirectory dir = session.getDbDirectory("");
    Database indexDb = dir.createDatabase("index.nsf", true);
    //    Database indexDb = session.getDatabase("", "index.nsf", true);
    //    indexDb.open();
    IndexDatabase index = new IndexDatabase(indexDb);
    index.setCaseSensitive(true);
View Full Code Here

    notifyObservers(null);
  }

  public void scan() {
    Session session = getSession();
    DbDirectory dir = session.getDbDirectory(getServerName());
    dir.setDirectoryType(DbDirectory.Type.DATABASE);
    for (Database db : dir) {
      try {
        scanDatabase(db);
      } catch (Throwable t) {
        t.printStackTrace();
View Full Code Here

TOP

Related Classes of org.openntf.domino.DbDirectory

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.