本文整理了Java中org.jdom.Element.getValue()
方法的一些代码示例,展示了Element.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getValue()
方法的具体详情如下:
包路径:org.jdom.Element
类名称:Element
方法名:getValue
[英]Returns the XPath 1.0 string value of this element, which is the complete, ordered content of all text node descendants of this element (i.e. the text that's left after all references are resolved and all other markup is stripped out.)
[中]返回此元素的XPath 1.0字符串值,它是此元素的所有文本节点子体的完整有序内容(即解析所有引用并除去所有其他标记后剩下的文本)
代码示例来源:origin: banq/jdonframework
public String[] getChildrenPropertiesValues(String parent) {
String[] propName = parsePropertyName(parent);
// Search for this property by traversing down the XML heirarchy.
Element element = doc.getRootElement();
for (int i = 0; i < propName.length; i++) {
element = element.getChild(propName[i]);
if (element == null) {
// This node doesn't match this part of the property name which
// indicates this property doesn't exist so return empty array.
return new String[] {};
}
}
// We found matching property, return names of children.
List children = element.getChildren();
int childCount = children.size();
String[] childrenNames = new String[childCount];
for (int i = 0; i < childCount; i++) {
childrenNames[i] = ((Element) children.get(i)).getValue();
}
return childrenNames;
}
代码示例来源:origin: org.n52.wps/52n-wps-configuration-api
private String getValue(Element element) {
if (element != null) {
return element.getValue();
}
return null;
}
代码示例来源:origin: org.codehaus.xfire/xfire-core
protected String getChildValue(Element element, String localName, Namespace ns)
{
Element child = element.getChild(localName, ns);
if (child == null) return null;
return child.getValue();
}
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2
/**
* @param artifactElement
* a nexus jdom xml artifact element
*/
public Artifact(Element artifactElement) {
groupId = artifactElement.getChild("groupId").getValue();
artifactId = artifactElement.getChild("artifactId").getValue();
version = artifactElement.getChild("version").getValue();
classifier = artifactElement.getChild("classifier").getValue();
packaging = artifactElement.getChild("packaging").getValue();
repoId = artifactElement.getChild("repoId").getValue();
}
代码示例来源:origin: kitodo/kitodo-production
@SuppressWarnings("unchecked")
private static String getSubelementValue(Element inElement, String attributeValue) {
String rueckgabe = "";
for (Iterator<Element> iter = inElement.getChildren().iterator(); iter.hasNext();) {
Element subElement = iter.next();
if (subElement.getAttributeValue("code").equals(attributeValue)) {
rueckgabe = subElement.getValue();
}
}
return rueckgabe;
}
代码示例来源:origin: apache/oozie
@Override
public String call() throws Exception {
return doExecute(host, dirLocation, commandElement.getValue(), argsF, ignoreOutput, action, recoveryId,
preserveF);
}
});
代码示例来源:origin: org.apache.oozie/oozie-core
@Override
public String call() throws Exception {
return doExecute(host, dirLocation, commandElement.getValue(), argsF, ignoreOutput, action, recoveryId,
preserveF);
}
});
代码示例来源:origin: org.codehaus.xfire/xfire-core
protected static QName elementToQName(Element el)
{
String value = el.getValue();
return stringToQName(el, value);
}
代码示例来源:origin: org.n52.wps/52n-wps-configuration-api
private String getValue(Element element, String child) {
if (element != null) {
Element childElement = element.getChild(child, Namespace.getNamespace(NAMESPACE));
if (childElement != null) {
return childElement.getValue();
}
}
return null;
}
代码示例来源:origin: org.codehaus.xfire/xfire-core
public String getAddress()
{
return getAddressElement().getValue();
}
代码示例来源:origin: geosolutions-it/geoserver-manager
public String getSuggestedTileSize() {
Element el = getParameter(SUGGESTED_TILE_SIZEFilter);
if (el != null) {
List<Element> values = el.getChildren();
for (Element elm : values) {
String value = elm.getValue();
if (!value.equalsIgnoreCase(SUGGESTED_TILE_SIZE)) {
return value;
}
}
}
return null;
}
代码示例来源:origin: com.atlassian.confluence.plugins/confluence-jira3-plugin
private void appendMultivalueBuiltinColumn(Element itemElement, String columnName, StringBuilder jsonIssueElementBuilder)
{
jsonIssueElementBuilder.append("'");
jsonIssueElementBuilder.append(StringEscapeUtils.escapeJavaScript(xmlXformer.collapseMultiple(itemElement, columnName).getValue()));
jsonIssueElementBuilder.append("'");
}
代码示例来源:origin: edu.washington.cs.knowitall/nlp
public AbstractRegexConstraint(Element e) {
super(e);
List<?> termElements = e.getChildren("term");
if (termElements.size() == 0) {
throw new IllegalArgumentException("No terms specified for element: " + e.toString());
}
List<String> terms = new ArrayList<String>(termElements.size());
for (Object term : termElements) {
terms.add(((Element)term).getValue().toLowerCase());
}
this.pattern = buildPattern(terms);
this.terms = new ArraySet<String>(terms);
}
代码示例来源:origin: jensgerdes/sonar-pmd
private void parsePmdPriority(Element eltRule, PmdRule pmdRule, @Nullable Namespace namespace) {
for (Element eltPriority : getChildren(eltRule, "priority", namespace)) {
pmdRule.setPriority(Integer.valueOf(eltPriority.getValue()));
}
}
代码示例来源:origin: mrprince/sonar-p3c-pmd
private static void parsePmdPriority(Element eltRule, PmdRule pmdRule, @Nullable Namespace namespace) {
for (Element eltPriority : getChildren(eltRule, "priority", namespace)) {
pmdRule.setPriority(eltPriority.getValue());
}
}
}
代码示例来源:origin: org.codehaus.sonar.plugins/sonar-pmd-plugin
private void parsePmdPriority(Element eltRule, PmdRule pmdRule, @Nullable Namespace namespace) {
for (Element eltPriority : getChildren(eltRule, "priority", namespace)) {
pmdRule.setPriority(eltPriority.getValue());
}
}
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
private void updateJournalIssns(org.jdom.Element jmeta, YElement journal) {
// journal.addId(y.id(EXT_SCHEME_ISSN, jmeta.getChildTextTrim("issn")));
List<org.jdom.Element> issns = JDOMHelper.getChildren(jmeta, "issn");
for (org.jdom.Element issn : issns) {
String issnValue = issn.getValue().trim();
// System.out.println("[NlmToYTransformer] Adding next issn:" +
// issnValue);
if (StringUtils.isNotBlank(issnValue)) {
journal.addId(new YId(EXT_SCHEME_ISSN, issnValue));
}
}
}
代码示例来源:origin: org.codehaus.sonar-plugins/sonar-php-plugin
protected final void parsePmdPriority(Element ruleNode, PmdRule pmdRule, Namespace namespace) {
for (Element priorityNode : getChildren(ruleNode, "priority", namespace)) {
pmdRule.setPriority(priorityNode.getValue());
}
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
/**
* Returns the trimmed text value of an element with MathML descendants removed.
*
* @param e the element to get the text value from
* @return the text value of the element after removal of MathML descendants and whitespace trimming
*/
private String noMathMLValue(Element e) {
return zapNamespace((Element) e.clone(), Namespace.getNamespace("http://www.w3.org/1998/Math/MathML")).getValue().trim();
}
代码示例来源:origin: geosolutions-it/geoserver-manager
public void set(final String key, final List<Element> value) {
// if some previous similar object is found
final Element search;
if ((search = ElementUtils.contains(getRoot(), new NestedElementFilter(
getRoot(), key, value.get(0).getValue()))) != null) {
// remove it
ElementUtils.remove(search, search);
}
// add the new entry
add(key, value);
}
内容来源于网络,如有侵权,请联系作者删除!