Minor updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@85803 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
710c8a373c
commit
9ee1c7978e
|
@ -28,7 +28,12 @@ import org.gcube.data.analysis.tabulardata.metadata.NoSuchMetadataException;
|
|||
import org.gcube.data.analysis.tabulardata.model.column.Column;
|
||||
import org.gcube.data.analysis.tabulardata.model.metadata.common.DescriptionsMetadata;
|
||||
import org.gcube.data.analysis.tabulardata.model.metadata.common.LocalizedText;
|
||||
import org.gcube.data.analysis.tabulardata.model.metadata.common.NamesMetadata;
|
||||
import org.gcube.data.analysis.tabulardata.model.metadata.table.ExportMetadata;
|
||||
import org.gcube.data.analysis.tabulardata.model.metadata.table.GenericMapMetadata;
|
||||
import org.gcube.data.analysis.tabulardata.model.metadata.table.ImportMetadata;
|
||||
import org.gcube.data.analysis.tabulardata.model.metadata.table.TableMetadata;
|
||||
import org.gcube.data.analysis.tabulardata.model.metadata.table.VersionMetadata;
|
||||
import org.gcube.data.analysis.tabulardata.model.table.Table;
|
||||
import org.gcube.data.analysis.tabulardata.model.table.TableId;
|
||||
import org.gcube.data.analysis.tabulardata.operation.worker.ActivityStatus;
|
||||
|
@ -77,8 +82,13 @@ import org.gcube.portlets.user.td.gwtservice.shared.file.HeaderPresence;
|
|||
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXImportMonitor;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.sdmx.SDMXImportSession;
|
||||
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.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -1130,11 +1140,13 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
.getUsername());
|
||||
|
||||
Table table = service.getTable(new TableId(Long.valueOf(trId.getTableId())));
|
||||
|
||||
Collection<TableMetadata> cMeta=table.getAllMetadata();
|
||||
|
||||
ArrayList<TRMetadata> listTRMetadata=new ArrayList<TRMetadata>();
|
||||
|
||||
for(TableMetadata tMetadata:cMeta){
|
||||
if(tMetadata instanceof TRDescriptionsMetadata){
|
||||
if(tMetadata instanceof DescriptionsMetadata){
|
||||
TRDescriptionsMetadata trDescriptionsMetadata=new TRDescriptionsMetadata();
|
||||
ArrayList<TRLocalizedText> listTRLocalizedText=new ArrayList<TRLocalizedText>();
|
||||
List<LocalizedText> lLocalizedText=((DescriptionsMetadata) tMetadata).getTexts();
|
||||
|
@ -1148,7 +1160,51 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
listTRMetadata.add(trDescriptionsMetadata);
|
||||
|
||||
} else {
|
||||
if(tMetadata instanceof NamesMetadata){
|
||||
TRNamesMetadata trNamesMetadata=new TRNamesMetadata();
|
||||
ArrayList<TRLocalizedText> listTRLocalizedText=new ArrayList<TRLocalizedText>();
|
||||
List<LocalizedText> lLocalizedText=((NamesMetadata) tMetadata).getTexts();
|
||||
for(LocalizedText lt:lLocalizedText){
|
||||
TRLocalizedText trLocalizedText=new TRLocalizedText();
|
||||
trLocalizedText.setValue(lt.getValue());
|
||||
trLocalizedText.setLocaleCode(lt.getLocaleCode());
|
||||
listTRLocalizedText.add(trLocalizedText);
|
||||
}
|
||||
trNamesMetadata.setListTRLocalizedText(listTRLocalizedText);
|
||||
listTRMetadata.add(trNamesMetadata);
|
||||
|
||||
} else {
|
||||
if(tMetadata instanceof VersionMetadata){
|
||||
TRVersionMetadata trVersionMetadata=new TRVersionMetadata();
|
||||
trVersionMetadata.setVersion(((VersionMetadata)tMetadata).getVersion());
|
||||
listTRMetadata.add(trVersionMetadata);
|
||||
}else{
|
||||
if(tMetadata instanceof ExportMetadata){
|
||||
TRExportMetadata trExportMetadata=new TRExportMetadata();
|
||||
trExportMetadata.setDestinationType(((ExportMetadata)tMetadata).getDestinationType());
|
||||
trExportMetadata.setExportDate(((ExportMetadata)tMetadata).getExportDate());
|
||||
trExportMetadata.setUrl(((ExportMetadata)tMetadata).getUri());
|
||||
listTRMetadata.add(trExportMetadata);
|
||||
}else{
|
||||
if(tMetadata instanceof ImportMetadata){
|
||||
TRImportMetadata trImportMetadata=new TRImportMetadata();
|
||||
trImportMetadata.setSourceType(((ImportMetadata)tMetadata).getSourceType());
|
||||
trImportMetadata.setImportDate(((ImportMetadata)tMetadata).getImportDate());
|
||||
trImportMetadata.setUrl(((ImportMetadata)tMetadata).getUri());
|
||||
listTRMetadata.add(trImportMetadata);
|
||||
}else{
|
||||
if(tMetadata instanceof GenericMapMetadata){
|
||||
TRGenericMapMetadata trGenericMapMetadata=new TRGenericMapMetadata();
|
||||
trGenericMapMetadata.setMetadataMap(((GenericMapMetadata)tMetadata).getMetadataMap());
|
||||
listTRMetadata.add(trGenericMapMetadata);
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,19 +13,19 @@ public class TRNamesMetadata implements TRMetadata {
|
|||
|
||||
private static final long serialVersionUID = 7635332011036656032L;
|
||||
|
||||
ArrayList<TRLocalizedText> listLocalizedText;
|
||||
ArrayList<TRLocalizedText> listTRLocalizedText;
|
||||
|
||||
public ArrayList<TRLocalizedText> getListLocalizedText() {
|
||||
return listLocalizedText;
|
||||
public ArrayList<TRLocalizedText> getListTRLocalizedText() {
|
||||
return listTRLocalizedText;
|
||||
}
|
||||
|
||||
public void setListLocalizedText(ArrayList<TRLocalizedText> listLocalizedText) {
|
||||
this.listLocalizedText = listLocalizedText;
|
||||
public void setListTRLocalizedText(ArrayList<TRLocalizedText> listTRLocalizedText) {
|
||||
this.listTRLocalizedText = listTRLocalizedText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TRNamesMetadata [listLocalizedText=" + listLocalizedText + "]";
|
||||
return "TRNamesMetadata [listTRLocalizedText=" + listTRLocalizedText + "]";
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue