ref 8781:TDM - Integration excel generator-tabman portlet
https://support.d4science.org/issues/8781 Added excel to template git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@150509 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
296f8deb2c
commit
840e07ee3a
|
@ -102,6 +102,7 @@ public class OpExecution4SDMXDatasetExport extends OpExecutionBuilder {
|
||||||
map.put(Constants.PARAMETER_ID, sdmxExportSession.getId());
|
map.put(Constants.PARAMETER_ID, sdmxExportSession.getId());
|
||||||
map.put(Constants.PARAMETER_VERSION, sdmxExportSession.getVersion());
|
map.put(Constants.PARAMETER_VERSION, sdmxExportSession.getVersion());
|
||||||
map.put(Constants.PARAMETER_OBSVALUECOLUMN, sdmxExportSession.getObsValueColumn().getColumnId());
|
map.put(Constants.PARAMETER_OBSVALUECOLUMN, sdmxExportSession.getObsValueColumn().getColumnId());
|
||||||
|
map.put(Constants.PARAMETER_EXCEL, sdmxExportSession.isExcel());
|
||||||
OperationExecution invocation = new OperationExecution(
|
OperationExecution invocation = new OperationExecution(
|
||||||
operationDefinition.getOperationId(), map);
|
operationDefinition.getOperationId(), map);
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,11 @@ import org.gcube.data.analysis.tabulardata.commons.webservice.types.resources.Re
|
||||||
import org.gcube.data.analysis.tabulardata.model.resources.InternalURI;
|
import org.gcube.data.analysis.tabulardata.model.resources.InternalURI;
|
||||||
import org.gcube.data.analysis.tabulardata.model.resources.Resource;
|
import org.gcube.data.analysis.tabulardata.model.resources.Resource;
|
||||||
import org.gcube.data.analysis.tabulardata.model.resources.ResourceType;
|
import org.gcube.data.analysis.tabulardata.model.resources.ResourceType;
|
||||||
|
import org.gcube.data.analysis.tabulardata.model.resources.SDMXResource;
|
||||||
import org.gcube.data.analysis.tabulardata.model.resources.StringResource;
|
import org.gcube.data.analysis.tabulardata.model.resources.StringResource;
|
||||||
import org.gcube.data.analysis.tabulardata.model.resources.TableResource;
|
import org.gcube.data.analysis.tabulardata.model.resources.TableResource;
|
||||||
import org.gcube.data.analysis.tabulardata.model.resources.Thumbnail;
|
import org.gcube.data.analysis.tabulardata.model.resources.Thumbnail;
|
||||||
|
import org.gcube.data.analysis.tabulardata.model.resources.WebResource;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.uriresolver.UriResolverTDClient;
|
import org.gcube.portlets.user.td.gwtservice.server.uriresolver.UriResolverTDClient;
|
||||||
import org.gcube.portlets.user.td.gwtservice.server.util.ServiceCredentials;
|
import org.gcube.portlets.user.td.gwtservice.server.util.ServiceCredentials;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTServiceException;
|
||||||
|
@ -18,8 +20,10 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.InternalURITD;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTD;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTD;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDDescriptor;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDDescriptor;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDType;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDType;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.SDMXResourceTD;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.StringResourceTD;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.StringResourceTD;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.TableResourceTD;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.TableResourceTD;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.WebResourceTD;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.uriresolver.UriResolverSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.uriresolver.UriResolverSession;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.thumbnail.ThumbnailTD;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.thumbnail.ThumbnailTD;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.uriresolver.ApplicationType;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.uriresolver.ApplicationType;
|
||||||
|
@ -33,11 +37,9 @@ import org.slf4j.LoggerFactory;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ResourceTDCreator {
|
public class ResourceTDCreator {
|
||||||
private static Logger logger = LoggerFactory
|
private static Logger logger = LoggerFactory.getLogger(ResourceTDCreator.class);
|
||||||
.getLogger(ResourceTDCreator.class);
|
|
||||||
|
|
||||||
protected static SimpleDateFormat sdf = new SimpleDateFormat(
|
protected static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||||
"yyyy-MM-dd HH:mm");
|
|
||||||
|
|
||||||
private ServiceCredentials serviceCredentials;
|
private ServiceCredentials serviceCredentials;
|
||||||
|
|
||||||
|
@ -45,9 +47,8 @@ public class ResourceTDCreator {
|
||||||
this.serviceCredentials = serviceCredentials;
|
this.serviceCredentials = serviceCredentials;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArrayList<ResourceTDDescriptor> createResourcesDescriptorTD(List<ResourceDescriptor> resources)
|
||||||
public ArrayList<ResourceTDDescriptor> createResourcesDescriptorTD(
|
throws TDGWTServiceException {
|
||||||
List<ResourceDescriptor> resources) throws TDGWTServiceException {
|
|
||||||
ArrayList<ResourceTDDescriptor> resourcesTD = new ArrayList<ResourceTDDescriptor>();
|
ArrayList<ResourceTDDescriptor> resourcesTD = new ArrayList<ResourceTDDescriptor>();
|
||||||
|
|
||||||
for (ResourceDescriptor resourceDescriptor : resources) {
|
for (ResourceDescriptor resourceDescriptor : resources) {
|
||||||
|
@ -60,31 +61,24 @@ public class ResourceTDCreator {
|
||||||
Resource resource = resourceDescriptor.getResource();
|
Resource resource = resourceDescriptor.getResource();
|
||||||
if (resource != null) {
|
if (resource != null) {
|
||||||
ResourceTD resourceTD = createResourceTD(resource);
|
ResourceTD resourceTD = createResourceTD(resource);
|
||||||
ResourceType resourceType = resourceDescriptor
|
ResourceType resourceType = resourceDescriptor.getResourceType();
|
||||||
.getResourceType();
|
ResourceTDType resourceTDType = ResourceTypeMap.getResourceTDType(resourceType);
|
||||||
ResourceTDType resourceTDType = ResourceTypeMap
|
|
||||||
.getResourceTDType(resourceType);
|
|
||||||
String creationDate = null;
|
String creationDate = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
creationDate = sdf.format(resourceDescriptor
|
creationDate = sdf.format(resourceDescriptor.getCreationDate().getTime());
|
||||||
.getCreationDate().getTime());
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("ResourceDescription[id=" + id + ", name="
|
logger.error("ResourceDescription[id=" + id + ", name=" + name + ", description=" + description
|
||||||
+ name + ", description=" + description
|
+ ", creatorId=" + creatorId + "] has invalid creation date!");
|
||||||
+ ", creatorId=" + creatorId
|
|
||||||
+ "] has invalid creation date!");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
resourceTDDescriptor = new ResourceTDDescriptor(id, name,
|
resourceTDDescriptor = new ResourceTDDescriptor(id, name, description, creationDate, creatorId,
|
||||||
description, creationDate, creatorId, resourceTDType,
|
resourceTDType, resourceTD);
|
||||||
resourceTD);
|
|
||||||
resourcesTD.add(resourceTDDescriptor);
|
resourcesTD.add(resourceTDDescriptor);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
logger.error("ResourceDescription[id=" + id + ", name=" + name
|
logger.error("ResourceDescription[id=" + id + ", name=" + name + ", description=" + description
|
||||||
+ ", description=" + description + ", creatorId="
|
+ ", creatorId=" + creatorId + "] has resource null!");
|
||||||
+ creatorId + "] has resource null!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -93,9 +87,7 @@ public class ResourceTDCreator {
|
||||||
return resourcesTD;
|
return resourcesTD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected ResourceTD createResourceTD(Resource resource) throws TDGWTServiceException {
|
||||||
protected ResourceTD createResourceTD(Resource resource)
|
|
||||||
throws TDGWTServiceException {
|
|
||||||
ResourceTD resourceTD = null;
|
ResourceTD resourceTD = null;
|
||||||
|
|
||||||
Class<? extends Resource> resourceClass = resource.getResourceType();
|
Class<? extends Resource> resourceClass = resource.getResourceType();
|
||||||
|
@ -108,11 +100,9 @@ public class ResourceTDCreator {
|
||||||
ThumbnailTD thumbnailTD = null;
|
ThumbnailTD thumbnailTD = null;
|
||||||
if (thumbnail != null && thumbnail.getUri() != null) {
|
if (thumbnail != null && thumbnail.getUri() != null) {
|
||||||
UriResolverTDClient uriResolverTDClient = new UriResolverTDClient();
|
UriResolverTDClient uriResolverTDClient = new UriResolverTDClient();
|
||||||
UriResolverSession uriResolverSession = new UriResolverSession(
|
UriResolverSession uriResolverSession = new UriResolverSession(thumbnail.getUri().toString(),
|
||||||
thumbnail.getUri().toString(), ApplicationType.SMP_ID,
|
ApplicationType.SMP_ID, "resourcethumbnail.jpg", thumbnail.getMimeType());
|
||||||
"resourcethumbnail.jpg", thumbnail.getMimeType());
|
String link = uriResolverTDClient.resolve(uriResolverSession, serviceCredentials);
|
||||||
String link = uriResolverTDClient.resolve(uriResolverSession,
|
|
||||||
serviceCredentials);
|
|
||||||
thumbnailTD = new ThumbnailTD(link, thumbnail.getMimeType());
|
thumbnailTD = new ThumbnailTD(link, thumbnail.getMimeType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,10 +114,24 @@ public class ResourceTDCreator {
|
||||||
} else {
|
} else {
|
||||||
if (resourceClass == TableResource.class) {
|
if (resourceClass == TableResource.class) {
|
||||||
TableResource tableResource = (TableResource) resource;
|
TableResource tableResource = (TableResource) resource;
|
||||||
return new TableResourceTD(tableResource.getTableId()
|
return new TableResourceTD(tableResource.getTableId().getValue(), tableResource.getStringValue());
|
||||||
.getValue(), tableResource.getStringValue());
|
|
||||||
} else {
|
} else {
|
||||||
|
if (resourceClass == SDMXResource.class) {
|
||||||
|
SDMXResource sdmxResource = (SDMXResource) resource;
|
||||||
|
SDMXResourceTD sdmxResourceTD = new SDMXResourceTD(sdmxResource.getName(),
|
||||||
|
sdmxResource.getAgency(), sdmxResource.getPrimaryMeasure(),
|
||||||
|
sdmxResource.getStringValue(), sdmxResource.getType().name(),
|
||||||
|
sdmxResource.getVersion());
|
||||||
|
return sdmxResourceTD;
|
||||||
|
} else {
|
||||||
|
if (resourceClass == WebResource.class) {
|
||||||
|
WebResource webResource = (WebResource) resource;
|
||||||
|
WebResourceTD webResourceTD = new WebResourceTD(webResource.getStringValue());
|
||||||
|
return webResourceTD;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,9 +10,10 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.resources.ResourceTDType;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ResourceTypeMap {
|
public class ResourceTypeMap {
|
||||||
//private static Logger logger = LoggerFactory.getLogger(ResourceTypeMap.class);
|
// private static Logger logger =
|
||||||
|
// LoggerFactory.getLogger(ResourceTypeMap.class);
|
||||||
|
|
||||||
public static ResourceType getResourceType(ResourceTDType resourceTDType){
|
public static ResourceType getResourceType(ResourceTDType resourceTDType) {
|
||||||
switch (resourceTDType) {
|
switch (resourceTDType) {
|
||||||
case CHART:
|
case CHART:
|
||||||
return ResourceType.CHART;
|
return ResourceType.CHART;
|
||||||
|
@ -28,6 +29,8 @@ public class ResourceTypeMap {
|
||||||
return ResourceType.MAP;
|
return ResourceType.MAP;
|
||||||
case SDMX:
|
case SDMX:
|
||||||
return ResourceType.SDMX;
|
return ResourceType.SDMX;
|
||||||
|
case WEB:
|
||||||
|
return ResourceType.WEB;
|
||||||
case GENERIC_FILE:
|
case GENERIC_FILE:
|
||||||
return ResourceType.GENERIC_FILE;
|
return ResourceType.GENERIC_FILE;
|
||||||
case GENERIC_TABLE:
|
case GENERIC_TABLE:
|
||||||
|
@ -36,8 +39,8 @@ public class ResourceTypeMap {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ResourceTDType getResourceTDType(ResourceType resourceType){
|
public static ResourceTDType getResourceTDType(ResourceType resourceType) {
|
||||||
switch (resourceType) {
|
switch (resourceType) {
|
||||||
case CHART:
|
case CHART:
|
||||||
return ResourceTDType.CHART;
|
return ResourceTDType.CHART;
|
||||||
|
@ -53,17 +56,16 @@ public class ResourceTypeMap {
|
||||||
return ResourceTDType.MAP;
|
return ResourceTDType.MAP;
|
||||||
case SDMX:
|
case SDMX:
|
||||||
return ResourceTDType.SDMX;
|
return ResourceTDType.SDMX;
|
||||||
|
case WEB:
|
||||||
|
return ResourceTDType.WEB;
|
||||||
case GENERIC_FILE:
|
case GENERIC_FILE:
|
||||||
return ResourceTDType.GENERIC_FILE;
|
return ResourceTDType.GENERIC_FILE;
|
||||||
case GENERIC_TABLE:
|
case GENERIC_TABLE:
|
||||||
return ResourceTDType.GENERIC_TABLE;
|
return ResourceTDType.GENERIC_TABLE;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class SDMXExportSession implements Serializable {
|
||||||
private String registryBaseUrl;
|
private String registryBaseUrl;
|
||||||
|
|
||||||
private ColumnData obsValueColumn;
|
private ColumnData obsValueColumn;
|
||||||
|
private boolean excel;
|
||||||
|
|
||||||
public TabResource getTabResource() {
|
public TabResource getTabResource() {
|
||||||
return tabResource;
|
return tabResource;
|
||||||
|
@ -106,14 +107,20 @@ public class SDMXExportSession implements Serializable {
|
||||||
this.obsValueColumn = obsValueColumn;
|
this.obsValueColumn = obsValueColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public boolean isExcel() {
|
||||||
public String toString() {
|
return excel;
|
||||||
return "SDMXExportSession [tabResource=" + tabResource + ", agency="
|
}
|
||||||
+ agency + ", source=" + source + ", exportType=" + exportType
|
|
||||||
+ ", id=" + id + ", agencyName=" + agencyId + ", version="
|
public void setExcel(boolean excel) {
|
||||||
+ version + ", registryBaseUrl=" + registryBaseUrl
|
this.excel = excel;
|
||||||
+ ", obsValueColumn=" + obsValueColumn + "]";
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SDMXExportSession [tabResource=" + tabResource + ", agency=" + agency + ", source=" + source
|
||||||
|
+ ", exportType=" + exportType + ", id=" + id + ", agencyId=" + agencyId + ", version=" + version
|
||||||
|
+ ", registryBaseUrl=" + registryBaseUrl + ", obsValueColumn=" + obsValueColumn + ", excel=" + excel
|
||||||
|
+ "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,7 @@ public class InternalURITD extends ResourceTD {
|
||||||
private static final long serialVersionUID = -3230438212164027113L;
|
private static final long serialVersionUID = -3230438212164027113L;
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
private String mimeType;
|
private String mimeType;
|
||||||
|
|
||||||
private ThumbnailTD thumbnailTD;
|
private ThumbnailTD thumbnailTD;
|
||||||
|
|
||||||
public InternalURITD() {
|
public InternalURITD() {
|
||||||
|
@ -28,11 +26,6 @@ public class InternalURITD extends ResourceTD {
|
||||||
this.thumbnailTD = thumbnailTD;
|
this.thumbnailTD = thumbnailTD;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getStringValue() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +52,8 @@ public class InternalURITD extends ResourceTD {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "InternalURITD [id=" + id + ", mimeType=" + mimeType + ", thumbnailTD=" + thumbnailTD + "]";
|
return "InternalURITD [id=" + id + ", mimeType=" + mimeType + ", thumbnailTD=" + thumbnailTD
|
||||||
|
+ ", getStringValue()=" + getStringValue() + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.resources;
|
||||||
*/
|
*/
|
||||||
public enum ResourceTDType {
|
public enum ResourceTDType {
|
||||||
|
|
||||||
CHART("Chart"), GUESSER("Guesser"), MAP("Map"), CODELIST("Codelist"), CSV("CSV"), SDMX("SDMX"), JSON(
|
CHART("Chart"), GUESSER("Guesser"), MAP("Map"), CODELIST("Codelist"), CSV("CSV"), SDMX("SDMX"), WEB("WEB"), JSON(
|
||||||
"JSON"), GENERIC_FILE("Generic File"), GENERIC_TABLE("Generic Table");
|
"JSON"), GENERIC_FILE("Generic File"), GENERIC_TABLE("Generic Table");
|
||||||
|
|
||||||
private ResourceTDType(final String id) {
|
private ResourceTDType(final String id) {
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
package org.gcube.portlets.user.td.gwtservice.shared.tr.resources;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class SDMXResourceTD extends ResourceTD {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -3075957767979840537L;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private String agency;
|
||||||
|
private String primaryMeasure;
|
||||||
|
private String type;
|
||||||
|
private String version;
|
||||||
|
|
||||||
|
public SDMXResourceTD() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public SDMXResourceTD(String name, String agency, String primaryMeasure, String stringValue, String type, String version) {
|
||||||
|
super(stringValue);
|
||||||
|
this.name =name;
|
||||||
|
this.agency = agency;
|
||||||
|
this.primaryMeasure = primaryMeasure;
|
||||||
|
this.type=type;
|
||||||
|
this.version=version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAgency() {
|
||||||
|
return agency;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAgency(String agency) {
|
||||||
|
this.agency = agency;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrimaryMeasure() {
|
||||||
|
return primaryMeasure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrimaryMeasure(String primaryMeasure) {
|
||||||
|
this.primaryMeasure = primaryMeasure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(String version) {
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SDMXResourceTD [name=" + name + ", agency=" + agency + ", primaryMeasure=" + primaryMeasure + ", type="
|
||||||
|
+ type + ", version=" + version + ", getStringValue()=" + getStringValue() + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -22,11 +22,6 @@ public class StringResourceTD extends ResourceTD {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getStringValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +32,7 @@ public class StringResourceTD extends ResourceTD {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "StringResourceTD [value=" + value + "]";
|
return "StringResourceTD [value=" + value + ", getStringValue()=" + getStringValue() + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ public class TableResourceTD extends ResourceTD {
|
||||||
private static final long serialVersionUID = -3230438212164027113L;
|
private static final long serialVersionUID = -3230438212164027113L;
|
||||||
|
|
||||||
private long tableId;
|
private long tableId;
|
||||||
private String tableStringValue;
|
|
||||||
|
|
||||||
public TableResourceTD() {
|
public TableResourceTD() {
|
||||||
super();
|
super();
|
||||||
|
@ -19,15 +18,9 @@ public class TableResourceTD extends ResourceTD {
|
||||||
public TableResourceTD(long tableId, String tableStringValue) {
|
public TableResourceTD(long tableId, String tableStringValue) {
|
||||||
super(tableStringValue);
|
super(tableStringValue);
|
||||||
this.tableId = tableId;
|
this.tableId = tableId;
|
||||||
this.tableStringValue = tableStringValue;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getStringValue() {
|
|
||||||
return tableStringValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getTableId() {
|
public long getTableId() {
|
||||||
return tableId;
|
return tableId;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +31,7 @@ public class TableResourceTD extends ResourceTD {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "TableResourceTD [tableId=" + tableId + ", tableStringValue=" + tableStringValue + "]";
|
return "TableResourceTD [tableId=" + tableId + ", getStringValue()=" + getStringValue() + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package org.gcube.portlets.user.td.gwtservice.shared.tr.resources;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class WebResourceTD extends ResourceTD {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 8895032679636897620L;
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
public WebResourceTD() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public WebResourceTD(String value) {
|
||||||
|
super(value);
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "WebResourceTD [value=" + value + ", getStringValue()=" + getStringValue() + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue