Project

General

Profile

« Previous | Next » 

Revision 5215f59f

Added by Andreas Müller over 7 years ago

ref #3658 remove nomenclatural code from datasources

View differences:

eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/source/CdmRemoteSourceBase.java
15 15
import eu.etaxonomy.cdm.config.CdmSource;
16 16
import eu.etaxonomy.cdm.config.CdmSourceException;
17 17
import eu.etaxonomy.cdm.model.metadata.CdmMetaData.MetaDataPropertyName;
18
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
19 18

  
20 19
/**
21 20
 * Base class representing a CDM remote source.
......
29 28
	protected static final String DEFAULT_SERVER = "127.0.0.1";
30 29
	protected static final int DEFAULT_PORT = 8080;
31 30
	protected static final String DEFAULT_CONTEXT_PATH = "";
32
	protected static final NomenclaturalCode DEFAULT_NOMENCLATURAL_CODE = NomenclaturalCode.ICNAFP;
33 31
	private String contextPath;
34 32
	private String baseUrl;
35 33

  
......
44 42
		setServer(DEFAULT_SERVER);
45 43
		setPort(DEFAULT_PORT);
46 44
		setContextPath(DEFAULT_CONTEXT_PATH);
47
		setNomenclaturalCode(DEFAULT_NOMENCLATURAL_CODE);
48 45
	}
49 46

  
50 47
	/**
......
56 53
	 * @param contextPath
57 54
	 * @param nomenclaturalCode
58 55
	 */
59
	public CdmRemoteSourceBase(String name, String server, int port, String contextPath, NomenclaturalCode nomenclaturalCode) {
56
	public CdmRemoteSourceBase(String name, String server, int port, String contextPath) {
60 57
		setName(name);
61 58
		setServer(server);
62 59
		setPort(port);
63 60
		setContextPath(contextPath);
64
		setNomenclaturalCode(nomenclaturalCode);
65 61
		metadataService = CdmApplicationRemoteConfiguration.getMetadataService(this);
66 62
	}
67 63

  
68

  
69
	/* (non-Javadoc)
70
	 * @see eu.etaxonomy.cdm.remote.ICdmRemoteSource#getBaseUrl()
71
	 */
72 64
	@Override
73 65
	public String getBaseUrl() {
74 66
		return baseUrl;
......
86 78
		this.baseUrl = baseUrl;
87 79
	}
88 80

  
89
	/* (non-Javadoc)
90
	 * @see eu.etaxonomy.cdm.remote.ICdmRemoteSource#getContextPath()
91
	 */
92 81
	@Override
93 82
	public String getContextPath() {
94 83
		return contextPath;
......
105 94
		this.contextPath = contextPath;
106 95
	}
107 96

  
108
	/* (non-Javadoc)
109
	 * @see eu.etaxonomy.cdm.config.CdmSource#getDbSchemaVersion()
110
	 */
111 97
	@Override
112 98
	public String getDbSchemaVersion() throws CdmSourceException {
113 99
		return metadataService.getDbSchemaVersion();
114 100

  
115 101
	}
116 102

  
117
	/* (non-Javadoc)
118
	 * @see eu.etaxonomy.cdm.config.CdmSource#isDbEmpty()
119
	 */
120 103
	@Override
121 104
	public boolean isDbEmpty() throws CdmSourceException {
122 105
		return metadataService.isDbEmpty();
123 106

  
124 107
	}
125 108

  
126
	/* (non-Javadoc)
127
	 * @see eu.etaxonomy.cdm.config.CdmSource#checkConnection()
128
	 */
129 109
	@Override
130 110
	public boolean checkConnection() throws CdmSourceException {
131 111
		// assuming that database service works implies
......
138 118
		return true;
139 119
	}
140 120

  
141
	/* (non-Javadoc)
142
	 * @see eu.etaxonomy.cdm.config.CdmSource#getConnectionMessage()
143
	 */
144 121
	@Override
145 122
	public String getConnectionMessage() {
146 123
		return "Connecting to Remote CDM Instance " + getName() + ":" + getPort() + "/" + getContextPath();
......
152 129
		return metadataService.getCdmMetadataMap();
153 130
	}
154 131

  
155

  
156 132
}

Also available in: Unified diff