/**
   * DOC xqliu Comment method "doImport".
   *
   * @param resourceType
   * @param importObject
   * @param skip
   * @param rename
   * @param importItemName
   * @return
   */
  public static List<ReturnCode> doImport(
      EResourceConstant resourceType,
      ImportObject importObject,
      boolean skip,
      boolean rename,
      String importItemName) {
    assert resourceType != null;

    IFolder restoreFolder = ResourceManager.getOneFolder(resourceType);

    switch (resourceType) {
      case PATTERN_REGEX:
        return importToStucture(
            importObject, restoreFolder, ExpressionType.REGEXP, skip, rename, importItemName);
      case PATTERN_SQL:
        return importToStucture(
            importObject, restoreFolder, ExpressionType.SQL_LIKE, skip, rename, importItemName);
      case USER_DEFINED_INDICATORS:
        return importIndicatorToStucture(importObject, restoreFolder, skip, rename, importItemName);
      case RULES_PARSER:
        return importParserRuleToStucture(
            importObject, restoreFolder, skip, rename, importItemName);
      default:
        return null;
    }
  }
 /**
  * DOC msjian Comment method "extractFolder".
  *
  * @param oldItem
  * @param oldModelElement
  * @return
  */
 @Override
 protected IFolder extractFolder(Item oldItem, ModelElement oldObject) {
   boolean inCurrentMainProject = ProjectManager.getInstance().isInCurrentMainProject(oldItem);
   if (inCurrentMainProject) {
     Resource resource = oldItem.eResource();
     IPath path = new Path(resource.getURI().toPlatformString(false));
     IFile oldFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
     return (IFolder) oldFile.getParent();
   } else {
     // for the reference project node, we get its folder in current project.
     return ResourceManager.getOneFolder(EResourceConstant.JRXML_TEMPLATE);
   }
 }