3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.api
.service
;
14 import org
.springframework
.beans
.factory
.annotation
.Autowired
;
15 import org
.springframework
.stereotype
.Service
;
16 import org
.springframework
.transaction
.annotation
.Transactional
;
18 import eu
.etaxonomy
.cdm
.config
.CdmSourceException
;
19 import eu
.etaxonomy
.cdm
.model
.metadata
.CdmMetaData
.MetaDataPropertyName
;
22 * Provides metadata information corresponding ti the underlying CDM Datasource.
29 @Transactional(readOnly
= true)
30 public class MetadataServiceImpl
implements IMetadataService
{
33 private IDatabaseService databaseService
;
36 public void setDatabaseService(IDatabaseService databaseService
) {
37 this.databaseService
= databaseService
;
44 public String
getDbSchemaVersion() throws CdmSourceException
{
45 return databaseService
.getDbSchemaVersion();
53 public boolean isDbEmpty() throws CdmSourceException
{
54 return databaseService
.isDbEmpty();
61 public Map
<MetaDataPropertyName
, String
> getCdmMetadataMap() throws CdmSourceException
{
62 return databaseService
.getCdmMetadataMap();