Get the Server

One way to use the e!DAL Server is to resolve automatically the e!DAL dependencies or download the fat jar, which include the e!DAL-MetaData-API server and all dependent 3rd party libraries.

  • add the bellow Apache Maven dependency to your project

    <project>
    ...
    <!-- define the e!DAL dependencies -->
    <dependencies>
    	<!-- the e!DAL RMI server --> 
    	<dependency>
    		<groupId>de.ipk-gatersleben</groupId>
    		<artifactId>eDAL-MetaDataAPI-Server</artifactId>
    		<version>2.5.0</version>
    	</dependency>
    ...
    <dependencies>
    ...
    </project>
    
  • download latest version (jar-with-dependencies) from Maven central repository

Start Server as API call

To start an e!DAL server the EdalServer class provide a static method startServer().

public static void main(String [] args){
	
	/* construct a default EdalConfiguration*/
	EdalConfiguration configuration = new EdalConfiguration("dataCiteUserName", "dataCitePassword", "dataCitePrefix", 
									new InternetAddress("scientificReviever@mail.de"), 
									new InternetAddress("substituteReviever@mail.de"),
									new InternetAddress("managingReviever@mail.de"), 
									new InternetAddress("root@mail.de"));
	
	/** 
	 * startup server using parameter from EdalConfiguration and data/registry TCP port, flag to clean existing mount point
	 * or re-mount, and flag to activate/deactivate RMI logger
	 */
		
	EdalServer.startServer(configuration, EdalServer.DEFAULT_REGISTRY_PORT, EdalServer.DEFAULT_DATA_PORT, false, true);
}

To start an e!DAL server with a more complex server configuration you can set additional parameters:

public static void main(String [] args){
	
	/* construct a default EdalConfiguration*/
	EdalConfiguration configuration = new EdalConfiguration("dataCiteUserName", "dataCitePassword", "dataCitePrefix", 
									new InternetAddress("scientificReviever@mail.de"), 
									new InternetAddress("substituteReviever@mail.de"),
									new InternetAddress("managingReviever@mail.de"), 
									new InternetAddress("root@mail.de"));
	
	
	/* set specific string for generating DOIs, instead of using the default abbreviation of the data centre */
	configuration.setDoiInfix("DPPN");
	
	/* e.g. if you are using 'iptables' for re-directing through a firewall one can set a static server address and port 
	 * for the HTTP Server, instead of using the automatically extracted server host name and port	
	 */ 
	configuration.setStaticServerAdress("www.myserver-address.de");
	configuration.setStaticServerPort(8085);
		
	/* startup server using the created EdalConfiguration */
	EdalServer.startServer(configuration, EdalServer.DEFAULT_REGISTRY_PORT, EdalServer.DEFAULT_DATA_PORT, false, true);
}