- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中pl.edu.icm.model.bwmeta.utils.YRTHelper.toXmlFragment()
方法的一些代码示例,展示了YRTHelper.toXmlFragment()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YRTHelper.toXmlFragment()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.utils.YRTHelper
类名称:YRTHelper
方法名:toXmlFragment
暂无
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
private String getXMLFragmentFrom(YAttribute attribute){
if(attribute == null){
return null;
}
YRichText yrichText = attribute.getRichValue();
final String result = YRTHelper.toXmlFragment(yrichText, "");
return result;
}
代码示例来源:origin: pl.edu.icm.yadda/yadda-client-common-api
private String toText(final YRichText richText, final boolean flattenText) {
if (richText == null) {
return "";
} else if (flattenText) {
return richText.toText();
} else {
return YRTHelper.toXmlFragment(richText, "\n");
}
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
private String getXMLFragmentFrom(YAttribute referanceText) {
if(referanceText == null){
return "";
} else {
YRichText yrichText = referanceText.getRichValue();
final String result = YRTHelper.toXmlFragment(yrichText, "");
return result;
}
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
public static String xmlFromRichText(YName name) {
return name != null ? YRTHelper.toXmlFragment(name.getRichText()) : "";
}
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
private Map<String, List<LocalizedString>> prepareTypedNames(YElement element,
IFilteringContext filteringContext) {
Map<String, List<LocalizedString>> result = new HashMap<String, List<LocalizedString>>();
for (YName name : element.getNames()) {
String lang = languageDictionary.getShortDescription(name.getLanguage().getShortCode());
String text = detailsFilter.filter(YRTHelper.toXmlFragment(name.getRichText()),
InputType.RICH_TEXT, filteringContext);
LocalizedString ls = new LocalizedString(lang, text);
List<LocalizedString> list;
String type = name.getType();
if (!result.containsKey(type)) {
list = new ArrayList<LocalizedString>();
result.put(type, list);
} else {
list = result.get(type);
}
list.add(ls);
}
return result;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
protected List<LocalizedString> getDescription(YInstitution element,
IFilteringContext filteringContext, String type) {
List<LocalizedString> result = new ArrayList<LocalizedString>();
for (YDescription description : element.getDescriptions()) {
if (type.equals(description.getType())) {
result.add(new LocalizedString(languageDictionary.getShortDescription(
description.getLanguage().getShortCode()),
detailsFilter.filter(YRTHelper.toXmlFragment(description.getRichText()), InputType.RICH_TEXT,
filteringContext)));
}
}
return result;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
protected List<LocalizedString> getDescription(YElement element,
IFilteringContext filteringContext, String type) {
List<LocalizedString> result = new ArrayList<LocalizedString>();
for (YDescription description : element.getDescriptions()) {
if (type.equals(description.getType())) {
result.add(new LocalizedString(languageDictionary.getShortDescription(
description.getLanguage().getShortCode()),
detailsFilter.filter(YRTHelper.toXmlFragment(description.getRichText()), InputType.RICH_TEXT,
filteringContext)));
}
}
return result;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
private Object prepareTitles(List<YName> names, YName defaultName, IFilteringContext filteringContext) {
List<LocalizedString> res = new ArrayList<LocalizedString>();
if (names != null)
for (YName name : names) {
if (defaultName != name && YNameAndYDescriptionSorter.isMainOrAlternativeName(name.getType())) {
String lang = languageDictionary.getShortDescription(name.getLanguage().getShortCode());
res.add(new LocalizedString(lang, detailsFilter.filter(YRTHelper.toXmlFragment(name.getRichText()),
InputType.RICH_TEXT, filteringContext)));
}
}
return res;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
@Override
protected Object buildElementViewPart(YExportable exp,
String[] elementTags, Map<String, Object> additionalParameters,
IFilteringContext filteringContext) {
YInstitution inst = (YInstitution) exp;
Map<String, Object> partModel = new HashMap<String, Object>();
partModel.put("extId", detailsFilter.filter(inst.getId(),
InputType.PLAIN_TEXT, filteringContext));
partModel.put("title", detailsFilter.filter(
YRTHelper.toXmlFragment(inst.getDefaultName().getRichText()),
InputType.RICH_TEXT, filteringContext));
partModel.put("titles", prepareTitles(inst.getNames(), inst.getDefaultName(), filteringContext));
partModel.put("addresses", getAddresses(inst, filteringContext));
partModel.put("contacts", CommonBuilderUtils.resolveContacts(inst, filteringContext, detailsFilter));
partModel.put("description", getDescription(inst, filteringContext, YConstants.DS_ABSTRACT));
partModel.put("fullAddress", getFullAddress(inst, filteringContext));
partModel.put("notes", getDescription(inst, filteringContext, YConstants.DS_NOTE));
if (pageTitleFactory!=null) {
String role = (String) additionalParameters.get(DetailsConstants.PARAM_ROLE);
String title = pageTitleFactory.getTitleForContributor(role, inst.getDefaultName().getText());
additionalParameters.put(DetailsConstants.VIEW_PARAM_PAGE_TITLE, title);
}
return partModel;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
protected List<LocalizedString> prepareTitles(YElement element, IFilteringContext filteringContext) {
YName oneName = element.getDefaultName();
List<LocalizedString> res = new ArrayList<LocalizedString>();
for (YName name : element.getNames()) {
if (name != oneName && YNameAndYDescriptionSorter.isMainOrAlternativeName(name.getType())) {
String lang = languageDictionary.getShortDescription(name.getLanguage().getShortCode());
res.add(new LocalizedString(lang, detailsFilter.filter(
YRTHelper.toXmlFragment(name.getRichText()),
InputType.RICH_TEXT, filteringContext)));
}
}
return res;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
} else {
descr = detailsFilter.filter(
YRTHelper.toXmlFragment(file.getDefaultName().getRichText()),
InputType.RICH_TEXT, filteringContext);
pdescr = detailsFilter.filter(file.getDefaultName().getText(),
本文整理了Java中pl.edu.icm.model.bwmeta.utils.YRTHelper.toXmlFragment()方法的一些代码示例,展示了YRTHelper.toXmlFragmen
我是一名优秀的程序员,十分优秀!