本文整理了Java中pl.edu.icm.model.bwmeta.y.YClassification
类的一些代码示例,展示了YClassification
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YClassification
类的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YClassification
类名称:YClassification
暂无
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
public String resolveName(Locale inLocale, YClassification classification){
YLanguage yLanguage = languagesInfoFactory.getLocaleLanguage(inLocale, YLanguage.Undetermined);
String nameText = findNameInLanguage(classification.getNames(), yLanguage);
if(StringUtils.isBlank(nameText)){
return getNameTextFrom(classification.getDefaultName(), classification.getId());
} else {
return nameText;
}
}
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
YClassification classification1 = new YClassification();
classification1.setId(CLASSIFICATION1_ID);
classification1.addName(new YName("Universal Decimal Classification System"));
addYClassification(classification1);
代码示例来源:origin: pl.edu.icm.yadda/yaddaweb-lite-core
YClassification c = categoryService
.fetchYClassification(cl);
Classification cClas = new Classification(c.getDefaultName()
.getText());
List<Category> lc = new ArrayList<Category>();
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
public List<CategoryInfo> getAllCategories() throws RepositoryException {
try {
List<CategoryInfo> all = new ArrayList<>();
List<YClassification> classifications = getAllClassification();
for(YClassification clss: classifications){
List<CategoryInfo> categoryInfos = getAllCategoriesFor(clss.getId());
all.addAll(categoryInfos);
}
return all;
} catch (ServiceException | ModelDataSourceException e ) {
logger.warn("can't get categories ", e);
throw new RepositoryException("can't get categories");
}
}
代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core
public Map<String, String> getAllCategories(final Locale inLocale) throws RepositoryException {
try {
final Map<String, String> viewCategoriesMap = Maps.newTreeMap();
viewCategoriesMap.put(CS.EMPTY_STR, CS.DASHES);
String classification = null;
try {
classification = configurationService.getParameter("editor/restrictClassification");
} catch (final ConfigurationServiceException e) {
logger.error("Error when getting parameter from configuration service: {}", e);
}
final List<YClassification> classifications = service.getAllClassification();
for (final YClassification clss : classifications) {
if (classification == null || classification.equals(clss.getId())) {
final String clssName = nameResolver.resolveName(inLocale, clss);
final List<CategoryInfo> categoryInfos = service.getAllCategoriesFor(clss.getId());
for (final CategoryInfo info : categoryInfos) {
final CategoryViewItem item = categoriesViewMapper.prepareCategoriesViewEntry(info, clssName);
viewCategoriesMap.put(item.getKey(), item.getName());
}
}
}
return viewCategoriesMap;
} catch (ServiceException | ModelDataSourceException e) {
logger.warn("can't get categories ", e);
throw new RepositoryException("can't get categories");
}
}
内容来源于网络,如有侵权,请联系作者删除!