| Method from org.dom4j.swing.XMLTableColumnDefinition Detail: |
protected XPath createXPath(String expression) {
return DocumentHelper.createXPath(expression);
}
|
public Class getColumnClass() {
switch (type) {
case STRING_TYPE:
return String.class;
case NUMBER_TYPE:
return Number.class;
case NODE_TYPE:
return Node.class;
default:
return Object.class;
}
}
|
public XPath getColumnNameXPath() {
return columnNameXPath;
}
|
public String getName() {
return name;
}
Getter for property name. |
public int getType() {
return type;
}
Getter for property type. |
public Object getValue(Object row) {
switch (type) {
case STRING_TYPE:
return xpath.valueOf(row);
case NUMBER_TYPE:
return xpath.numberValueOf(row);
case NODE_TYPE:
return xpath.selectSingleNode(row);
default:
return xpath.evaluate(row);
}
}
|
public XPath getXPath() {
return xpath;
}
Getter for property xpath. |
protected void handleException(Exception e) {
// #### should use jakarta commons-logging
System.out.println("Caught: " + e);
}
|
public static int parseType(String typeName) {
if ((typeName != null) && (typeName.length() > 0)) {
if (typeName.equals("string")) {
return STRING_TYPE;
} else if (typeName.equals("number")) {
return NUMBER_TYPE;
} else if (typeName.equals("node")) {
return NODE_TYPE;
}
}
return OBJECT_TYPE;
}
|
public void setColumnNameXPath(XPath columnNameXPath) {
this.columnNameXPath = columnNameXPath;
}
Setter for property columnNameXPath. |
public void setName(String name) {
this.name = name;
}
Setter for property name. |
public void setType(int type) {
this.type = type;
}
Setter for property type. |
public void setXPath(XPath xPath) {
this.xpath = xPath;
}
Setter for property xpath. |