X-Git-Url: https://dev.e-taxonomy.eu/gitweb/cdmlib.git/blobdiff_plain/34f1f4e4c4bbf1844769df18e0879bcb5560fb6d..f8b73f93a26ee9ac99bd64a45f89271001eb7222:/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/VocabularyServiceImpl.java?ds=sidebyside diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/VocabularyServiceImpl.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/VocabularyServiceImpl.java index 3a278b2080..4e07788574 100644 --- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/VocabularyServiceImpl.java +++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/VocabularyServiceImpl.java @@ -6,7 +6,6 @@ * The contents of this file are subject to the Mozilla Public License Version 1.1 * See LICENSE.TXT at the top of this package for the full license terms. */ - package eu.etaxonomy.cdm.api.service; import java.util.ArrayList; @@ -23,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional; import eu.etaxonomy.cdm.api.service.pager.Pager; import eu.etaxonomy.cdm.api.service.pager.impl.DefaultPagerImpl; import eu.etaxonomy.cdm.common.monitor.IProgressMonitor; +import eu.etaxonomy.cdm.model.common.CdmClass; import eu.etaxonomy.cdm.model.common.Language; import eu.etaxonomy.cdm.model.term.DefinedTermBase; import eu.etaxonomy.cdm.model.term.TermType; @@ -47,7 +47,6 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase clazz, Integer stepSize, IIdentifiableEntityCacheStrategy cacheStrategy, IProgressMonitor monitor) { @@ -57,7 +56,6 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase listByTermType(TermType termType, boolean includeSubTypes, Integer limit, Integer start, List orderHints, List propertyPaths) { @@ -116,13 +114,14 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase getCompleteTermHierarchy(TermVocabularyDto vocabularyDto) { - Collection topLevelTerms = dao.getTopLevelTerms(vocabularyDto.getUuid(), vocabularyDto.getTermType()); + public List getCompleteTermHierarchy(TermVocabularyDto vocabularyDto) { + List topLevelTerms = dao.getTopLevelTerms(vocabularyDto.getUuid(), vocabularyDto.getTermType()); for (TermDto termDto : topLevelTerms) { termDto.setVocabularyDto(vocabularyDto); initializeIncludes(termDto); initializeGeneralizationOf(termDto); } + return topLevelTerms; } @@ -171,6 +170,11 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase findFeatureVocabularyDtoByTermTypes(Set availableFor) { + return dao.findVocabularyDtoByAvailableFor(availableFor); + } + @Override public TermVocabularyDto findVocabularyDtoByVocabularyUuid(UUID vocUuid) { return dao.findVocabularyDtoByUuid(vocUuid); @@ -179,7 +183,7 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase term = termType.getEmptyDefinedTermBase(); termService.save(term); TermVocabulary vocabulary = dao.load(vocabularyUUID); vocabulary.addTerm(term); @@ -193,7 +197,6 @@ public class VocabularyServiceImpl extends IdentifiableServiceBase findVocabularyDtoByVocabularyUuids(List vocUuids) { return dao.findVocabularyDtoByUuids(vocUuids);