Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@99514 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c0c48cc39e
commit
53ea631110
|
@ -13,6 +13,7 @@ import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.GregorianCalendar;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
@ -40,6 +41,7 @@ import org.gcube.common.resources.gcore.ServiceEndpoint.Profile;
|
||||||
import org.gcube.common.resources.gcore.utils.Group;
|
import org.gcube.common.resources.gcore.utils.Group;
|
||||||
import org.gcube.data.analysis.tabulardata.commons.utils.AuthorizationProvider;
|
import org.gcube.data.analysis.tabulardata.commons.utils.AuthorizationProvider;
|
||||||
import org.gcube.data.analysis.tabulardata.commons.utils.AuthorizationToken;
|
import org.gcube.data.analysis.tabulardata.commons.utils.AuthorizationToken;
|
||||||
|
import org.gcube.data.analysis.tabulardata.commons.utils.Licence;
|
||||||
import org.gcube.data.analysis.tabulardata.commons.webservice.types.TemplateDescription;
|
import org.gcube.data.analysis.tabulardata.commons.webservice.types.TemplateDescription;
|
||||||
import org.gcube.data.analysis.tabulardata.commons.webservice.types.operations.OperationDefinition;
|
import org.gcube.data.analysis.tabulardata.commons.webservice.types.operations.OperationDefinition;
|
||||||
import org.gcube.data.analysis.tabulardata.commons.webservice.types.operations.OperationExecution;
|
import org.gcube.data.analysis.tabulardata.commons.webservice.types.operations.OperationExecution;
|
||||||
|
@ -89,7 +91,6 @@ import org.gcube.data.analysis.tabulardata.service.tabular.TabularResource;
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.TabularResourceId;
|
import org.gcube.data.analysis.tabulardata.service.tabular.TabularResourceId;
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.AgencyMetadata;
|
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.AgencyMetadata;
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata;
|
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.DescriptionMetadata;
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.Licence;
|
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.LicenceMetadata;
|
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.LicenceMetadata;
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata;
|
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.NameMetadata;
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.RightsMetadata;
|
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.RightsMetadata;
|
||||||
|
@ -1496,7 +1497,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
* @param tabResource
|
* @param tabResource
|
||||||
*/
|
*/
|
||||||
protected void syncTRMetaData(TabularResource tr, TabResource tabResource) {
|
protected void syncTRMetaData(TabularResource tr, TabResource tabResource) {
|
||||||
// Date date = Calendar.getInstance().getTime();
|
|
||||||
logger.debug("TRservice [id:" + tr.getId() + " ,creationDate:"
|
logger.debug("TRservice [id:" + tr.getId() + " ,creationDate:"
|
||||||
+ tr.getCreationDate() + "]");
|
+ tr.getCreationDate() + "]");
|
||||||
logger.debug("TabResource [name:" + tabResource.getName()
|
logger.debug("TabResource [name:" + tabResource.getName()
|
||||||
|
@ -1517,7 +1518,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
if(tabResource.getValidFrom()!=null&& !tabResource.getValidFrom().isEmpty()){
|
if(tabResource.getValidFrom()!=null&& !tabResource.getValidFrom().isEmpty()){
|
||||||
try{
|
try{
|
||||||
Date dateF=sdfDate.parse(tabResource.getValidFrom());
|
Date dateF=sdfDate.parse(tabResource.getValidFrom());
|
||||||
Calendar validFromC= Calendar.getInstance();
|
GregorianCalendar validFromC= new GregorianCalendar();
|
||||||
validFromC.setTime(dateF);
|
validFromC.setTime(dateF);
|
||||||
ValidSinceMetadata validSince=new ValidSinceMetadata();
|
ValidSinceMetadata validSince=new ValidSinceMetadata();
|
||||||
validSince.setValue(validFromC);
|
validSince.setValue(validFromC);
|
||||||
|
@ -1530,7 +1531,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
if(tabResource.getValidUntilTo()!=null&& !tabResource.getValidUntilTo().isEmpty()){
|
if(tabResource.getValidUntilTo()!=null&& !tabResource.getValidUntilTo().isEmpty()){
|
||||||
try{
|
try{
|
||||||
Date dateU=sdfDate.parse(tabResource.getValidUntilTo());
|
Date dateU=sdfDate.parse(tabResource.getValidUntilTo());
|
||||||
Calendar validUntilToC= Calendar.getInstance();
|
GregorianCalendar validUntilToC= new GregorianCalendar();
|
||||||
validUntilToC.setTime(dateU);
|
validUntilToC.setTime(dateU);
|
||||||
ValidUntilMetadata validUntil=new ValidUntilMetadata();
|
ValidUntilMetadata validUntil=new ValidUntilMetadata();
|
||||||
validUntil.setValue(validUntilToC);
|
validUntil.setValue(validUntilToC);
|
||||||
|
@ -4410,7 +4411,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
if(tabResource.getValidFrom()!=null&& !tabResource.getValidFrom().isEmpty()){
|
if(tabResource.getValidFrom()!=null&& !tabResource.getValidFrom().isEmpty()){
|
||||||
try{
|
try{
|
||||||
Date dateF=sdfDate.parse(tabResource.getValidFrom());
|
Date dateF=sdfDate.parse(tabResource.getValidFrom());
|
||||||
Calendar validFromC= Calendar.getInstance();
|
GregorianCalendar validFromC= new GregorianCalendar();
|
||||||
validFromC.setTime(dateF);
|
validFromC.setTime(dateF);
|
||||||
ValidSinceMetadata validSince=new ValidSinceMetadata();
|
ValidSinceMetadata validSince=new ValidSinceMetadata();
|
||||||
validSince.setValue(validFromC);
|
validSince.setValue(validFromC);
|
||||||
|
@ -4423,7 +4424,7 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
if(tabResource.getValidUntilTo()!=null&& !tabResource.getValidUntilTo().isEmpty()){
|
if(tabResource.getValidUntilTo()!=null&& !tabResource.getValidUntilTo().isEmpty()){
|
||||||
try{
|
try{
|
||||||
Date dateU=sdfDate.parse(tabResource.getValidUntilTo());
|
Date dateU=sdfDate.parse(tabResource.getValidUntilTo());
|
||||||
Calendar validUntilToC= Calendar.getInstance();
|
GregorianCalendar validUntilToC= new GregorianCalendar();
|
||||||
validUntilToC.setTime(dateU);
|
validUntilToC.setTime(dateU);
|
||||||
ValidUntilMetadata validUntil=new ValidUntilMetadata();
|
ValidUntilMetadata validUntil=new ValidUntilMetadata();
|
||||||
validUntil.setValue(validUntilToC);
|
validUntil.setValue(validUntilToC);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package org.gcube.portlets.user.td.gwtservice.server.trservice;
|
package org.gcube.portlets.user.td.gwtservice.server.trservice;
|
||||||
|
|
||||||
import org.gcube.data.analysis.tabulardata.service.tabular.metadata.Licence;
|
import org.gcube.data.analysis.tabulardata.commons.utils.Licence;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue