Minor updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@86426 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3f3174ff10
commit
1e3e438a40
|
@ -21,8 +21,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
|||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TRId;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.open.TDOpenSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Agencies;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Codelist;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Dataset;
|
||||
|
@ -95,7 +95,7 @@ public interface TDGWTService extends RemoteService {
|
|||
* @return
|
||||
* @throws TDGWTServiceException
|
||||
*/
|
||||
public ArrayList<TRMetadata> getTableMetadata(TRId trId) throws TDGWTServiceException;
|
||||
public ArrayList<TabMetadata> getTableMetadata(TRId trId) throws TDGWTServiceException;
|
||||
|
||||
|
||||
// Open
|
||||
|
|
|
@ -20,8 +20,8 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
|||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TRId;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.open.TDOpenSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Agencies;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Codelist;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Dataset;
|
||||
|
@ -52,7 +52,7 @@ public interface TDGWTServiceAsync {
|
|||
|
||||
void getLastTable(TRId trId, AsyncCallback<TableData> callback);
|
||||
|
||||
void getTableMetadata(TRId trId, AsyncCallback<ArrayList<TRMetadata>> callback);
|
||||
void getTableMetadata(TRId trId, AsyncCallback<ArrayList<TabMetadata>> callback);
|
||||
|
||||
void getColumns(AsyncCallback<ArrayList<ColumnData>> callback);
|
||||
|
||||
|
|
|
@ -85,15 +85,21 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
|||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TRId;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRAgencyMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRCreationDateMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRDescriptionsMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRExportMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRGenericMapMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRImportMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRLocalizedText;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRNamesMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRVersionMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRRightsMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.open.TDOpenSession;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabDescriptionsMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabExportMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabGenericMapMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabImportMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabNamesMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabVersionMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Agencies;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Codelist;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.type.Dataset;
|
||||
|
@ -433,8 +439,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
String.valueOf(tableId.getValue()));
|
||||
}
|
||||
|
||||
TabResource t = new TabResource(String.valueOf(i), nameTR, descriptionTR, agencyTR,
|
||||
dateS, rightsTR, trId);
|
||||
TabResource t = new TabResource(String.valueOf(i), nameTR,
|
||||
descriptionTR, agencyTR, dateS, rightsTR, trId);
|
||||
return t;
|
||||
}
|
||||
|
||||
|
@ -764,8 +770,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
case FAILED:
|
||||
if (task.getResult() != null) {
|
||||
logger.debug("Task exception:"
|
||||
+ task.getErrorCause());
|
||||
importMonitor.setError(task.getErrorCause());
|
||||
+ task.getErrorMessage());
|
||||
importMonitor.setError(new Throwable(task
|
||||
.getErrorMessage()));
|
||||
} else {
|
||||
logger.debug("Task exception: Error In Import");
|
||||
importMonitor.setError(new Throwable(
|
||||
|
@ -1111,8 +1118,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
case FAILED:
|
||||
if (task.getResult() != null) {
|
||||
logger.debug("Task exception:"
|
||||
+ task.getErrorCause());
|
||||
importMonitor.setError(task.getErrorCause());
|
||||
+ task.getErrorMessage());
|
||||
importMonitor.setError(new Throwable(task
|
||||
.getErrorMessage()));
|
||||
} else {
|
||||
logger.debug("Task exception: Error In Import");
|
||||
importMonitor.setError(new Throwable(
|
||||
|
@ -1264,10 +1272,71 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
.getTabularResource(new TabularResourceId(Long.valueOf(trId
|
||||
.getId())));
|
||||
|
||||
Collection<TabularResourceMetadata> cMeta = tr.getAllMetadata();
|
||||
Collection<TabularResourceMetadata> trMetas = tr.getAllMetadata();
|
||||
|
||||
ArrayList<TRMetadata> listTRMetadata = new ArrayList<TRMetadata>();
|
||||
|
||||
for (TabularResourceMetadata trMetadata : trMetas) {
|
||||
if (trMetadata instanceof DescriptionMetadata) {
|
||||
TRDescriptionsMetadata trDescriptionsMetadata = new TRDescriptionsMetadata();
|
||||
ArrayList<TRLocalizedText> listTRLocalizedText = new ArrayList<TRLocalizedText>();
|
||||
List<LocalizedText> lLocalizedText = ((DescriptionsMetadata) trMetadata)
|
||||
.getTexts();
|
||||
int i = 0;
|
||||
for (LocalizedText lt : lLocalizedText) {
|
||||
TRLocalizedText trLocalizedText = new TRLocalizedText();
|
||||
trLocalizedText.setId(i);
|
||||
trLocalizedText.setValue(lt.getValue());
|
||||
trLocalizedText.setLocaleCode(lt.getLocale());
|
||||
listTRLocalizedText.add(trLocalizedText);
|
||||
i++;
|
||||
}
|
||||
trDescriptionsMetadata
|
||||
.setListTRLocalizedText(listTRLocalizedText);
|
||||
listTRMetadata.add(trDescriptionsMetadata);
|
||||
} else {
|
||||
if (trMetadata instanceof NamesMetadata) {
|
||||
TRNamesMetadata trNamesMetadata = new TRNamesMetadata();
|
||||
ArrayList<TRLocalizedText> listTRLocalizedText = new ArrayList<TRLocalizedText>();
|
||||
List<LocalizedText> lLocalizedText = ((NamesMetadata) trMetadata)
|
||||
.getTexts();
|
||||
int i = 0;
|
||||
for (LocalizedText lt : lLocalizedText) {
|
||||
TRLocalizedText trLocalizedText = new TRLocalizedText();
|
||||
trLocalizedText.setId(i);
|
||||
trLocalizedText.setValue(lt.getValue());
|
||||
trLocalizedText.setLocaleCode(lt.getLocale());
|
||||
listTRLocalizedText.add(trLocalizedText);
|
||||
i++;
|
||||
}
|
||||
trNamesMetadata
|
||||
.setListTRLocalizedText(listTRLocalizedText);
|
||||
listTRMetadata.add(trNamesMetadata);
|
||||
} else {
|
||||
if (trMetadata instanceof AgencyMetadata) {
|
||||
TRAgencyMetadata trAgencyMetadata = new TRAgencyMetadata();
|
||||
trAgencyMetadata.setValue(((AgencyMetadata)trMetadata).getValue());
|
||||
listTRMetadata.add(trAgencyMetadata);
|
||||
} else {
|
||||
if (trMetadata instanceof CreationDateMetadata) {
|
||||
TRCreationDateMetadata trCreationDateMetadata = new TRCreationDateMetadata();
|
||||
trCreationDateMetadata.setDate(sdf
|
||||
.format(((CreationDateMetadata)trMetadata).getValue()));
|
||||
listTRMetadata.add(trCreationDateMetadata);
|
||||
} else {
|
||||
if (trMetadata instanceof RightsMetadata) {
|
||||
TRRightsMetadata trRightsMetadata = new TRRightsMetadata();
|
||||
trRightsMetadata.setValue(((RightsMetadata)trMetadata).getValue());
|
||||
listTRMetadata.add(trRightsMetadata);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return listTRMetadata;
|
||||
|
||||
} catch (Exception e) {
|
||||
|
@ -1283,7 +1352,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public ArrayList<TRMetadata> getTableMetadata(TRId trId)
|
||||
public ArrayList<TabMetadata> getTableMetadata(TRId trId)
|
||||
throws TDGWTServiceException {
|
||||
try {
|
||||
session = this.getThreadLocalRequest().getSession();
|
||||
|
@ -1296,11 +1365,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
Collection<TableMetadata> cMeta = table.getAllMetadata();
|
||||
|
||||
ArrayList<TRMetadata> listTRMetadata = new ArrayList<TRMetadata>();
|
||||
ArrayList<TabMetadata> listTabMetadata = new ArrayList<TabMetadata>();
|
||||
|
||||
for (TableMetadata tMetadata : cMeta) {
|
||||
if (tMetadata instanceof DescriptionsMetadata) {
|
||||
TRDescriptionsMetadata trDescriptionsMetadata = new TRDescriptionsMetadata();
|
||||
TabDescriptionsMetadata trDescriptionsMetadata = new TabDescriptionsMetadata();
|
||||
ArrayList<TRLocalizedText> listTRLocalizedText = new ArrayList<TRLocalizedText>();
|
||||
List<LocalizedText> lLocalizedText = ((DescriptionsMetadata) tMetadata)
|
||||
.getTexts();
|
||||
|
@ -1315,11 +1384,11 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
}
|
||||
trDescriptionsMetadata
|
||||
.setListTRLocalizedText(listTRLocalizedText);
|
||||
listTRMetadata.add(trDescriptionsMetadata);
|
||||
listTabMetadata.add(trDescriptionsMetadata);
|
||||
|
||||
} else {
|
||||
if (tMetadata instanceof NamesMetadata) {
|
||||
TRNamesMetadata trNamesMetadata = new TRNamesMetadata();
|
||||
TabNamesMetadata trNamesMetadata = new TabNamesMetadata();
|
||||
ArrayList<TRLocalizedText> listTRLocalizedText = new ArrayList<TRLocalizedText>();
|
||||
List<LocalizedText> lLocalizedText = ((NamesMetadata) tMetadata)
|
||||
.getTexts();
|
||||
|
@ -1334,18 +1403,18 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
}
|
||||
trNamesMetadata
|
||||
.setListTRLocalizedText(listTRLocalizedText);
|
||||
listTRMetadata.add(trNamesMetadata);
|
||||
listTabMetadata.add(trNamesMetadata);
|
||||
|
||||
} else {
|
||||
if (tMetadata instanceof VersionMetadata) {
|
||||
TRVersionMetadata trVersionMetadata = new TRVersionMetadata();
|
||||
TabVersionMetadata trVersionMetadata = new TabVersionMetadata();
|
||||
trVersionMetadata
|
||||
.setVersion(((VersionMetadata) tMetadata)
|
||||
.getVersion());
|
||||
listTRMetadata.add(trVersionMetadata);
|
||||
listTabMetadata.add(trVersionMetadata);
|
||||
} else {
|
||||
if (tMetadata instanceof ExportMetadata) {
|
||||
TRExportMetadata trExportMetadata = new TRExportMetadata();
|
||||
TabExportMetadata trExportMetadata = new TabExportMetadata();
|
||||
trExportMetadata
|
||||
.setDestinationType(((ExportMetadata) tMetadata)
|
||||
.getDestinationType());
|
||||
|
@ -1355,10 +1424,10 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
trExportMetadata
|
||||
.setUrl(((ExportMetadata) tMetadata)
|
||||
.getUri());
|
||||
listTRMetadata.add(trExportMetadata);
|
||||
listTabMetadata.add(trExportMetadata);
|
||||
} else {
|
||||
if (tMetadata instanceof ImportMetadata) {
|
||||
TRImportMetadata trImportMetadata = new TRImportMetadata();
|
||||
TabImportMetadata trImportMetadata = new TabImportMetadata();
|
||||
trImportMetadata
|
||||
.setSourceType(((ImportMetadata) tMetadata)
|
||||
.getSourceType());
|
||||
|
@ -1369,14 +1438,14 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
trImportMetadata
|
||||
.setUrl(((ImportMetadata) tMetadata)
|
||||
.getUri());
|
||||
listTRMetadata.add(trImportMetadata);
|
||||
listTabMetadata.add(trImportMetadata);
|
||||
} else {
|
||||
if (tMetadata instanceof GenericMapMetadata) {
|
||||
TRGenericMapMetadata trGenericMapMetadata = new TRGenericMapMetadata();
|
||||
TabGenericMapMetadata trGenericMapMetadata = new TabGenericMapMetadata();
|
||||
trGenericMapMetadata
|
||||
.setMetadataMap(((GenericMapMetadata) tMetadata)
|
||||
.getMetadataMap());
|
||||
listTRMetadata
|
||||
listTabMetadata
|
||||
.add(trGenericMapMetadata);
|
||||
} else {
|
||||
|
||||
|
@ -1389,7 +1458,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
}
|
||||
}
|
||||
|
||||
return listTRMetadata;
|
||||
return listTabMetadata;
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error(
|
||||
|
@ -1521,8 +1590,9 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
case FAILED:
|
||||
if (task.getResult() != null) {
|
||||
logger.debug("Task exception:"
|
||||
+ task.getErrorCause());
|
||||
exportMonitor.setError(task.getErrorCause());
|
||||
+ task.getErrorMessage());
|
||||
exportMonitor.setError(new Throwable(task
|
||||
.getErrorMessage()));
|
||||
} else {
|
||||
logger.debug("Task exception: Error In Export");
|
||||
exportMonitor.setError(new Throwable(
|
||||
|
@ -1540,7 +1610,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
logger.debug("ExportMetadata: " + exportMetadata);
|
||||
|
||||
exportMonitor.setTrId(SessionUtil.getTRId(session));
|
||||
TRExportMetadata trExportMetadata = new TRExportMetadata();
|
||||
TabExportMetadata trExportMetadata = new TabExportMetadata();
|
||||
trExportMetadata.setUrl(exportMetadata.getUri());
|
||||
trExportMetadata.setDestinationType(exportMetadata
|
||||
.getDestinationType());
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.io.Serializable;
|
|||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.task.State;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TRId;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRExportMetadata;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata.TabExportMetadata;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -24,7 +24,7 @@ private static final long serialVersionUID = -5998841163159590481L;
|
|||
protected String statusDescription;
|
||||
protected Throwable error;
|
||||
protected TRId trId;
|
||||
protected TRExportMetadata trExportMetadata;
|
||||
protected TabExportMetadata trExportMetadata;
|
||||
|
||||
|
||||
public float getProgress(){
|
||||
|
@ -51,11 +51,11 @@ private static final long serialVersionUID = -5998841163159590481L;
|
|||
this.status = State.values()[status];
|
||||
}
|
||||
|
||||
public TRExportMetadata getTrExportMetadata() {
|
||||
public TabExportMetadata getTrExportMetadata() {
|
||||
return trExportMetadata;
|
||||
}
|
||||
|
||||
public void setTrExportMetadata(TRExportMetadata trExportMetadata) {
|
||||
public void setTrExportMetadata(TabExportMetadata trExportMetadata) {
|
||||
this.trExportMetadata = trExportMetadata;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TRAgencyMetadata implements TRMetadata {
|
||||
|
||||
private static final long serialVersionUID = -7693467120874749946L;
|
||||
String id="AgencyMetadata";
|
||||
String title="Agency";
|
||||
|
||||
private String value;
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TRAgencyMetadata [value=" + value + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TRCreationDateMetadata implements TRMetadata {
|
||||
|
||||
|
||||
private static final long serialVersionUID = -431795849858460198L;
|
||||
String id="CreationDateMetadata";
|
||||
String title="Creation Date";
|
||||
|
||||
private String date;
|
||||
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TRCreationDateMetadata [date=" + date + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -2,6 +2,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRLocalizedText;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -2,6 +2,8 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRLocalizedText;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TRRightsMetadata implements TRMetadata {
|
||||
|
||||
private static final long serialVersionUID = -7693467120874749946L;
|
||||
String id="RightsMetadata";
|
||||
String title="Rights";
|
||||
|
||||
private String value;
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TRRightsMetadata [value=" + value + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRLocalizedText;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TabDescriptionsMetadata implements TabMetadata {
|
||||
private static final long serialVersionUID = -2663624208642658528L;
|
||||
|
||||
|
||||
String id="DescriptionsMetadata";
|
||||
String title="Descriptions";
|
||||
|
||||
ArrayList<TRLocalizedText> listTabLocalizedText;
|
||||
|
||||
public ArrayList<TRLocalizedText> getListTRLocalizedText() {
|
||||
return listTabLocalizedText;
|
||||
}
|
||||
|
||||
public void setListTRLocalizedText(ArrayList<TRLocalizedText> listTRLocalizedText) {
|
||||
this.listTabLocalizedText = listTRLocalizedText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TabDescriptionsMetadata [listTabLocalizedText=" + listTabLocalizedText
|
||||
+ "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
||||
package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata;
|
||||
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
|||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TRExportMetadata implements TRMetadata {
|
||||
public class TabExportMetadata implements TabMetadata {
|
||||
private static final long serialVersionUID = -2663624208642658528L;
|
||||
|
||||
String id="ExportMetadata";
|
||||
|
@ -38,7 +38,7 @@ public class TRExportMetadata implements TRMetadata {
|
|||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TRExportMetadata [destinationType=" + destinationType
|
||||
return "TabExportMetadata [destinationType=" + destinationType
|
||||
+ ", url=" + url + ", exportDate=" + exportDate + "]";
|
||||
}
|
||||
@Override
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
||||
package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.util.HashMap;
|
|||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TRGenericMapMetadata implements TRMetadata {
|
||||
public class TabGenericMapMetadata implements TabMetadata {
|
||||
private static final long serialVersionUID = -2663624208642658528L;
|
||||
|
||||
String id="GenericMapMetadata";
|
||||
|
@ -27,7 +27,7 @@ public class TRGenericMapMetadata implements TRMetadata {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TRGenericMapMetadata [metadataMap=" + metadataMap + "]";
|
||||
return "TabGenericMapMetadata [metadataMap=" + metadataMap + "]";
|
||||
}
|
||||
|
||||
@Override
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
||||
package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -7,7 +7,7 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
|||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TRImportMetadata implements TRMetadata {
|
||||
public class TabImportMetadata implements TabMetadata {
|
||||
private static final long serialVersionUID = -2663624208642658528L;
|
||||
|
||||
String id="ImportMetadata";
|
||||
|
@ -43,7 +43,7 @@ public class TRImportMetadata implements TRMetadata {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TRImportMetadata [sourceType=" + sourceType + ", url=" + url
|
||||
return "TabImportMetadata [sourceType=" + sourceType + ", url=" + url
|
||||
+ ", importDate=" + importDate + "]";
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public interface TabMetadata extends Serializable {
|
||||
|
||||
public String getId();
|
||||
public String getTitle();
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.metadata.TRLocalizedText;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi" <a
|
||||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TabNamesMetadata implements TabMetadata {
|
||||
|
||||
private static final long serialVersionUID = 7635332011036656032L;
|
||||
|
||||
String id="NamesMetadata";
|
||||
String title="Names";
|
||||
|
||||
ArrayList<TRLocalizedText> listTabLocalizedText;
|
||||
|
||||
public ArrayList<TRLocalizedText> getListTRLocalizedText() {
|
||||
return listTabLocalizedText;
|
||||
}
|
||||
|
||||
public void setListTRLocalizedText(ArrayList<TRLocalizedText> listTRLocalizedText) {
|
||||
this.listTabLocalizedText = listTRLocalizedText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TabNamesMetadata [listTabLocalizedText=" + listTabLocalizedText + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
||||
package org.gcube.portlets.user.td.gwtservice.shared.tr.table.metadata;
|
||||
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr.metadata;
|
|||
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class TRVersionMetadata implements TRMetadata {
|
||||
public class TabVersionMetadata implements TabMetadata {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 5208229342328376604L;
|
||||
|
@ -28,7 +28,7 @@ public class TRVersionMetadata implements TRMetadata {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TRVersionMetadata [version=" + version + "]";
|
||||
return "TabVersionMetadata [version=" + version + "]";
|
||||
}
|
||||
|
||||
@Override
|
Loading…
Reference in New Issue