*
* @param parent the enclosing parent config element
* @return generated config element for this search attribute
*/
public NodeElement asConfigElement(NodeElement parent) {
SimpleNodeElement rv = new SimpleNodeElement(parent, "searchAttribute");
rv.addAttribute(new SimpleNodeAttribute("name", name));
if (expression != null) {
rv.addAttribute(new SimpleNodeAttribute("expression", expression));
} else if (className != null) {
rv.addAttribute(new SimpleNodeAttribute("class", className));
if (properties != null) {
rv.addAttribute(new SimpleNodeAttribute("properties", properties));
}
if (propertySeparator != null) {
rv.addAttribute(new SimpleNodeAttribute("propertySeperator", propertySeparator));
}
}
return rv;
}