本文整理了Java中org.dom4j.Element.hasContent()
方法的一些代码示例,展示了Element.hasContent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.hasContent()
方法的具体详情如下:
包路径:org.dom4j.Element
类名称:Element
方法名:hasContent
暂无
代码示例来源:origin: me.wuwenbin/template-tools-util
/**
* @param e
* @方法功能描述:判断节点是否还有子节点
* @方法名:hasChild
* @返回类型:boolean
* @时间:2011-4-14下午01:43:48
*/
public boolean hasChild(Element e) {
if (e == null)
return false;
return e.hasContent();
}
代码示例来源:origin: me.wuwenbin/template-utils-lang
/**
* @param e
* @方法功能描述:判断节点是否还有子节点
* @方法名:hasChild
* @返回类型:boolean
* @时间:2011-4-14下午01:43:48
*/
public boolean hasChild(Element e) {
if (e == null)
return false;
return e.hasContent();
}
代码示例来源:origin: org.craftercms/crafter-core
@Override
public Element merge(Element parent, Element child, Map<String, String> params) throws XmlMergeException {
if (parent.hasContent()) {
return parent;
} else {
return child;
}
}
代码示例来源:origin: org.craftercms/crafter-core
@Override
public Element merge(Element parent, Element child, Map<String, String> params) throws XmlMergeException {
if (child.hasContent()) {
return child;
} else {
return parent;
}
}
代码示例来源:origin: hibernate/hibernate
public boolean hasContent() {
return element.hasContent();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public boolean hasContent() {
return element.hasContent();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public boolean hasContent() {
return element.hasContent();
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public boolean hasContent() {
return element.hasContent();
}
代码示例来源:origin: qq53182347/liugh-mybatis
private String getValue(Element node) {
return node.hasContent() ? node.getText() : node.attributeValue("value");
}
代码示例来源:origin: com.atlassian.refapp/atlassian-refapp-backdoor-module-plugin
private boolean isPackageSet(Element element) {
if (element == null || element.elements("package") == null || element.elements("package").size() == 0) {
return false;
}
for (Object packages : element.elements("package")) {
if (!((Element) packages).hasContent()) {
return false;
}
}
return true;
}
代码示例来源:origin: hibernate/hibernate
public boolean hasContent() {
return target().hasContent();
}
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
public boolean hasContent() {
return target().hasContent();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public boolean hasContent() {
return target().hasContent();
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public boolean hasContent() {
return target().hasContent();
}
代码示例来源:origin: com.github.albfernandez/jbpm-jpdl
public void read(Element delegateElement, JpdlXmlReader jpdlReader) {
processDefinition = jpdlReader.getProcessDefinition();
className = delegateElement.attributeValue("class");
if (className == null) {
jpdlReader.addWarning("no class specified in delegation: " + delegateElement.getPath());
}
configType = delegateElement.attributeValue("config-type");
if (delegateElement.hasContent()) {
configuration = jpdlReader.writeElementContent(delegateElement);
}
}
代码示例来源:origin: org.jbpm.jbpm3/jbpm-jpdl
public void read(Element delegateElement, JpdlXmlReader jpdlReader) {
processDefinition = jpdlReader.getProcessDefinition();
className = delegateElement.attributeValue("class");
if (className == null) {
jpdlReader.addWarning("no class specified in delegation: " + delegateElement.getPath());
}
configType = delegateElement.attributeValue("config-type");
if (delegateElement.hasContent()) {
configuration = jpdlReader.writeElementContent(delegateElement);
}
}
代码示例来源:origin: org.apache.archiva/archiva-dependency-tree-consumer
public boolean endVisit( DependencyNode node )
{
Element e = xmlNode.getParent();
if ( !xmlNode.hasContent() )
{
e.remove( xmlNode );
}
xmlNode = e.getParent();
return true;
}
}
代码示例来源:origin: org.onap.ccsdk.sli.plugins/restconf-client-provider
@Override
public void walk(XmlListener listener, Element xmlElement) throws
SvcLogicException {
listener.enterXmlElement(xmlElement, getXmlNodeType(xmlElement));
if (xmlElement.hasContent() && !xmlElement.isTextOnly()) {
Iterator i = xmlElement.elementIterator();
while (i.hasNext()) {
Element childElement = (Element) i.next();
walk(listener, childElement);
}
}
listener.exitXmlElement(xmlElement);
}
}
代码示例来源:origin: org.onap.ccsdk.sli.plugins/restconf-client-provider
/**
* Returns the node type of a XML element.
*
* @param element XML element
* @return node type of the XML element
*/
static XmlNodeType getXmlNodeType(Element element) {
Element newElement = element.createCopy();
newElement.remove(element.getNamespace());
return newElement.hasContent() && newElement.isTextOnly() ?
TEXT_NODE : OBJECT_NODE;
}
代码示例来源:origin: org.onosproject/onos-yang-serializers-xml
/**
* Determine the type of an element.
*
* @param element to be analysed
* @return type of the element
*/
private XmlNodeType getElementType(Element element) {
Element newElement = element.createCopy();
newElement.remove(element.getNamespace());
return newElement.hasContent() && newElement.isTextOnly() ?
TEXT_NODE : OBJECT_NODE;
}
}
内容来源于网络,如有侵权,请联系作者删除!