Examples of ODatabaseImport


Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

      importDir.mkdir();

    ODatabaseDocumentTx database = new ODatabaseDocumentTx("local:" + testPath + "/" + NEW_DB_URL);
    database.create();

    ODatabaseImport impor = new ODatabaseImport(database, testPath + "/" + EXPORT_FILE_PATH, this);

    // UNREGISTER ALL THE HOOKS
    for (ORecordHook hook : new ArrayList<ORecordHook>(database.getHooks())) {
      database.unregisterHook(hook);
    }

    impor.importDatabase();
    impor.close();

    database.close();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

    checkCurrentDatabase();

    out.println("Importing database from file " + iInputFilePath + "...");

    try {
      new ODatabaseImport(currentDatabase, iInputFilePath, this).importDatabase().close();
    } catch (ODatabaseImportException e) {
      printError(e);
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

    checkCurrentDatabase();

    out.println("Importing database from file " + iInputFilePath + "...");

    try {
      new ODatabaseImport(currentDatabase, iInputFilePath, this).importDatabase().close();
    } catch (ODatabaseImportException e) {
      printError(e);
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

        if (connection.database.isClosed())
          connection.database.open(dbUser, dbPasswd);

        OLogManager.instance().info(this, "Importing database '%s' via streaming from remote server node...", dbName);

        new ODatabaseImport(connection.database, new OChannelBinaryInputStream(channel), this).importDatabase();

        OLogManager.instance().info(this, "Database imported correctly", dbName);

        sendOk(lastClientTxId);
        channel.writeInt(connection.id);
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

        OLogManager.instance().info(this, "Importing database '%s' via streaming from remote server node...", dbName);

        channel.acquireExclusiveLock();
        try {
          new ODatabaseImport(connection.database, new OChannelBinaryInputStream(channel), this).importDatabase();

          OLogManager.instance().info(this, "Database imported correctly", dbName);

          sendOk(lastClientTxId);
          channel.writeInt(connection.id);
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

    checkCurrentDatabase();

    out.println("Importing database from file " + iInputFilePath + "...");

    try {
      new ODatabaseImport(currentDatabase, iInputFilePath, this).importDatabase().close();
    } catch (ODatabaseImportException e) {
      printError(e);
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

        if (connection.database.isClosed())
          connection.database.open(dbUser, dbPasswd);

        OLogManager.instance().info(this, "Importing database '%s' via streaming from remote server node...", dbName);

        new ODatabaseImport(connection.database, new OChannelBinaryInputStream(channel), this).importDatabase();

        OLogManager.instance().info(this, "Database imported correctly", dbName);

        sendOk(lastClientTxId);
        channel.writeInt(connection.id);
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

    checkCurrentDatabase();

    out.println("Importing database from file " + iInputFilePath + "...");

    try {
      new ODatabaseImport(currentDatabase, iInputFilePath, this).importDatabase().close();
    } catch (ODatabaseImportException e) {
      printError(e);
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

    } else {
      database = getProfiledDatabaseInstance(iRequest);
      try {
        parse(iRequest, iResponse, new OHttpMultipartContentBaseParser(), new OHttpMultipartDatabaseImportContentParser(), database);

        ODatabaseImport importer = new ODatabaseImport(getProfiledDatabaseInstance(iRequest), importData, this);
        importer.importDatabase();
        iResponse.send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON,
            "{\"responseText\": \"Database imported Correctly, see server log for more informations.\"}", null);
      } catch (Exception e) {
        iResponse.send(OHttpUtils.STATUS_INTERNALERROR_CODE, e.getMessage() + ": " + e.getCause() != null ? e.getCause()
            .getMessage() : "", OHttpUtils.CONTENT_JSON, "{\"responseText\": \"" + e.getMessage() + ": "
View Full Code Here

Examples of com.orientechnologies.orient.core.db.tool.ODatabaseImport

    final List<String> items = OStringSerializerHelper.smartSplit(text, ' ');
    final String fileName = items.size() <= 0 || (items.get(1)).charAt(0) == '-' ? null : items.get(1);
    final String options = fileName != null ? text.substring((items.get(0)).length() + (items.get(1)).length() + 1).trim() : text;

    try {
      ODatabaseImport databaseImport = new ODatabaseImport(currentDatabase, fileName, this);

      databaseImport.setOptions(options).importDatabase();

      databaseImport.close();
    } catch (ODatabaseImportException e) {
      printError(e);
    }
  }
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.