gpt4 book ai didi

org.openl.rules.lang.xls.XlsNodeTypes.equals()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 06:23:05 25 4
gpt4 key购买 nike

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

XlsNodeTypes.equals介绍

暂无

代码示例

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

public static String str2name(String methodHeader, XlsNodeTypes tableType) {
  String resultName = methodHeader;
  if (StringUtils.isBlank(resultName)) {
    resultName = "NO NAME";
  } else if (tableType.equals(XlsNodeTypes.XLS_DATATYPE)) {
    String[] tokens = StringUtils.split(resultName.replaceAll(ROUND_BRACKETS_WITH_ANY_TEXT, ""));
    // ensure that the appropriate index exists
    //
    if (tokens.length > DatatypeNodeBinder.TYPE_INDEX) {
      resultName = tokens[DatatypeNodeBinder.TYPE_INDEX].trim();
    }            
  } else if (tableType.equals(XlsNodeTypes.XLS_DT) || tableType.equals(XlsNodeTypes.XLS_SPREADSHEET)
      || tableType.equals(XlsNodeTypes.XLS_TBASIC) || tableType.equals(XlsNodeTypes.XLS_COLUMN_MATCH)
      || tableType.equals(XlsNodeTypes.XLS_DATA)
      || tableType.equals(XlsNodeTypes.XLS_METHOD) || tableType.equals(XlsNodeTypes.XLS_TEST_METHOD)
      || tableType.equals(XlsNodeTypes.XLS_RUN_METHOD) || tableType.equals(XlsNodeTypes.XLS_CONSTANTS)
      || tableType.equals(XlsNodeTypes.XLS_ENVIRONMENT) || tableType.equals(XlsNodeTypes.XLS_PROPERTIES)) {
    String[] tokens = StringUtils.split(resultName.replaceAll(ROUND_BRACKETS_WITH_ANY_TEXT, ""));
    resultName = tokens[tokens.length - 1].trim();
  } else if (tableType.equals(XlsNodeTypes.XLS_OTHER)) {
    if (resultName != null && resultName.length() > 57) {
      resultName = resultName.substring(0, 57) + "...";
    }
  }
  return resultName;
}

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

private boolean isExecutableTableSyntaxNode(TableSyntaxNode tableSyntaxNode) {
  return XlsNodeTypes.XLS_DT.equals(tableSyntaxNode.getNodeType()) || XlsNodeTypes.XLS_TBASIC
    .equals(tableSyntaxNode.getNodeType()) || XlsNodeTypes.XLS_METHOD
      .equals(tableSyntaxNode.getNodeType()) || XlsNodeTypes.XLS_COLUMN_MATCH.equals(tableSyntaxNode
        .getNodeType()) || XlsNodeTypes.XLS_SPREADSHEET.equals(tableSyntaxNode.getNodeType());
}

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

private boolean isSpreadsheetResultTableSyntaxNode(TableSyntaxNode tableSyntaxNode) {
  return XlsNodeTypes.XLS_SPREADSHEET.equals(tableSyntaxNode.getNodeType());
}

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

private static boolean isSpreadsheet(TableSyntaxNode o1) {
  return XlsNodeTypes.XLS_SPREADSHEET.equals(o1.getNodeType());
}

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

/**
 * TODO: This method should be generic for the TableSyntaxNode
 * and return the type of the table
 * e.g. TableSyntaxNode.getTableReturnType()
 */
public static String getDatatypeName(TableSyntaxNode tsn) throws OpenLCompilationException {
  if (XlsNodeTypes.XLS_DATATYPE.equals(tsn.getNodeType())) {
    IOpenSourceCodeModule src = tsn.getHeader().getModule();
    IdentifierNode[] parsedHeader = tokenizeHeader(src);
    return parsedHeader[DatatypeNodeBinder.TYPE_INDEX].getIdentifier();
  }
  return null;
}

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

private String getParentDatatypeName(TableSyntaxNode tsn) {
  if (XlsNodeTypes.XLS_DATATYPE.equals(tsn.getNodeType())) {
    IOpenSourceCodeModule src = tsn.getHeader().getModule();
    IdentifierNode[] parsedHeader = new IdentifierNode[0];
    try {
      parsedHeader = DatatypeHelper.tokenizeHeader(src);
    } catch (OpenLCompilationException e) {
      // Suppress the exception
      // This exception has already been processed when parsing the table header
      //
    }
    if (parsedHeader.length == 4) {
      return parsedHeader[DatatypeNodeBinder.PARENT_TYPE_INDEX].getIdentifier();
    } else {
      return null;
    }
  }
  return null;
}

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

if (XlsNodeTypes.XLS_DATATYPE.equals(tsn.getNodeType())) {

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

private TableSyntaxNode findNode(XlsUrlParser p1) {
//        TableSyntaxNode[] nodes = getTableSyntaxNodes();
    TableSyntaxNode[] nodes = getAllTableSyntaxNodes();

    for (int i = 0; i < nodes.length; i++) {
      if (XlsUrlUtils.intersects(p1, nodes[i].getGridTable().getUriParser())) {
        TableSyntaxNode tsn = nodes[i];
        if (XlsNodeTypes.XLS_TABLEPART.equals(tsn.getNodeType())) {
          for (int j = 0; j < nodes.length; j++) {
            IGridTable table = nodes[j].getGridTable();
            if (table.getGrid() instanceof CompositeGrid) {
              CompositeGrid compositeGrid = (CompositeGrid) table.getGrid();
              if (findInCompositeGrid(compositeGrid, p1)) {
                return nodes[j];
              }
            }
          }
        }
        return tsn;
      }
    }

    return null;
  }

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

private TableSyntaxNode findNode(XlsUrlParser p1) {
//        TableSyntaxNode[] nodes = getTableSyntaxNodes();
    TableSyntaxNode[] nodes = getAllTableSyntaxNodes();

    for (int i = 0; i < nodes.length; i++) {
      if (XlsUrlUtils.intersects(p1, nodes[i].getGridTable().getUriParser())) {
        TableSyntaxNode tsn = nodes[i];
        if (XlsNodeTypes.XLS_TABLEPART.equals(tsn.getNodeType())) {
          for (int j = 0; j < nodes.length; j++) {
            IGridTable table = nodes[j].getGridTable();
            if (table.getGrid() instanceof CompositeGrid) {
              CompositeGrid compositeGrid = (CompositeGrid) table.getGrid();
              if (findInCompositeGrid(compositeGrid, p1)) {
                return nodes[j];
              }
            }
          }
        }
        return tsn;
      }
    }

    return null;
  }

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com