Updated Flows
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@100978 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cafeb0d1b7
commit
ea14059285
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/tabular-data-gwt-service-2.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/tabular-data-gwt-service-2.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/tabular-data-gwt-service-2.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/tabular-data-gwt-service-2.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -33,5 +33,5 @@
|
|||
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/tabular-data-gwt-service-2.4.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/tabular-data-gwt-service-2.5.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1515,6 +1515,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
if (viewTable == null) {
|
||||
logger.debug("ViewTable is null");
|
||||
newTRId = new TRId(trId.getId());
|
||||
newTRId.setTabResourceType(trId.getTabResourceType());
|
||||
newTRId.setTableTypeName(trId.getTableTypeName());
|
||||
newTRId.setTableId(String.valueOf(table.getId().getValue()));
|
||||
newTRId.setTableType(table.getTableType().getName());
|
||||
|
@ -1576,6 +1577,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
} else {
|
||||
logger.debug("ViewTable is not null");
|
||||
newTRId = new TRId(trId.getId());
|
||||
newTRId.setTabResourceType(trId.getTabResourceType());
|
||||
newTRId.setTableTypeName(trId.getTableTypeName());
|
||||
newTRId.setTableId(String.valueOf(viewTable.getId().getValue()));
|
||||
newTRId.setTableType(viewTable.getTableType().getName());
|
||||
|
@ -1689,6 +1691,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
if (viewTable == null) {
|
||||
logger.debug("ViewTable is null");
|
||||
TRId newTRId = new TRId(trId.getId());
|
||||
newTRId.setTabResourceType(trId.getTabResourceType());
|
||||
newTRId.setTableTypeName(trId.getTableTypeName());
|
||||
newTRId.setTableId(String.valueOf(table.getId().getValue()));
|
||||
newTRId.setTableType(table.getTableType().getName());
|
||||
|
@ -1750,6 +1753,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
} else {
|
||||
logger.debug("ViewTable is not null");
|
||||
TRId newTRId = new TRId(trId.getId());
|
||||
newTRId.setTabResourceType(trId.getTabResourceType());
|
||||
newTRId.setTableTypeName(trId.getTableTypeName());
|
||||
newTRId.setTableId(String.valueOf(viewTable.getId().getValue()));
|
||||
newTRId.setTableType(viewTable.getTableType().getName());
|
||||
|
@ -1937,6 +1941,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
|
||||
/**
|
||||
* Retrieves the informations for a specific Tabular Resource from service
|
||||
* without table id (fast)
|
||||
*
|
||||
* @param tr
|
||||
* TabularResource on service
|
||||
|
@ -1951,8 +1956,8 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
try {
|
||||
TabResource t = new TabResource();
|
||||
TRId trId = new TRId(String.valueOf(tr.getId().getValue()));
|
||||
trId.setTabResourceType(TabularResourceTypeMap.map(tr.getTabularResourceType()));
|
||||
trId.setTableTypeName(tr.getTableType());
|
||||
|
||||
t.setId(String.valueOf(i));
|
||||
t.setTrId(trId);
|
||||
t.setValid(tr.isValid());
|
||||
|
@ -2111,6 +2116,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Retrieves codelists without table id (fast)
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
@ -2544,7 +2550,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Retrieves tabular resource without table id (fast)
|
||||
*
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
|
|
@ -2,6 +2,8 @@ package org.gcube.portlets.user.td.gwtservice.server.trservice;
|
|||
|
||||
import org.gcube.data.analysis.tabulardata.commons.webservice.types.TabularResourceType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TabResourceType;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -10,7 +12,15 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TabResourceType;
|
|||
*
|
||||
*/
|
||||
public class TabularResourceTypeMap {
|
||||
private static Logger logger = LoggerFactory
|
||||
.getLogger(TabularResourceTypeMap.class);
|
||||
|
||||
public static TabResourceType map(TabularResourceType tabularResourceType) {
|
||||
if(tabularResourceType==null){
|
||||
logger.error("Tabular Resource Type is null");
|
||||
return TabResourceType.UNKNOWN;
|
||||
}
|
||||
|
||||
switch (tabularResourceType) {
|
||||
case FLOW:
|
||||
return TabResourceType.FLOW;
|
||||
|
|
Loading…
Reference in New Issue