Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of uppercase, lowercase, numbers, and special characters (such as @*&#).
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Certifications

Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Invoice

ProductName CreateTime ID Price File
ProductName CreateTime ID Price File
v4.3
Search
    中文EN
    v4.3

      Download | Export

      download()

      Method and class:

      Response download(String fileName, String taskId, DownloadListener listener)
      
      Response download(String fileName, String taskId, DownloadListener listener, RequestConfig requestConfig)
      
      class DownloadListener implements Listener<DownloadFileResult>
      
      interface Listener<T> {
          void onReady();
          void next(T var1);
          void onComplete();
          void onError(Throwable var1);
      }
      
      class DownloadFileResult {
          int totalSize;
          byte[] bytes;
      }
      

      Example: Download file 'degree_test' from algorithm task 134

      public class Main {
          public static void main(String[] args) {
              // omit code of establishing server connection 'conn' 
      
              Thread.sleep(100000);
              Response res = conn.download("degree_test", "134", new DownloadListener() {
                  @Override
                  public void onReady() {
                      System.out.println("start download");
                  }
      
                  @Override
                  public void next(DownloadFileResult downloadFileResult) {
                      System.out.println(new String(downloadFileResult.getBytes(), StandardCharsets.UTF_8));
                  }
      
                  @Override
                  public void onComplete() {
                      System.out.println("finish download");
                  }
      
                  @Override
                  public void onError(Throwable throwable) {
                      System.out.println("error occurred");
                  }
              });
              System.out.println(new Gson().toJson(res));
          }
      }
      

      export()

      Method and class:

      Response export(ExportRequest request, ExportListener listener)
      
      Response export(ExportRequest request, ExportListener listener, RequestConfig requestConfig)
      
      class ExportRequest {
          Ultipa.DBType dbType;
          String schema;
          Integer limit;
          List<String> selectPropertiesName;
      }
      
      class ExportListener implements Listener<ExportData>
      
      interface Listener<T> {
          void onReady();
          void next(T var1);
          void onComplete();
          void onError(Throwable var1);
      }
      
      class ExportData {
          List<UqlEntity> nodes;
          List<UqlEntity> edges;
      }
      

      Example: Export 100 nodes from schema 'default' of graphset 'test', carring properties @default.name and @default.age

      public class Main {
          public static void main(String[] args) {
              // omit code of establishing server connection 'conn' using graphset 'default'
      
              ExportRequest request = new ExportRequest();
              request.setDbType(Ultipa.DBType.DBNODE);
              request.setLimit(100);
              request.setSchema("default");
              request.setSelectPropertiesName(Arrays.asList("name", "age"));
            
              RequestConfig requestConfig = new RequestConfig();
              requestConfig.setGraphName("test");
            
              Response res = conn.export(request, new ExportListener() {
                  @Override
                  public void onReady() {
                      System.out.println("start download");
                  }
      
                  @Override
                  public void next(ExportData exportData) {
                      System.out.println(exportData.getNodes());
                  }
      
                  @Override
                  public void onComplete() {
                      System.out.println("finish download");
                  }
      
                  @Override
                  public void onError(Throwable throwable) {
                      System.out.println("error occurred");
                  }
              }, requestConfig);
              System.out.println(new Gson().toJson(res.getExportData()));
          }
      }
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写