@Service @Transactional(readOnly=true) public class VocabularyServiceImpl extends IdentifiableServiceBase<TermVocabulary,ITermVocabularyDao> implements IVocabularyService
logger, UPDATE_TITLE_CACHE_DEFAULT_STEP_SIZE
commonService
appContext, dao, INCLUDE_UNPUBLISHED, NO_UNPUBLISHED
Constructor and Description |
---|
VocabularyServiceImpl() |
Modifier and Type | Method and Description |
---|---|
TermDto |
addNewTerm(TermType termType,
java.util.UUID vocabularyUUID)
Creates a new term as a direct child of the given vocabulary.
|
<T extends DefinedTermBase> |
findByTermType(TermType termType,
java.util.List<java.lang.String> propertyPaths)
Returns a list of term vocabularies corresponding to a term type
|
java.util.List<TermVocabularyDto> |
findVocabularyDtoByTermType(TermType termType)
Returns term vocabularies that contain terms of a certain
TermType e.g. |
java.util.List<TermVocabularyDto> |
findVocabularyDtoByTermType(TermType termType,
boolean includeSubtypes)
Returns term vocabularies that contain terms of a certain
TermType e.g. |
java.util.List<TermVocabularyDto> |
findVocabularyDtoByTermTypeAndPattern(java.lang.String pattern,
TermType termType) |
java.util.List<TermVocabularyDto> |
findVocabularyDtoByTermTypes(java.util.Set<TermType> termTypes)
Returns term vocabularies that contain terms of the given types
TermType e.g. |
java.util.List<TermVocabularyDto> |
findVocabularyDtoByTermTypes(java.util.Set<TermType> termTypes,
boolean includeSubtypes)
Returns term vocabularies that contain terms of the given types
TermType e.g. |
TermVocabularyDto |
findVocabularyDtoByVocabularyUuid(java.util.UUID vocUuid) |
java.util.List<TermVocabularyDto> |
findVocabularyDtoByVocabularyUuids(java.util.List<java.util.UUID> vocUuids) |
java.util.Collection<TermDto> |
getCompleteTermHierarchy(TermVocabularyDto vocabularyDto)
Initializes the complete term hierarchy consisting of
TermDto s
for the given vocabulary |
TermVocabulary<Language> |
getLanguageVocabulary()
(non-Javadoc)
|
java.util.Collection<TermDto> |
getNamedAreaTerms(java.util.List<java.util.UUID> vocabularyUuids)
Loads all namedArea term dtos with level informations for the given vocabularies
|
java.util.Collection<TermDto> |
getTerms(java.util.List<java.util.UUID> vocabularyUuids)
Loads all terms for the given vocabularies
|
Pager<DefinedTermBase> |
getTerms(TermVocabulary vocabulary,
java.lang.Integer pageSize,
java.lang.Integer pageNumber,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns a list of terms belonging to the vocabulary passed as an argument
|
java.util.Collection<TermDto> |
getTerms(java.util.UUID vocabularyUuid)
Loads all terms for the given vocabulary
|
java.util.Collection<TermDto> |
getTopLevelTerms(java.util.UUID vocabularyUuid)
Loads all top level terms, i.e.
|
<S extends TermVocabulary> |
getUuidAndTitleCache(java.lang.Class<S> clazz,
TermType termType,
java.lang.Integer limit,
java.lang.String pattern)
Like
IIdentifiableEntityService.getUuidAndTitleCache(Class, Integer, String) but filtering
the results by TermType of the vocabularies. |
java.util.List<TermVocabulary> |
listByTermType(TermType termType,
boolean includeSubTypes,
java.lang.Integer limit,
java.lang.Integer start,
java.util.List<OrderHint> orderHints,
java.util.List<java.lang.String> propertyPaths)
Returns term vocabularies that contain terms of a certain
TermType e.g. |
protected void |
setDao(ITermVocabularyDao dao) |
UpdateResult |
updateCaches(java.lang.Class<? extends TermVocabulary> clazz,
java.lang.Integer stepSize,
IIdentifiableEntityCacheStrategy<TermVocabulary> cacheStrategy,
IProgressMonitor monitor)
(Re-)generate the caches for all objects of this concrete IdentifiableEntity class
|
countByTitle, countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, search, switchOfAutoinitializer, switchOnOldAutoInitializer, updateCaches, updateCachesImpl
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, pageAuditEvents, pageAuditEvents
checkPublished, clear, count, delete, delete, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, setApplicationContext, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countByTitle, countByTitle, countByTitleWithRestrictions, deduplicate, find, findByIdentifier, findByMarker, findByTitle, findByTitle, findByTitleWithRestrictions, findTitleCache, findUuidAndTitleCacheByMarker, getRights, getSourcedObjectByIdInSource, getSources, getTitleCache, getUuidAndTitleCache, getUuidAndTitleCache, listByIdentifier, listByReferenceTitle, listByReferenceTitleWithRestrictions, listByTitle, listByTitleWithRestrictions, replace, search, updateCaches
countMarkers, getAnnotations, getMarkers, groupMarkers
getNextAuditEvent, getPreviousAuditEvent, isDeletable, pageAuditEvents, pageAuditEvents
clear, count, delete, delete, delete, exists, find, find, find, find, findById, findWithoutFlush, getSession, group, list, list, load, load, load, load, loadByIds, loadByIds, loadWithUpdate, lock, merge, merge, merge, merge, page, page, page, pageByParamWithRestrictions, refresh, refresh, save, save, saveOrUpdate, saveOrUpdate, update
@Autowired protected void setDao(ITermVocabularyDao dao)
setDao
in class ServiceBase<TermVocabulary,ITermVocabularyDao>
@Transactional(readOnly=false) public UpdateResult updateCaches(java.lang.Class<? extends TermVocabulary> clazz, java.lang.Integer stepSize, IIdentifiableEntityCacheStrategy<TermVocabulary> cacheStrategy, IProgressMonitor monitor)
IIdentifiableEntityService
updateCaches
in interface IIdentifiableEntityService<TermVocabulary>
clazz
- class of objects to be updatedstepSize
- number of objects loaded per step. If null
use default.cacheStrategy
- cache strategy used for cache generation. If null
use default.monitor
- progress monitor. If null
use default.public java.util.List<TermVocabulary> listByTermType(TermType termType, boolean includeSubTypes, java.lang.Integer limit, java.lang.Integer start, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IVocabularyService
TermType
e.g. Feature, Modifier, State.listByTermType
in interface IVocabularyService
termType
- the TermType
of the terms in the vocabulary and of the vocabularyincludeSubTypes
- if true
all subtypes will be included for computation of the resultlimit
- The maximum number of vocabularies returned (can be null for all vocabularies)start
- The offset from the start of the result set (0 - based, can be null - equivalent of starting at the beginning of the recordset)orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths
- properties to be initializedpublic <T extends DefinedTermBase> java.util.List<TermVocabulary<T>> findByTermType(TermType termType, java.util.List<java.lang.String> propertyPaths)
IVocabularyService
findByTermType
in interface IVocabularyService
termType
- The term type for which the list of vocabularies is desiredpublic TermVocabulary<Language> getLanguageVocabulary()
getLanguageVocabulary
in interface IVocabularyService
FIXME candidate for harmonization
is this the same as getVocabulary(VocabularyEnum.Language)
public Pager<DefinedTermBase> getTerms(TermVocabulary vocabulary, java.lang.Integer pageSize, java.lang.Integer pageNumber, java.util.List<OrderHint> orderHints, java.util.List<java.lang.String> propertyPaths)
IVocabularyService
getTerms
in interface IVocabularyService
vocabulary
- The vocabulary for which the list of terms is desiredpageSize
- The maximum number of terms returned (can be null for all terms in the vocabulary)pageNumber
- The offset from the start of the result set (0 - based, can be null - equivalent of starting at the beginning of the recordset)orderHints
- Supports path like orderHints.propertyNames
which
include *-to-one properties like createdBy.username or
authorTeam.persistentTitleCachepropertyPaths
- properties to be initializedpublic java.util.Collection<TermDto> getTopLevelTerms(java.util.UUID vocabularyUuid)
IVocabularyService
getTopLevelTerms
in interface IVocabularyService
vocabularyUuid
- the uuid of the vocabularypublic java.util.Collection<TermDto> getTerms(java.util.UUID vocabularyUuid)
IVocabularyService
getTerms
in interface IVocabularyService
vocabularyUuid
- the id of the vocabularypublic java.util.Collection<TermDto> getTerms(java.util.List<java.util.UUID> vocabularyUuids)
IVocabularyService
getTerms
in interface IVocabularyService
vocabularyUuids
- the ids of the vocabulariespublic java.util.Collection<TermDto> getNamedAreaTerms(java.util.List<java.util.UUID> vocabularyUuids)
IVocabularyService
getNamedAreaTerms
in interface IVocabularyService
vocabularyUuids
- the ids of the vocabulariespublic java.util.Collection<TermDto> getCompleteTermHierarchy(TermVocabularyDto vocabularyDto)
IVocabularyService
TermDto
s
for the given vocabularygetCompleteTermHierarchy
in interface IVocabularyService
vocabularyDto
- the dto of the term vocabularypublic java.util.List<TermVocabularyDto> findVocabularyDtoByTermType(TermType termType)
IVocabularyService
TermType
e.g. Feature, Modifier, State.findVocabularyDtoByTermType
in interface IVocabularyService
termType
- the TermType
of the terms in the vocabulary and of the vocabularypublic java.util.List<TermVocabularyDto> findVocabularyDtoByTermTypeAndPattern(java.lang.String pattern, TermType termType)
findVocabularyDtoByTermTypeAndPattern
in interface IVocabularyService
public java.util.List<TermVocabularyDto> findVocabularyDtoByTermTypes(java.util.Set<TermType> termTypes)
IVocabularyService
TermType
e.g. Feature, Modifier, State.findVocabularyDtoByTermTypes
in interface IVocabularyService
termTypes
- a set of TermType
s of the terms in the vocabulary and of the vocabularypublic java.util.List<TermVocabularyDto> findVocabularyDtoByTermType(TermType termType, boolean includeSubtypes)
IVocabularyService
TermType
e.g. Feature, Modifier, State.findVocabularyDtoByTermType
in interface IVocabularyService
termType
- the TermType
of the terms in the vocabulary and of the vocabularyincludeSubtypes
- if true
also vocabularies with subtypes of the given type
will be returnedpublic java.util.List<TermVocabularyDto> findVocabularyDtoByTermTypes(java.util.Set<TermType> termTypes, boolean includeSubtypes)
IVocabularyService
TermType
e.g. Feature, Modifier, State.findVocabularyDtoByTermTypes
in interface IVocabularyService
termTypes
- a set of TermType
s of the terms in the vocabulary and of the vocabularyincludeSubtypes
- if true
also vocabularies with subtypes of the given type
will be returnedpublic TermVocabularyDto findVocabularyDtoByVocabularyUuid(java.util.UUID vocUuid)
findVocabularyDtoByVocabularyUuid
in interface IVocabularyService
@Transactional(readOnly=false) public TermDto addNewTerm(TermType termType, java.util.UUID vocabularyUUID)
IVocabularyService
addNewTerm
in interface IVocabularyService
termType
- the TermType
of the term to createvocabularyUUID
- the UUID
of the vocabulary
kindOf relation. Otherwise it will added via a partOf relationpublic <S extends TermVocabulary> java.util.List<UuidAndTitleCache<S>> getUuidAndTitleCache(java.lang.Class<S> clazz, TermType termType, java.lang.Integer limit, java.lang.String pattern)
IVocabularyService
IIdentifiableEntityService.getUuidAndTitleCache(Class, Integer, String)
but filtering
the results by TermType
of the vocabularies.getUuidAndTitleCache
in interface IVocabularyService
clazz
- the (sub)classtermType
- the TermType
of the vocabularies to be retrievedlimit
- max number of resultspattern
- search patternUuidAndTitleCache
#getUuidAndTitleCache(Class, Integer, String))
public java.util.List<TermVocabularyDto> findVocabularyDtoByVocabularyUuids(java.util.List<java.util.UUID> vocUuids)
findVocabularyDtoByVocabularyUuids
in interface IVocabularyService
Copyright © 2007-2020 EDIT. All Rights Reserved.