Changeset 5488


Ignore:
Timestamp:
07/28/14 07:51:52 (10 years ago)
Author:
Twan Goosen
Message:

Added a configurable MdCollectionDisplayName? to provided CMDI's

Location:
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/README.txt

    r5459 r5488  
    11CLARIN Virtual Collection Registry
    22----------------------------------
     3
     4* DATABASE CONNECTION *
    35
    46The connection to the database is configured using JNDI using the
     
    2426  Customize $dbuser, $dbpass and $dbname to match your local settings.
    2527  NOTE: currently only MySQL is supported.
     28
     29* PID PROVIDER *
    2630
    2731  You need to choose, which persistent identifier provider you want to use.
     
    5559             override="false"/>
    5660
     61* AUTHENTICATION *
     62
     63The application has two alternative authentication configuration represented by two
     64versions of the web.xml file. The default web.xml assumes Tomcat UserDatabaseRealm,
     65which is useful for testing purposes.
     66
    5767To shibbolize this application, the following steps are required:
    5868
     
    8090block is required to make the virtual collection form submit service work
    8191with POSTs (current versions of SHHAA do not support this).
     92
     93* OAI PROVIDER *
     94
     95Collection display name:
     96
     97Add the following to the Tomcat context.xml file to set a custom collection display name
     98(MdCollectionDisplayName header element) for the CMDI representations provided by the
     99built-in OAI provider:
     100
     101<Parameter name="eu.clarin.cmdi.virtualcollectionregistry.collectiondisplayname
     102           value="CLARIN Virtual Collection Registry" />
     103
     104Change the value of the 'value' attribute if desired. If this parameter is not set,
     105the default value "CLARIN Virtual Collection Registry" will be used as a collection name.
  • VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/service/impl/VirtualCollectionCMDICreatorImpl.java

    r5463 r5488  
    3232import org.slf4j.Logger;
    3333import org.slf4j.LoggerFactory;
     34import org.springframework.beans.factory.annotation.Value;
    3435import org.springframework.stereotype.Service;
    3536
     
    4748    private final static Logger logger = LoggerFactory.getLogger(VirtualCollectionCMDICreatorImpl.class);
    4849    private final DatatypeFactory dataTypeFactory;
     50   
     51    // Collection display name value read from context.xml with a fallback value inserted by Spring
     52    @Value("${eu.clarin.cmdi.virtualcollectionregistry.collectiondisplayname:CLARIN Virtual Collection Registry}")
     53    private String collectionDisplayName;
    4954
    5055    public VirtualCollectionCMDICreatorImpl() throws DatatypeConfigurationException {
     
    9398        header.getMdCreator().add(vc.getOwner().getName());
    9499        header.setMdSelfLink(vc.getPersistentIdentifier().getURI());
     100        if (collectionDisplayName != null) {
     101            header.setMdCollectionDisplayName(collectionDisplayName);
     102        }
    95103        return header;
    96104    }
Note: See TracChangeset for help on using the changeset viewer.