Changeset 5730


Ignore:
Timestamp:
10/17/14 09:33:48 (10 years ago)
Author:
Twan Goosen
Message:

Merged Oliver's fixes from trunk to 1.0 branch (tested and working locally)

Location:
VirtualCollectionRegistry/branches/VirtualCollectionRegistry-1.0
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • VirtualCollectionRegistry/branches/VirtualCollectionRegistry-1.0

  • VirtualCollectionRegistry/branches/VirtualCollectionRegistry-1.0/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/model/VirtualCollection.java

    r5494 r5730  
    152152    private String reproducibilityNotice;
    153153
    154     @ElementCollection
     154    @ElementCollection(fetch = FetchType.EAGER)
    155155    @CollectionTable(name = "keyword",
    156156                     joinColumns = @JoinColumn(name="vc_id"))
  • VirtualCollectionRegistry/branches/VirtualCollectionRegistry-1.0/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/oai/VirtualColletionRegistryOAIRepository.java

    r5427 r5730  
    1717import eu.clarin.cmdi.virtualcollectionregistry.model.VirtualCollection_;
    1818import eu.clarin.cmdi.virtualcollectionregistry.service.VirtualCollectionCMDIWriter;
     19
    1920import java.util.ArrayList;
    2021import java.util.Date;
     
    2223import java.util.List;
    2324import java.util.Set;
     25
    2426import javax.persistence.EntityManager;
    2527import javax.persistence.LockModeType;
     
    3234import javax.xml.stream.XMLStreamException;
    3335import javax.xml.stream.XMLStreamWriter;
     36
    3437import org.slf4j.Logger;
    3538import org.slf4j.LoggerFactory;
    3639import org.springframework.beans.factory.annotation.Autowired;
    37 
     40import org.springframework.stereotype.Component;
     41
     42@Component //TODO: Check if this annotation is needed... it shouldn't be. See https://trac.clarin.eu/ticket/658
    3843public class VirtualColletionRegistryOAIRepository implements Repository {
    3944
     45    private static final Logger logger
     46            = LoggerFactory.getLogger(VirtualColletionRegistryOAIRepository.class);
     47    private VirtualCollectionRegistry registry;
    4048    @Autowired
    4149    private VirtualCollectionCMDIWriter cmdiWriter;
     
    4351    private DataStore dataStore;
    4452
    45     private static final Logger logger
    46             = LoggerFactory.getLogger(VirtualColletionRegistryOAIRepository.class);
    47 
    4853    private class CMDIMetadataFormat implements MetadataFormat {
    4954
     
    7782    } // class CMDIMetadataFormat
    7883
    79     private final VirtualCollectionRegistry registry;
    80 
    8184    @Autowired
    8285    VirtualColletionRegistryOAIRepository(VirtualCollectionRegistry registry) {
     86        if (registry == null) {
     87            throw new NullPointerException("internal error: registry == null");
     88        }
    8389        this.registry = registry;
     90        logger.info("VirtualColletionRegistryOAIRepository (hash {}) has been constructed with VCR (hash {})", hashCode(), registry.hashCode());
    8491    }
    8592
Note: See TracChangeset for help on using the changeset viewer.