refs 5870: TDM - adding new functionalities to portlets

Task-Url: https://support.d4science.org/issues/5870

Updated to support SDMX Dataset export

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@142047 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-02-02 10:25:29 +00:00
parent cf0dc3ec40
commit 49fdd7e182
1 changed files with 9 additions and 3 deletions

View File

@ -20,6 +20,8 @@ import org.sdmxsource.sdmx.api.model.beans.SdmxBeans;
import org.sdmxsource.sdmx.api.model.beans.base.AgencyBean;
import org.sdmxsource.sdmx.api.model.beans.codelist.CodelistBean;
import org.sdmxsource.sdmx.api.model.beans.datastructure.DataflowBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -28,7 +30,9 @@ import org.sdmxsource.sdmx.api.model.beans.datastructure.DataflowBean;
*
*/
public class SDMXClient {
private static Logger logger = LoggerFactory.getLogger(SDMXClient.class);
public static enum TYPE { INTERNAL, ANOTHER }
private SDMXRegistryClient client;
@ -38,15 +42,17 @@ public class SDMXClient {
public SDMXClient(){
type=TYPE.INTERNAL;
url=null;
logger.info("SDMXClient: Internal");
SDMXRegistryDescriptor descriptor = new GCubeSDMXRegistryDescriptor();
client = new FusionRegistryClient(descriptor);
client = new FusionRegistryClient(descriptor);
}
public SDMXClient(String url){
type=TYPE.ANOTHER;
this.url=url;
SDMXRegistryDescriptorImpl descriptor = new SDMXRegistryDescriptorImpl();
logger.info("SDMXClient: "+url);
SDMXRegistryDescriptorImpl descriptor = new SDMXRegistryDescriptorImpl();
descriptor.setUrl(SDMXRegistryInterfaceType.RESTV2_1, url);
client = new FusionRegistryClient(descriptor);
}