java.lang.Object
de.digitalcollections.cudami.server.business.impl.service.UniqueObjectServiceImpl<de.digitalcollections.model.semantic.Headword,HeadwordRepository>
de.digitalcollections.cudami.server.business.impl.service.semantic.HeadwordServiceImpl
All Implemented Interfaces:
HeadwordService, UniqueObjectService<de.digitalcollections.model.semantic.Headword>

@Service public class HeadwordServiceImpl extends UniqueObjectServiceImpl<de.digitalcollections.model.semantic.Headword,HeadwordRepository> implements HeadwordService
  • Field Summary

    Fields inherited from class de.digitalcollections.cudami.server.business.impl.service.UniqueObjectServiceImpl

    repository
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addRelatedEntity(de.digitalcollections.model.semantic.Headword headword, de.digitalcollections.model.identifiable.entity.Entity entity)
     
    void
    addRelatedFileresource(de.digitalcollections.model.semantic.Headword headword, de.digitalcollections.model.identifiable.resource.FileResource fileResource)
     
    de.digitalcollections.model.list.buckets.BucketObjectsResponse<de.digitalcollections.model.semantic.Headword>
    find(de.digitalcollections.model.list.buckets.BucketObjectsRequest<de.digitalcollections.model.semantic.Headword> bucketObjectsRequest)
     
    de.digitalcollections.model.list.buckets.BucketsResponse<de.digitalcollections.model.semantic.Headword>
    find(de.digitalcollections.model.list.buckets.BucketsRequest<de.digitalcollections.model.semantic.Headword> bucketsRequest)
     
    de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.semantic.Headword>
    findByLanguageAndInitial(de.digitalcollections.model.list.paging.PageRequest pageRequest, String language, String initial)
     
    de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity>
    findRelatedEntities(de.digitalcollections.model.semantic.Headword headword, de.digitalcollections.model.list.paging.PageRequest pageRequest)
     
    de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource>
    findRelatedFileResources(de.digitalcollections.model.semantic.Headword headword, de.digitalcollections.model.list.paging.PageRequest pageRequest)
     
    List<de.digitalcollections.model.semantic.Headword>
     
     
    List<de.digitalcollections.model.identifiable.entity.Entity>
    getRelatedEntities(de.digitalcollections.model.semantic.Headword headword)
     
    List<de.digitalcollections.model.identifiable.resource.FileResource>
    getRelatedFileResources(de.digitalcollections.model.semantic.Headword headword)
     
    protected void
    setDefaultSorting(de.digitalcollections.model.list.paging.PageRequest pageRequest)
     
    List<de.digitalcollections.model.identifiable.entity.Entity>
    setRelatedEntities(de.digitalcollections.model.semantic.Headword headword, List<de.digitalcollections.model.identifiable.entity.Entity> entities)
    Save list of entities related to an Headword.
    List<de.digitalcollections.model.identifiable.resource.FileResource>
    setRelatedFileResources(de.digitalcollections.model.semantic.Headword headword, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources)
    Save list of file resources related to an Headword.

    Methods inherited from class de.digitalcollections.cudami.server.business.impl.service.UniqueObjectServiceImpl

    count, create, delete, delete, find, getAll, getByExample, getByExampleAndFiltering, getRandom, save, update

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.semantic.HeadwordService

    getRandom

    Methods inherited from interface de.digitalcollections.cudami.server.business.api.service.UniqueObjectService

    count, create, delete, delete, find, getAll, getByExample, getByExampleAndFiltering, getByExampleAndLocale, save, update
  • Constructor Details

  • Method Details

    • addRelatedEntity

      public void addRelatedEntity(de.digitalcollections.model.semantic.Headword headword, de.digitalcollections.model.identifiable.entity.Entity entity) throws ServiceException
      Specified by:
      addRelatedEntity in interface HeadwordService
      Throws:
      ServiceException
    • addRelatedFileresource

      public void addRelatedFileresource(de.digitalcollections.model.semantic.Headword headword, de.digitalcollections.model.identifiable.resource.FileResource fileResource) throws ServiceException
      Specified by:
      addRelatedFileresource in interface HeadwordService
      Throws:
      ServiceException
    • find

      public de.digitalcollections.model.list.buckets.BucketObjectsResponse<de.digitalcollections.model.semantic.Headword> find(de.digitalcollections.model.list.buckets.BucketObjectsRequest<de.digitalcollections.model.semantic.Headword> bucketObjectsRequest) throws ServiceException
      Specified by:
      find in interface HeadwordService
      Throws:
      ServiceException
    • find

      public de.digitalcollections.model.list.buckets.BucketsResponse<de.digitalcollections.model.semantic.Headword> find(de.digitalcollections.model.list.buckets.BucketsRequest<de.digitalcollections.model.semantic.Headword> bucketsRequest) throws ServiceException
      Specified by:
      find in interface HeadwordService
      Throws:
      ServiceException
    • findByLanguageAndInitial

      public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.semantic.Headword> findByLanguageAndInitial(de.digitalcollections.model.list.paging.PageRequest pageRequest, String language, String initial) throws ServiceException
      Specified by:
      findByLanguageAndInitial in interface HeadwordService
      Throws:
      ServiceException
    • findRelatedEntities

      public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.entity.Entity> findRelatedEntities(de.digitalcollections.model.semantic.Headword headword, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException
      Specified by:
      findRelatedEntities in interface HeadwordService
      Throws:
      ServiceException
    • findRelatedFileResources

      public de.digitalcollections.model.list.paging.PageResponse<de.digitalcollections.model.identifiable.resource.FileResource> findRelatedFileResources(de.digitalcollections.model.semantic.Headword headword, de.digitalcollections.model.list.paging.PageRequest pageRequest) throws ServiceException
      Specified by:
      findRelatedFileResources in interface HeadwordService
      Throws:
      ServiceException
    • getByLabelAndLocale

      public List<de.digitalcollections.model.semantic.Headword> getByLabelAndLocale(String label, Locale locale) throws ServiceException
      Specified by:
      getByLabelAndLocale in interface HeadwordService
      Throws:
      ServiceException
    • getLanguages

      public List<Locale> getLanguages() throws ServiceException
      Specified by:
      getLanguages in interface HeadwordService
      Throws:
      ServiceException
    • getRelatedEntities

      public List<de.digitalcollections.model.identifiable.entity.Entity> getRelatedEntities(de.digitalcollections.model.semantic.Headword headword) throws ServiceException
      Specified by:
      getRelatedEntities in interface HeadwordService
      Throws:
      ServiceException
    • getRelatedFileResources

      public List<de.digitalcollections.model.identifiable.resource.FileResource> getRelatedFileResources(de.digitalcollections.model.semantic.Headword headword) throws ServiceException
      Specified by:
      getRelatedFileResources in interface HeadwordService
      Throws:
      ServiceException
    • setDefaultSorting

      protected void setDefaultSorting(de.digitalcollections.model.list.paging.PageRequest pageRequest)
      Overrides:
      setDefaultSorting in class UniqueObjectServiceImpl<de.digitalcollections.model.semantic.Headword,HeadwordRepository>
    • setRelatedEntities

      public List<de.digitalcollections.model.identifiable.entity.Entity> setRelatedEntities(de.digitalcollections.model.semantic.Headword headword, List<de.digitalcollections.model.identifiable.entity.Entity> entities) throws ServiceException
      Description copied from interface: HeadwordService
      Save list of entities related to an Headword. Prerequisite: entities have been saved before (exist already)
      Specified by:
      setRelatedEntities in interface HeadwordService
      Parameters:
      headword - headword the entities are related to
      entities - the entities that are related to the headword
      Returns:
      the list of the related entities
      Throws:
      ServiceException
    • setRelatedFileResources

      public List<de.digitalcollections.model.identifiable.resource.FileResource> setRelatedFileResources(de.digitalcollections.model.semantic.Headword headword, List<de.digitalcollections.model.identifiable.resource.FileResource> fileResources) throws ServiceException
      Description copied from interface: HeadwordService
      Save list of file resources related to an Headword. Prerequisite: file resources have been saved before (exist already)
      Specified by:
      setRelatedFileResources in interface HeadwordService
      Parameters:
      headword - headword the file resources are related to
      fileResources - the file resources that are related to the entity part
      Returns:
      the list of the related file resources
      Throws:
      ServiceException