本文整理汇总了Java中org.dom4j.Element.getStringValue方法的典型用法代码示例。如果您正苦于以下问题:Java Element.getStringValue方法的具体用法?Java Element.getStringValue怎么用?Java Element.getStringValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.dom4j.Element
的用法示例。
在下文中一共展示了Element.getStringValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parse
import org.dom4j.Element; //导入方法依赖的package包/类
@Override
public StateLike parse(Element elem) {
super.parse(elem);
List<Element> intervalElement = elem.selectNodes(TIME_TAG);
// 拿 孩子节点
for (Element intervalNode : intervalElement) {
this.time = intervalNode.getStringValue();
}
return this;
}
示例2: getMatchingNodes
import org.dom4j.Element; //导入方法依赖的package包/类
List<Element> getMatchingNodes( String snapshot, XmlNode xmlNode ) {
// cycle all nodes that come for this XPath
List<Element> matchedNodes = new ArrayList<>();
List foundNodeObjects = xmlNode.getnode().selectNodes(this.xpath);
if (foundNodeObjects != null) {
for (Object foundNodeObject : foundNodeObjects) {
Element node = (Element) foundNodeObject;
String message = null;
String nodeValue = node.getStringValue();
if (matchType == MATCH_TYPE.TEXT && nodeValue.equalsIgnoreCase(value)) {
// equals text
message = "equals ignoring case '" + value + "'";
} else if (matchType == MATCH_TYPE.CONTAINS_TEXT
&& nodeValue.toLowerCase().contains(this.value.toLowerCase())) {
// contains text
message = "contains ignoring case '" + value + "'";
} else if (nodeValue.matches(value)) {
// matches regex
message = "matches the '" + value + "' regular expression";
}
if (message != null) {
if (log.isDebugEnabled()) {
log.debug("[" + snapshot + "] File " + filePath + ": Removing XML node "
+ new XmlNode(xmlNode, node).getSignature("") + " as its value '"
+ nodeValue + "' " + message);
}
matchedNodes.add(node);
}
}
}
return matchedNodes;
}
示例3: buildConnection
import org.dom4j.Element; //导入方法依赖的package包/类
private Connection buildConnection(Element element){
Connection conn=new Connection();
conn.setName(element.attributeValue("name"));
conn.setToName(element.attributeValue("to"));
conn.setG(element.attributeValue("g"));
String script=element.getStringValue();
if(StringUtils.isNotEmpty(script)){
conn.setScript(script);
}
return conn;
}
示例4: parse
import org.dom4j.Element; //导入方法依赖的package包/类
@Override
public ScriptNode parse(Element element) {
ScriptNode node =new ScriptNode();
node.setName(element.attributeValue("name"));
node.setEventBean(element.attributeValue("event-bean"));
node.setX(element.attributeValue("x"));
node.setY(element.attributeValue("y"));
node.setWidth(element.attributeValue("width"));
node.setHeight(element.attributeValue("height"));
node.setConnections(parseConnections(element));
String script=element.getStringValue();
node.setScript(script);
return node;
}
示例5: parseDecisionItem
import org.dom4j.Element; //导入方法依赖的package包/类
private DecisionItem parseDecisionItem(Element element){
DecisionItem item=new DecisionItem();
item.setTo(element.attributeValue("connection"));
String script=element.getStringValue();
item.setScript(script);
String percent=element.attributeValue("percent");
if(StringUtils.isNotEmpty(percent)){
item.setPercent(Integer.valueOf(percent));
}
return item;
}