- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription.getText()
方法的一些代码示例,展示了YDescription.getText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YDescription.getText()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YDescription
类名称:YDescription
方法名:getText
暂无
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
private boolean notEmpty(YDescription ydescription){
return (ydescription != null && ydescription.getText() != null);
}
代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import
/**
* Selects most apropriate (English if available) description.
*
* @param descriptions
* list of available descriptions
* @return best found description or null if list is empty
*/
protected static String selectBestDescription(List<YDescription> descriptions) {
if (descriptions == null || descriptions.size() == 0) {
return null;
}
for (YDescription description : descriptions) { // Search for English version
if (description.getLanguage().equals(YLanguage.English)) {
return description.getText();
}
}
return descriptions.get(0).getText();
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
public List<String> getDescription(AbstractNDA<?> abstractNDA, String type){
List<YDescription> descriptions = abstractNDA.getDescriptions();
if(descriptions != null){
List<String> desc = new ArrayList<String>();
for(YDescription description: descriptions){
if(type.equals(description.getType())){
desc.add(description.getText());
}
}
return desc;
} else {
return Collections.emptyList();
}
}
代码示例来源:origin: pl.edu.icm.bwmeta/bwmeta-2-foreign-transformers
protected void fillDescriptions(YElement yElement, List<YExportable> referedElements, Map<String, List<StringWithAttributes>> ret) {
// description element
if (!yElement.getDescriptions().isEmpty()) {
ret.put(E_DESCRIPTION, new ArrayList<StringWithAttributes>());
}
for (YDescription yDescription : yElement.getDescriptions()) {
ret.get(E_DESCRIPTION).add(new StringWithAttributes(yDescription.getText()));
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
protected void fillDescriptions(HtmlMetaHeaders metadata, YElement yElement) {
for (YDescription yDescription : yElement.getDescriptions()) {
if (DescriptionTypes.DS_ABSTRACT.equals(yDescription.getType())) {
metadata.addMetadataName(DCTERMS_NAMESPACE + SEPARATOR + T_ABSTRACT, yDescription.getText());
} else {
metadata.addMetadataName(DC_NAMESPACE + SEPARATOR + DublinCoreStrings.E_DESCRIPTION, yDescription.getText());
}
}
}
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
/**
* Utility function retrieving default description of NDA element in
* specified language
*
* @param element
* @return
*/
public static YDescription getDefaultDescription(AbstractNDA<?> element, YLanguage language) {
List<YDescription> acceptableDescriptions = fetchDescriptions(element, language);
if (acceptableDescriptions.isEmpty()) {
return null;
}
if (acceptableDescriptions.size() == 1) {
return acceptableDescriptions.get(0);
}
int bestDescription = 0, maxLength = 0;
for (int i = 0; i < acceptableDescriptions.size(); i++) {
YDescription description = acceptableDescriptions.get(i);
String text = description.getText();
int length = text.replaceAll("\\s", "").length();
if (length > maxLength) {
maxLength = length;
bestDescription = i;
}
}
return acceptableDescriptions.get(bestDescription);
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
protected void convertDescription(YElement yElement, BibEntry bibEntry) {
List<YDescription> descriptions = yElement.getDescriptions();
for (YDescription description : descriptions) {
if (description.getType().equals(YConstants.DS_ABSTRACT)) {
bibEntry.setField(BibEntry.FIELD_ABSTRACT, description.getText());
}
if (description.getType().equals(YConstants.DS_NOTE)) {
bibEntry.setField(BibEntry.FIELD_NOTE, description.getText());
}
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
@Override
void compare(YElement expected, YElement actual, EvalResult result) {
Map<String, YDescription> actYDescMap = new HashMap<String, YDescription>();
for (YDescription ydescr : actual.getDescriptions()) {
String type = ydescr.getType();
actYDescMap.put(type, ydescr);
}
for (YDescription ydescr : expected.getDescriptions()) {
String type = ydescr.getType();
if (actYDescMap.containsKey(type)) {
if (ydescr.getText().equals(actYDescMap.get(type).getText())) {
result.append(type, ResultStatus.RECOGNIZED, 1);
} else {
result.append(type, ResultStatus.FAILED, 1);
}
actYDescMap.remove(type);
} else {
result.append(type, ResultStatus.FAILED, 1);
}
}
for (String type : actYDescMap.keySet()) {
result.append(type, ResultStatus.REDUNDANT, 1);
}
}
},
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
/**
* accomplished
*/
private void parseDescriptions() {
if(!in_item.getDescriptions().isEmpty()){
int descriptionid = 0;
for(YDescription yd : in_item.getDescriptions()){
descriptionid++;
Statements s_desc = new Statements();statements.add(s_desc);
s_desc.setSubject(RelConstants.NS_DESCRIPTION+in_item.getId()+"/"+descriptionid);
LinkedList<PredicateAndObject> paos_description = new LinkedList<PredicateAndObject>();
paos_description.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yd.getLanguage().getName()));
paos_description.add(new PredicateAndObject(RelConstants.RL_TYPE, yd.getType()));
paos_description.add(new PredicateAndObject(RelConstants.RL_TEXT, yd.getText()));
paos_doc.add(new PredicateAndObject(RelConstants.RL_HAS_DESCRIPTION , RelConstants.NS_DESCRIPTION+in_item.getId()+"/"+descriptionid));
}
}
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
final YDescription oneDescription = institution.getOneDescription(YConstants.DS_ABSTRACT);
if (notEmpty(oneDescription)) {
result.put("description", oneDescription.getText());
result.put(YConstants.DS_NOTE, noteDescription.getText());
代码示例来源:origin: pl.edu.icm.synat/synat-portal-core
private String extractTextFromYElement(final YElement yElement) throws IOException {
final String sep = " ";
final YLanguage lang = YLanguage.Polish;
StringBuilder builder = new StringBuilder();
for (YName data : yElement.getNames()) {
if(lang.equals(data.getLanguage())){
builder.append(data.getText());
builder.append(sep);
}
}
for (YDescription data : yElement.getDescriptions()) {
if(lang.equals(data.getLanguage())){
builder.append(data.getText());
builder.append(sep);
}
}
for(FilteredContentEntry<?> plainTextFile:ResourceDisplayUtilsImpl.fetchPlainTextContentEntries(yElement)){
if(plainTextFile.getSource() instanceof YContentFile){
YContentFile file = (YContentFile)plainTextFile.getSource();
ElementContent elementContent = repositoryFacade.fetchContent(yElement.getId(), file.getLocations().get(0));
builder.append(IOUtils.toString(elementContent.getStream()));
builder.append(sep);
}
}
return builder.toString().trim();
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl
/**
* accomplished
*/
private void parseDescriptions() {
if(!in_item.getDescriptions().isEmpty()){
int descriptionid = 0;
for(YDescription yd : in_item.getDescriptions()){
descriptionid++;
Statements s_desc = new Statements();statements.add(s_desc);
s_desc.setSubject(RelConstants.NS_DESCRIPTION+in_item.getId()+"#"+descriptionid);
LinkedList<PredicateAndObject> paos_description = new LinkedList<PredicateAndObject>();
paos_description.add(new PredicateAndObject(RelConstants.RL_LANGUAGE, yd.getLanguage().getName()));
paos_description.add(new PredicateAndObject(RelConstants.RL_TYPE, yd.getType()));
paos_description.add(new PredicateAndObject(RelConstants.RL_TEXT, yd.getText()));
paos_doc.add(new PredicateAndObject(RelConstants.RL_HAS_DESCRIPTION , RelConstants.NS_DESCRIPTION+in_item.getId()+"#"+descriptionid));
}
}
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-cli
if (YConstants.DS_ABSTRACT.equalsIgnoreCase(desc.getType())) {
if (lang==null || lang.equals(desc.getLanguage())) {
textsTexts.add(new Pair<String, TextType>(normalize(desc.getText()), TextType.ABSTRACT));
hasAbstarct = true;
textsTexts.add(new Pair<String, TextType>(normalize(desc.getText()), TextType.ABSTRACT));
hasAbstarct = true;
代码示例来源:origin: pl.edu.icm.yadda/yadda-cli
if (YConstants.DS_ABSTRACT.equalsIgnoreCase(desc.getType())) {
if (lang==null || lang.equals(desc.getLanguage())) {
textsTexts.add(new Pair<String, TextType>(normalize(desc.getText()), TextType.ABSTRACT));
hasAbstarct = true;
代码示例来源:origin: pl.edu.icm.yadda/yadda-cli
for (YDescription desc : elem.getDescriptions()) {
if (YConstants.DS_ABSTRACT.equalsIgnoreCase(desc.getType())) {
textsTexts.add(new Pair<String, TextType>(normalize(desc.getText()), TextType.ABSTRACT));
hasAbstarct = true;
代码示例来源:origin: pl.edu.icm.yadda/yadda-content
metadata.setTitle(defaultName);
final String defaultDescription = element.getOneDescription() == null ? null : element.getOneDescription()
.getText();
metadata.setAbstract(defaultDescription);
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
YRichText yRichText = description.getRichText();
if(isSimple(yRichText)){
page.setContent(description.getText());
} else {
String text = YRTHelper.toXmlFragmentWithoutNamespaces(yRichText);
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription.()方法的一些代码示例,展示了YDescription.()的具体用法。这些代码示例主要来源于Gith
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription.getRichText()方法的一些代码示例,展示了YDescription.getRichText(
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription.getLanguage()方法的一些代码示例,展示了YDescription.getLanguage(
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription.getType()方法的一些代码示例,展示了YDescription.getType()的具体用法。这
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription.getText()方法的一些代码示例,展示了YDescription.getText()的具体用法。这
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription.setText()方法的一些代码示例,展示了YDescription.setText()的具体用法。这
本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription.setType()方法的一些代码示例,展示了YDescription.setType()的具体用法。这
我是一名优秀的程序员,十分优秀!