org.dom4j.swing.XMLTableColumnDefinition.parseType()方法的使用及代码示例

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

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

XMLTableColumnDefinition.parseType介绍

暂无

代码示例

代码示例来源:origin: org.dom4j/dom4j

/**
 * Loads an XML table definition from an XML definition document
 * 
 * @param definition
 *            DOCUMENT ME!
 * 
 * @return DOCUMENT ME!
 */
public static XMLTableDefinition load(Element definition) {
  XMLTableDefinition answer = new XMLTableDefinition();
  answer.setRowExpression(definition.attributeValue("select"));
  for (Iterator<Element> iter = definition.elementIterator("column"); iter
      .hasNext();) {
    Element element = iter.next();
    String expression = element.attributeValue("select");
    String name = element.getText();
    String typeName = element.attributeValue("type", "string");
    String columnXPath = element.attributeValue("columnNameXPath");
    int type = XMLTableColumnDefinition.parseType(typeName);
    if (columnXPath != null) {
      answer.addColumnWithXPathName(columnXPath, expression, type);
    } else {
      answer.addColumn(name, expression, type);
    }
  }
  return answer;
}

代码示例来源:origin: dom4j/dom4j

/**
 * Loads an XML table definition from an XML definition document
 * 
 * @param definition
 *            DOCUMENT ME!
 * 
 * @return DOCUMENT ME!
 */
public static XMLTableDefinition load(Element definition) {
  XMLTableDefinition answer = new XMLTableDefinition();
  answer.setRowExpression(definition.attributeValue("select"));
  for (Iterator<Element> iter = definition.elementIterator("column"); iter
      .hasNext();) {
    Element element = iter.next();
    String expression = element.attributeValue("select");
    String name = element.getText();
    String typeName = element.attributeValue("type", "string");
    String columnXPath = element.attributeValue("columnNameXPath");
    int type = XMLTableColumnDefinition.parseType(typeName);
    if (columnXPath != null) {
      answer.addColumnWithXPathName(columnXPath, expression, type);
    } else {
      answer.addColumn(name, expression, type);
    }
  }
  return answer;
}

代码示例来源:origin: org.dom4j/com.springsource.org.dom4j

/**
 * Loads an XML table definition from an XML definition document
 * 
 * @param definition
 *            DOCUMENT ME!
 * 
 * @return DOCUMENT ME!
 */
public static XMLTableDefinition load(Element definition) {
  XMLTableDefinition answer = new XMLTableDefinition();
  answer.setRowExpression(definition.attributeValue("select"));
  for (Iterator iter = definition.elementIterator("column"); iter
      .hasNext();) {
    Element element = (Element) iter.next();
    String expression = element.attributeValue("select");
    String name = element.getText();
    String typeName = element.attributeValue("type", "string");
    String columnXPath = element.attributeValue("columnNameXPath");
    int type = XMLTableColumnDefinition.parseType(typeName);
    if (columnXPath != null) {
      answer.addColumnWithXPathName(columnXPath, expression, type);
    } else {
      answer.addColumn(name, expression, type);
    }
  }
  return answer;
}

代码示例来源:origin: maven/dom4j

/**
 * Loads an XML table definition from an XML definition document
 * 
 * @param definition
 *            DOCUMENT ME!
 * 
 * @return DOCUMENT ME!
 */
public static XMLTableDefinition load(Element definition) {
  XMLTableDefinition answer = new XMLTableDefinition();
  answer.setRowExpression(definition.attributeValue("select"));
  for (Iterator iter = definition.elementIterator("column"); iter
      .hasNext();) {
    Element element = (Element) iter.next();
    String expression = element.attributeValue("select");
    String name = element.getText();
    String typeName = element.attributeValue("type", "string");
    String columnXPath = element.attributeValue("columnNameXPath");
    int type = XMLTableColumnDefinition.parseType(typeName);
    if (columnXPath != null) {
      answer.addColumnWithXPathName(columnXPath, expression, type);
    } else {
      answer.addColumn(name, expression, type);
    }
  }
  return answer;
}

代码示例来源:origin: org.dom4j/org.motechproject.org.dom4j

/**
 * Loads an XML table definition from an XML definition document
 * 
 * @param definition
 *            DOCUMENT ME!
 * 
 * @return DOCUMENT ME!
 */
