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