Package com.lingbobu.flashdb.transfer.sqlfunc

Source Code of com.lingbobu.flashdb.transfer.sqlfunc.InputFileFunc$FuncXml

package com.lingbobu.flashdb.transfer.sqlfunc;
import com.lingbobu.flashdb.transfer.impl.InputFileCsv;
import com.lingbobu.flashdb.transfer.impl.InputFileJson;
import com.lingbobu.flashdb.transfer.impl.InputFileXml;

/**
* 文件数据源的函数封装
*/
public class InputFileFunc {
  /**
   * 基于CSV文件的数据来源
   */
  public static class FuncCsv {
    public InputFileCsv call(String filePath, String charsetName, String columnNames, boolean skipFirstLine) {
      return new InputFileCsv(filePath, charsetName, columnNames, skipFirstLine);
    }
   
    public InputFileCsv call(String filePath, String charsetName, String columnNames) {
      return new InputFileCsv(filePath, charsetName, columnNames);
    }
   
    public InputFileCsv call(String filePath, String charsetName) {
      return new InputFileCsv(filePath, charsetName);
    }
  }
 
  /**
   * 基于JSON文件的数据来源
   */
  public static class FuncJson {
    public InputFileJson call(String filePath, String charsetName, String fileExt, String[] childStringAsJson) {
      return new InputFileJson(filePath, charsetName, fileExt, childStringAsJson);
    }
   
    public InputFileJson call(String filePath, String charsetName, String fileExt) {
      return new InputFileJson(filePath, charsetName, fileExt);
    }
   
    public InputFileJson call(String filePath, String charsetName) {
      return new InputFileJson(filePath, charsetName);
    }
   
    public InputFileJson call(String filePath) {
      return new InputFileJson(filePath);
    }
  }
 
  /**
   * 基于XML文件的数据来源
   */
  public static class FuncXml {
    public InputFileXml call(String filePath, boolean multiItemsPerFile, String itemXPathExpr, String listFields, String listmapFields, String[] fieldsAndXPath) {
      return new InputFileXml(filePath, multiItemsPerFile, itemXPathExpr, listFields, listmapFields, fieldsAndXPath);
    }
   
    public InputFileXml call(String filePath, boolean multiItemsPerFile, String itemXPathExpr, String listFields, String listmapFields) {
      return new InputFileXml(filePath, multiItemsPerFile, itemXPathExpr, listFields, listmapFields);
    }
   
    public InputFileXml call(String filePath, boolean multiItemsPerFile, String itemXPathExpr) {
      return new InputFileXml(filePath, multiItemsPerFile, itemXPathExpr);
    }
  }
}
TOP

Related Classes of com.lingbobu.flashdb.transfer.sqlfunc.InputFileFunc$FuncXml

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.