本文整理了Java中org.apache.abdera.model.Element.setText()
方法的一些代码示例,展示了Element.setText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setText()
方法的具体详情如下:
包路径:org.apache.abdera.model.Element
类名称:Element
方法名:setText
[英]Set the Text value of this element
[中]设置此元素的文本值
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera
public <T extends Element>T setText(String text) {
internal.setText(text);
return (T)this;
}
代码示例来源:origin: org.apache.abdera/abdera-core
public <T extends Element> T setText(DataHandler handler) {
internal.setText(handler);
return (T)this;
}
代码示例来源:origin: org.apache.abdera/abdera-core
public void setText(String text) {
internal.setText(text);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera
public StreamBuilder writeElementText(String value) {
if (!(current instanceof Element)) throw new IllegalStateException("Not currently an element");
Element element = (Element) current;
String text = element.getText();
element.setText(text + value);
return this;
}
代码示例来源:origin: org.apache.abdera/abdera-core
public StreamBuilder writeElementText(String value) {
if (!(current instanceof Element))
throw new IllegalStateException("Not currently an element");
Element element = (Element)current;
String text = element.getText();
element.setText(text + value);
return this;
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public void setValue(String value) {
complete();
if (value != null)
((Element)this).setText(value);
else
_removeAllChildren();
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public void setValue(String value) {
complete();
if (value != null)
((Element)this).setText(value);
else
_removeAllChildren();
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public Element addSimpleExtension(QName qname, String value) {
complete();
FOMFactory fomfactory = (FOMFactory)factory;
Element el = fomfactory.newElement(qname, this);
el.setText(value);
String prefix = qname.getPrefix();
declareIfNecessary(qname.getNamespaceURI(), prefix);
return el;
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public DateTime setValue(AtomDate dateTime) {
complete();
value = null;
if (dateTime != null)
((Element)this).setText(dateTime.getValue());
else
_removeAllChildren();
return this;
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public DateTime setTime(long date) {
complete();
value = null;
((Element)this).setText(AtomDate.valueOf(date).getValue());
return this;
}
代码示例来源:origin: org.apache.ws.commons.axiom/fom-testsuite
@Override
protected void runTest() throws Throwable {
Factory factory = abdera.getFactory();
Control control = factory.newControl();
factory.newElement(Constants.DRAFT, control).setText("yes");
assertThat(control.isDraft()).isTrue();
}
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public IRIElement setValue(String iri) {
complete();
if (iri != null)
((Element)this).setText((new IRI(iri)).toString());
else
_removeAllChildren();
return this;
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public DateTime setDate(Date date) {
complete();
value = null;
if (date != null)
((Element)this).setText(AtomDate.valueOf(date).getValue());
else
_removeAllChildren();
return this;
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public DateTime setCalendar(Calendar date) {
complete();
value = null;
if (date != null)
((Element)this).setText(AtomDate.valueOf(date).getValue());
else
_removeAllChildren();
return this;
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public DateTime setString(String date) {
complete();
value = null;
if (date != null)
((Element)this).setText(AtomDate.valueOf(date).getValue());
else
_removeAllChildren();
return this;
}
代码示例来源:origin: org.apache.abdera/abdera-parser
public Element setEmail(String email) {
complete();
if (email != null) {
FOMFactory fomfactory = (FOMFactory)factory;
Element el = fomfactory.newEmail(null);
el.setText(email);
_setChild(EMAIL, (OMElement)el);
return el;
} else {
_removeChildren(EMAIL, false);
return null;
}
}
代码示例来源:origin: org.apache.abdera/abdera-core
public Element setEmail(String email) {
ExtensibleElement internal = getExtInternal();
Element el = getEmailElement();
if (email != null) {
if (el == null)
el = internal.getFactory().newEmail(internal);
el.setText(email);
return el;
} else {
if (el != null)
el.discard();
return null;
}
}
代码示例来源:origin: org.apache.abdera/abdera-core
public Element setName(String name) {
ExtensibleElement internal = getExtInternal();
Element el = getNameElement();
if (name != null) {
if (el == null)
el = internal.getFactory().newName(internal);
el.setText(name);
return el;
} else {
if (el != null)
el.discard();
return null;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera
public Element setEmail(String email) {
ExtensibleElement internal = getExtInternal();
Element el = getEmailElement();
if (email != null) {
if (el == null)
el = internal.getFactory().newEmail(internal);
el.setText(email);
return el;
} else {
if (el != null) el.discard();
return null;
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.abdera
public Element setName(String name) {
ExtensibleElement internal = getExtInternal();
Element el = getNameElement();
if (name != null) {
if (el == null)
el = internal.getFactory().newName(internal);
el.setText(name);
return el;
} else {
if (el != null) el.discard();
return null;
}
}
内容来源于网络,如有侵权,请联系作者删除!