Changes between Version 12 and Version 13 of VirtualCollectionRegistry


Ignore:
Timestamp:
08/25/14 15:34:26 (10 years ago)
Author:
Twan Goosen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VirtualCollectionRegistry

    v12 v13  
    5858The core of the VCR is the '''collection store''', which is implemented through JPA with annotated classes in the ''eu.clarin.cmdi.virtualcollectionregistry.model'' package. The [source:/VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/resources/META-INF/persistence.xml persistence.xml] file configures the Hibernate Persistence Provider to use a MySQL datasource for storage. The 'update' value of the ''hibernate.hbm2ddl.auto'' property instructs Hibernate to update the database schema at runtime if needed. A singleton object of the ''!DataStore'' class provides access to the JPA Entity Manager.
    5959
    60 The ''!DataStore'' is primarily used in the '''service''' implemented by the ''!VirtualCollectionRegistry'' class, which provides high level CRUD methods, using the ''!VirtualCollection'' model class for the representation of individual collections. It also calls the configured PID service to register and link a persistent '''identifier''' upon publication of a collection. These methods are used by the REST service, OAI provider and Wicket application classes to access and manipulate the stored collections.
     60The ''!DataStore'' is primarily used in the '''service''' implemented by the ''!VirtualCollectionRegistry'' class, which provides high level CRUD methods, using the ''!VirtualCollection'' model class for the representation of individual collections. It also calls the configured PID service to register and link a '''persistent identifier''' upon publication of a collection. These methods are used by the REST service, OAI provider and Wicket application classes to access and manipulate the stored collections.
    6161
    6262The '''Spring framework''' is used to define '''beans''' for singleton service objects, which are injected into various components throughout the application. The [source:/VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/webapp/WEB-INF/applicationContext.xml applicationContext.xml] file bootstraps the bean definition, while most beans are discovered en constructed by means of 'component scanning'. For example, a singleton bean for ''!DataStore'' exists because it is annotated ''@Repository''. The instance is made available in the ''!VirtualCollectionRegistry'' and ''Application'' (for the Wicket UI) instances because both are managed by Spring too (annotated with ''@Service'' and ''@Component'' respectively) and contain a ''!DataStore'' field annotated with ''@Autowired''.