本文整理了Java中pl.edu.icm.model.bwmeta.y.YDescription.getType()
方法的一些代码示例,展示了YDescription.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YDescription.getType()
方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YDescription
类名称:YDescription
方法名:getType
暂无
代码示例来源:origin: pl.edu.icm.synat/synat-business-services-api
public static boolean acceptableDescription(YDescription yDescription) {
return StringUtils.isBlank(yDescription.getType()) || ACCEPTED_DESCRIPTION_TYPES.contains(yDescription.getType());
}
代码示例来源:origin: pl.edu.icm.synat/synat-process-common
private boolean hasAbstract(YElement element) {
boolean hasAbstract = false;
for (YDescription entry : element.getDescriptions()) {
if (DescriptionTypes.DS_ABSTRACT.equals(entry.getType())) {
hasAbstract = true;
}
}
return hasAbstract;
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
/**
* Remove from list objects with specified type.
*
* @param descriptions the descriptions
* @param type the type
* @return the removed list
*/
private static List<YDescription> clear(final List<YDescription> descriptions, final String type) {
final List<YDescription> toRemove = new ArrayList<>();
for (final YDescription desc : descriptions) {
if (type.equals(desc.getType())) {
toRemove.add(desc);
}
}
descriptions.removeAll(toRemove);
return toRemove;
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
private List<YDescription> removeAbstractsFromDescriptions() {
List<YDescription> yDescriptions = new ArrayList<>();
for (YDescription yDesc : safe(article.getDescriptions())) {
if(!yDesc.getType().equals(YConstants.DS_ABSTRACT)) {
yDescriptions.add(yDesc);
}
}
return yDescriptions;
}
代码示例来源: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.yadda.repowebeditor/repository-web-editor-core
public List<LocalizedString> getLocalizedDescription(AbstractNDA<?> abstractNDA, String type){
List<YDescription> descriptions = abstractNDA.getDescriptions();
if(descriptions != null){
List<LocalizedString> desc = new ArrayList<LocalizedString>();
for(YDescription description: descriptions){
if(type.equals(description.getType())){
LocalizedString localizedString = convertIntoLocalizedStringFrom(description);
desc.add(localizedString);
}
}
return desc;
} else {
return Collections.emptyList();
}
}
代码示例来源: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.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.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/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-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
ArrayList<Pair<String, TextType>> textsTexts = new ArrayList<Pair<String, TextType>>();
for (YDescription desc : elem.getDescriptions()) {
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));
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-cli
ArrayList<Pair<String, TextType>> textsTexts = new ArrayList<Pair<String, TextType>>();
for (YDescription desc : elem.getDescriptions()) {
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));
代码示例来源:origin: pl.edu.icm.yadda/yadda-cli
boolean hasTitle = false;
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-polindex
if (YConstants.DS_ABSTRACT.equals(description.getType())) {
try {
LanguageEnum lang = LanguageEnum.fromValue(description.getLanguage().getShortCode());
内容来源于网络,如有侵权,请联系作者删除!