org.openl.rules.lang.xls.XlsSheetSourceCodeModule类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.openl.rules.lang.xls.XlsSheetSourceCodeModule类的一些代码示例,展示了XlsSheetSourceCodeModule类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XlsSheetSourceCodeModule类的具体详情如下:
包路径:org.openl.rules.lang.xls.XlsSheetSourceCodeModule
类名称:XlsSheetSourceCodeModule

XlsSheetSourceCodeModule介绍

暂无

代码示例

代码示例来源:origin: org.openl.rules/org.openl.rules.webstudio

/**
 * {@inheritDoc}
 */
@Override
public Object makeObject(TableSyntaxNode tsn) {
  return tsn.getXlsSheetSourceCodeModule().getWorkbookSource();
}

代码示例来源:origin: openl-tablets/openl-tablets

/**
 * {@inheritDoc}
 */
@Override
public String[] getDisplayValue(Object nodeObject, int i) {
  XlsSheetSourceCodeModule sheet = (XlsSheetSourceCodeModule) nodeObject;
  return new String[] { sheet.getSheetName(), sheet.getSheetName(), sheet.getSheetName() };
}

代码示例来源:origin: openl-tablets/openl-tablets

ParsedGrid(String workbookPath,
    XlsSheetSourceCodeModule sheetSource,
    SheetDescriptor sheet,
    Object[][] cells,
    boolean use1904Windowing) {
  this.workbookPath = workbookPath;
  this.cells = cells;
  this.sheetSource = sheetSource;
  this.uri = sheetSource.getUri();
  this.sheetDescriptor = sheet;
  this.use1904Windowing = use1904Windowing;
  findRegions();
  sheetSource.getWorkbookSource().addListener(new WorkbookSaveListener());
}

代码示例来源:origin: openl-tablets/openl-tablets

protected IWritableGrid getWritableGrid() {
  if (writableGrid == null) {
    sheetSource.getWorkbookSource().getWorkbookLoader().setCanUnload(false);
    writableGrid = new XlsSheetGridModel(sheetSource);
    // Prepare workbook for edit (load it to memory before editing starts)
    sheetSource.getSheet();
  }
  return writableGrid;
}

代码示例来源:origin: org.openl.rules/org.openl.rules.webstudio

/**
 * {@inheritDoc}
 */
@Override
public String getUrl(Object nodeObject) {
  XlsSheetSourceCodeModule sheet = (XlsSheetSourceCodeModule) nodeObject;
  return sheet.getUri();
}

代码示例来源:origin: org.openl.rules/org.openl.rules.webstudio

protected XlsSheetSourceCodeModule getDestinationSheet() {
  XlsSheetSourceCodeModule sourceCodeModule;
  XlsWorkbookSourceCodeModule module = workbooks.get(workbook);
  if (newWorksheet) {
    Sheet sheet = module.getWorkbook().createSheet(getNewWorksheetName());
    sourceCodeModule = new XlsSheetSourceCodeModule(new SimpleSheetLoader(sheet), module);
  } else {
    Sheet sheet = module.getWorkbook().getSheetAt(getWorksheetIndex());
    sourceCodeModule = new XlsSheetSourceCodeModule(new SimpleSheetLoader(sheet), module);
  }
  return sourceCodeModule;
}

代码示例来源:origin: openl-tablets/openl-tablets

private Sheet getSheet() {
  return sheetSource.getSheet();
}

代码示例来源:origin: org.openl.rules/org.openl.rules.webstudio

private Set<String> getAllSpecificCategories() {
  Set<String> specificCategories = new TreeSet<String>();
  TableSyntaxNode[] syntaxNodes = WizardUtils.getTableSyntaxNodes();
  for (TableSyntaxNode node : syntaxNodes) {
    XlsSheetSourceCodeModule tableModule = node.getXlsSheetSourceCodeModule();
    if (tableModule != null) {
      String categoryName = tableModule.getDisplayName();
      if (StringUtils.isNotBlank(categoryName)) {
        specificCategories.add(categoryName);
      }
    }
  }
  return specificCategories;
}

代码示例来源:origin: openl-tablets/openl-tablets

/**
 * {@inheritDoc}
 */
@Override
public String getUrl(Object nodeObject) {
  XlsSheetSourceCodeModule sheet = (XlsSheetSourceCodeModule) nodeObject;
  return sheet.getUri();
}

代码示例来源:origin: openl-tablets/openl-tablets

protected XlsSheetSourceCodeModule getDestinationSheet() {
  XlsSheetSourceCodeModule sourceCodeModule;
  XlsWorkbookSourceCodeModule module = workbooks.get(workbook);
  if (newWorksheet) {
    Sheet sheet = module.getWorkbook().createSheet(getNewWorksheetName());
    sourceCodeModule = new XlsSheetSourceCodeModule(new SimpleSheetLoader(sheet), module);
  } else {
    Sheet sheet = module.getWorkbook().getSheetAt(getWorksheetIndex());
    sourceCodeModule = new XlsSheetSourceCodeModule(new SimpleSheetLoader(sheet), module);
  }
  return sourceCodeModule;
}

代码示例来源:origin: openl-tablets/openl-tablets

@Override
  public Sheet getSheet() {
    log.debug("Full sheet load. Should be invoked only when edit any table.");
    return super.getSheet();
  }
}

