final int port = orientDbSpecificConfiguration.getInt("port", 27017);
if(username != null && password != null) {
// create mongo graph with username and password
try {
return new MongoDBGraph(host, port, username, password);
} catch (Exception ex) {
throw new GraphConfigurationException(ex);
}
} else {
try {
return new MongoDBGraph(host, port);
} catch (Exception ex) {
throw new GraphConfigurationException(ex);
}
}