|
|
|
@ -20,23 +20,19 @@ import org.gcube.data.transfer.model.Destination;
|
|
|
|
|
import org.gcube.data.transfer.model.DestinationClashPolicy;
|
|
|
|
|
import org.gcube.data.transfer.model.PluginInvocation;
|
|
|
|
|
import org.gcube.data.transfer.plugins.thredds.sis.SISPluginFactory;
|
|
|
|
|
import org.gcube.smartgears.Constants;
|
|
|
|
|
import org.gcube.spatial.data.clients.model.engine.Engine;
|
|
|
|
|
import org.gcube.spatial.data.sdi.interfaces.Metadata;
|
|
|
|
|
import org.gcube.spatial.data.sdi.model.faults.RemoteException;
|
|
|
|
|
import org.gcube.spatial.data.sdi.plugins.SDIAbstractPlugin;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class PublishTest {
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) throws MalformedURLException, RemoteException, InvalidSourceException, SourceNotSetException, FailedTransferException, InitializationException, InvalidDestinationException, DestinationNotSetException {
|
|
|
|
|
public static void main(String[] args) throws MalformedURLException, Exception, InvalidSourceException, SourceNotSetException, FailedTransferException, InitializationException, InvalidDestinationException, DestinationNotSetException {
|
|
|
|
|
|
|
|
|
|
TokenSetter.set("/pred4s/preprod/preVRE");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String hostname=
|
|
|
|
|
new URL(SDIAbstractPlugin.management().build().getConfiguration().getByEngine(Engine.TH_ENGINE).get(0).getBaseEndpoint()).getHost();
|
|
|
|
|
String hostname="";
|
|
|
|
|
// Not yet released sdi refactoring
|
|
|
|
|
// new URL(SDIAbstractPlugin.management().build().getConfiguration().getByEngine(Engine.TH_ENGINE).get(0).getBaseEndpoint()).getHost();
|
|
|
|
|
|
|
|
|
|
DataTransferClient client=DataTransferClient.getInstanceByEndpoint("https://"+hostname);
|
|
|
|
|
|
|
|
|
|