public static XMLTableDefinition load(Element definition) {
  XMLTableDefinition answer = new XMLTableDefinition();
  answer.setRowExpression(definition.attributeValue("select"));
  for (Iterator iter = definition.elementIterator("column"); iter
      .hasNext();) {
    Element element = (Element) iter.next();
    String expression = element.attributeValue("select");
    String name = element.getText();
    String typeName = element.attributeValue("type", "string");
    String columnXPath = element.attributeValue("columnNameXPath");
    int type = XMLTableColumnDefinition.parseType(typeName);
    if (columnXPath != null) {
      answer.addColumnWithXPathName(columnXPath, expression, type);
    } else {
      answer.addColumn(name, expression, type);
    }
  }
  return answer;
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Loads an XML table definition from an XML definition document
 * 
 * @param definition
 *            DOCUMENT ME!
 * 
 * @return DOCUMENT ME!
 */
public static XMLTableDefinition load(Element definition) {
  XMLTableDefinition answer = new XMLTableDefinition();
  answer.setRowExpression(definition.attributeValue("select"));
  for (Iterator<Element> iter = definition.elementIterator("column"); iter
      .hasNext();) {
    Element element = iter.next();
    String expression = element.attributeValue("select");
    String name = element.getText();
    String typeName = element.attributeValue("type", "string");
    String columnXPath = element.attributeValue("columnNameXPath");
    int type = XMLTableColumnDefinition.parseType(typeName);
    if (columnXPath != null) {
      answer.addColumnWithXPathName(columnXPath, expression, type);
    } else {
      answer.addColumn(name, expression, type);
    }
  }
  return answer;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j

/**
 * Loads an XML table definition from an XML definition document
 * 
 * @param definition
 *            DOCUMENT ME!
 * 
 * @return DOCUMENT ME!
 */
public static XMLTableDefinition load(Element definition) {
  XMLTableDefinition answer = new XMLTableDefinition();
  answer.setRowExpression(definition.attributeValue("select"));
  for (Iterator iter = definition.elementIterator("column"); iter
      .hasNext();) {
    Element element = (Element) iter.next();
    String expression = element.attributeValue("select");
    String name = element.getText();
    String typeName = element.attributeValue("type", "string");
    String columnXPath = element.attributeValue("columnNameXPath");
    int type = XMLTableColumnDefinition.parseType(typeName);
    if (columnXPath != null) {
      answer.addColumnWithXPathName(columnXPath, expression, type);
    } else {
      answer.addColumn(name, expression, type);
    }
  }
  return answer;
}

代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Loads an XML table definition from an XML definition document
 * 
 * @param definition
 *            DOCUMENT ME!
 * 
 * @return DOCUMENT ME!
 */
public static XMLTableDefinition load(Element definition) {
  XMLTableDefinition answer = new XMLTableDefinition();
  answer.setRowExpression(definition.attributeValue("select"));
  for (Iterator iter = definition.elementIterator("column"); iter
      .hasNext();) {
    Element element = (Element) iter.next();
    String expression = element.attributeValue("select");
    String name = element.getText();
    String typeName = element.attributeValue("type", "string");
    String columnXPath = element.attributeValue("columnNameXPath");
    int type = XMLTableColumnDefinition.parseType(typeName);
    if (columnXPath != null) {
      answer.addColumnWithXPathName(columnXPath, expression, type);
    } else {
      answer.addColumn(name, expression, type);
    }
  }
  return answer;
}

代码示例来源:origin: org.jenkins-ci.dom4j/dom4j

/**
 * Loads an XML table definition from an XML definition document
 * 
 * @param definition
 *            DOCUMENT ME!
 * 
 * @return DOCUMENT ME!
 */
public static XMLTableDefinition load(Element definition) {
  XMLTableDefinition answer = new XMLTableDefinition();
  answer.setRowExpression(definition.attributeValue("select"));
  for (Iterator iter = definition.elementIterator("column"); iter
      .hasNext();) {
    Element element = (Element) iter.next();
    String expression = element.attributeValue("select");
    String name = element.getText();
    String typeName = element.attributeValue("type", "string");
    String columnXPath = element.attributeValue("columnNameXPath");
    int type = XMLTableColumnDefinition.parseType(typeName);
    if (columnXPath != null) {
      answer.addColumnWithXPathName(columnXPath, expression, type);
    } else {
      answer.addColumn(name, expression, type);
    }
  }
  return answer;
}

相关文章