代码示例来源:origin: openl-tablets/openl-tablets

private Set<String> getAllSpecificCategories() {
  Set<String> specificCategories = new TreeSet<String>();
  TableSyntaxNode[] syntaxNodes = WizardUtils.getTableSyntaxNodes();
  for (TableSyntaxNode node : syntaxNodes) {
    XlsSheetSourceCodeModule tableModule = node.getXlsSheetSourceCodeModule();
    if (tableModule != null) {
      String categoryName = tableModule.getDisplayName();
      if (StringUtils.isNotBlank(categoryName)) {
        specificCategories.add(categoryName);
      }
    }
  }
  return specificCategories;
}

代码示例来源:origin: org.openl.rules/org.openl.rules.webstudio.java

/**
 * {@inheritDoc}
 */
@Override
public Object makeObject(TableSyntaxNode tsn) {
  return tsn.getXlsSheetSourceCodeModule().getWorkbookSource();
}

代码示例来源:origin: org.openl.rules/org.openl.rules.webstudio

/**
 * {@inheritDoc}
 */
@Override
public String[] getDisplayValue(Object nodeObject, int i) {
  XlsSheetSourceCodeModule sheet = (XlsSheetSourceCodeModule) nodeObject;
  return new String[] { sheet.getSheetName(), sheet.getSheetName(), sheet.getSheetName() };
}

代码示例来源:origin: org.openl.rules/org.openl.extension.xmlrules

/**
 * Gets all grid tables from the sheet.
 */
protected IGridTable[] getAllGridTables(XlsSheetSourceCodeModule sheetSource,
    ExtensionModule module,
    LazyWorkbook workbook,
    Sheet sheet,
    XmlRulesModuleSourceCodeModule sourceCodeModule,
    List<ParseError> parseErrors,
    Collection<OpenLMessage> messages) {
  String uri = sheetSource.getUri();
  LazyXmlRulesWorkbookLoader workbookLoader = (LazyXmlRulesWorkbookLoader) sheetSource.getWorkbookSource()
    .getWorkbookLoader();
  StringGridBuilder gridBuilder = new StringGridBuilder(uri, workbookLoader.getExtensionModule().getFileName());
  if (workbook.getXlsFileName().equals(ExtensionDescriptor.TYPES_WORKBOOK)) {
    TypeGridBuilder.build(gridBuilder, sheet, messages);
  } else {
    DataInstanceGridBuilder.build(gridBuilder, module, sheet, messages);
    TableGridBuilder.build(gridBuilder, module, sheet, messages);
    FunctionGridBuilder.build(gridBuilder, module, sheet, messages);
    CellExpressionGridBuilder.build(sheetSource, gridBuilder, sheet, parseErrors, messages);
    ArrayCellExpressionGridBuilder.build(gridBuilder, sheet, parseErrors, messages);
    if (sheet.getId() == ExtensionDescriptor.MAIN_SHEET_NUMBER) {
      EnvironmentGridBuilder.build(gridBuilder, sourceCodeModule, messages);
    }
  }
  return gridBuilder.build().getTables();
}

代码示例来源:origin: org.openl.rules/org.openl.rules.webstudio.java

/**
 * {@inheritDoc}
 */
@Override
public String getUrl(Object nodeObject) {
  XlsSheetSourceCodeModule sheet = (XlsSheetSourceCodeModule) nodeObject;
  return sheet.getUri();
}

代码示例来源:origin: org.openl.rules/org.openl.rules.webstudio.java

protected XlsSheetSourceCodeModule getDestinationSheet() {
  XlsSheetSourceCodeModule sourceCodeModule;
  XlsWorkbookSourceCodeModule module = workbooks.get(workbook);
  if (newWorksheet) {
    Sheet sheet = module.getWorkbook().createSheet(getNewWorksheetName());
    sourceCodeModule = new XlsSheetSourceCodeModule(sheet, getNewWorksheetName(), module);
  } else {
    Sheet sheet = module.getWorkbook().getSheetAt(getWorksheetIndex());
    sourceCodeModule = new XlsSheetSourceCodeModule(sheet, module.getWorkbook().getSheetName(
        getWorksheetIndex()), module);
  }
  return sourceCodeModule;
}

代码示例来源:origin: openl-tablets/openl-tablets

private ICellStyle getCellStyle(Cell cell) {
  CellStyle style = cell.getCellStyle();
  if (style != null) {
    Workbook workbook = gridModel.getSheetSource().getSheet().getWorkbook();
    return new XlsCellStyle(style, workbook);
  }
  return null;
}

代码示例来源:origin: openl-tablets/openl-tablets

/**
 * {@inheritDoc}
 */
@Override
public Object makeObject(TableSyntaxNode tsn) {
  return tsn.getXlsSheetSourceCodeModule().getWorkbookSource();
}

代码示例来源:origin: org.openl.rules/org.openl.rules.webstudio.java

/**
 * {@inheritDoc}
 */
@Override
public String[] getDisplayValue(Object nodeObject, int i) {
  XlsSheetSourceCodeModule sheet = (XlsSheetSourceCodeModule) nodeObject;
  return new String[] { sheet.getSheetName(), sheet.getSheetName(), sheet.getSheetName() };
}

相关文章