Updated client library for netcdf files

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/data-miner-manager-cl@167296 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2018-05-03 12:43:24 +00:00
parent 70006d0a38
commit f65236e7ba
15 changed files with 168 additions and 87 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/data-miner-manager-cl-1.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/data-miner-manager-cl-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/data-miner-manager-cl-1.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources"> <classpathentry excluding="**" kind="src" output="target/data-miner-manager-cl-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
@ -28,10 +28,10 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/> <attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes> <attributes>
<attribute name="owner.project.facets" value="java"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/data-miner-manager-cl-1.3.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/data-miner-manager-cl-1.4.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=1.7

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<faceted-project> <faceted-project>
<installed facet="jst.utility" version="1.0"/> <installed facet="jst.utility" version="1.0"/>
<installed facet="java" version="1.8"/> <installed facet="java" version="1.7"/>
</faceted-project> </faceted-project>

View File

@ -1,4 +1,8 @@
<ReleaseNotes> <ReleaseNotes>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-4-0"
date="2018-04-03">
<Change>Updated to support netcdf files</Change>
</Changeset>
<Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-3-0" <Changeset component="org.gcube.data.analysis.data-miner-manager-cl.1-3-0"
date="2017-06-12"> date="2017-06-12">
<Change>Support Java 8 compatibility [ticket #8471]</Change> <Change>Support Java 8 compatibility [ticket #8471]</Change>

View File

@ -11,7 +11,7 @@
<groupId>org.gcube.data.analysis</groupId> <groupId>org.gcube.data.analysis</groupId>
<artifactId>data-miner-manager-cl</artifactId> <artifactId>data-miner-manager-cl</artifactId>
<version>1.3.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
<name>data-miner-manager-cl</name> <name>data-miner-manager-cl</name>
<description>DataMiner Manager Client Library</description> <description>DataMiner Manager Client Library</description>

View File

@ -3,13 +3,7 @@
<inherits name='com.google.gwt.user.User' /> <inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.http.HTTP" /> <inherits name="com.google.gwt.http.HTTP" />
<!-- <inherits name='com.google.gwt.user.theme.clean.Clean' /> -->
<inherits name='com.sencha.gxt.ui.GXT' />
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
<!-- <inherits name="com.google.gwt.logging.Logging" /> -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
<!-- <!--
<entry-point <entry-point
class='org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManager' /> class='org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManager' />
@ -19,12 +13,12 @@
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED" value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
/> --> /> -->
<!--
<set-property name="log_ConsoleLogger" value="DISABLED" /> <set-property name="log_ConsoleLogger" value="DISABLED" />
<set-property name="log_DivLogger" value="DISABLED" /> <set-property name="log_DivLogger" value="DISABLED" />
<set-property name="log_GWTLogger" value="DISABLED" /> <set-property name="log_GWTLogger" value="DISABLED" />
<set-property name="log_SystemLogger" value="DISABLED" /> <set-property name="log_SystemLogger" value="DISABLED" />
-->
<source path='client' /> <source path='client' />

View File

@ -53,6 +53,7 @@ import org.gcube.data.analysis.dataminermanagercl.shared.data.output.MapResource
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.ObjectResource; import org.gcube.data.analysis.dataminermanagercl.shared.data.output.ObjectResource;
import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource; import org.gcube.data.analysis.dataminermanagercl.shared.data.output.Resource;
import org.gcube.data.analysis.dataminermanagercl.shared.exception.ServiceException; import org.gcube.data.analysis.dataminermanagercl.shared.exception.ServiceException;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.FileParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter; import org.gcube.data.analysis.dataminermanagercl.shared.parameters.ObjectParameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter; import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularListParameter; import org.gcube.data.analysis.dataminermanagercl.shared.parameters.TabularListParameter;
@ -410,8 +411,7 @@ public class SClient4WPS extends SClient {
return processInformations; return processInformations;
} catch (Throwable e) { } catch (Throwable e) {
logger.error(e.getLocalizedMessage()); logger.error(e.getLocalizedMessage(),e);
e.printStackTrace();
throw new ServiceException(e.getLocalizedMessage(), e); throw new ServiceException(e.getLocalizedMessage(), e);
} finally { } finally {
wpsClient.disconnect(wpsProcessingServlet); wpsClient.disconnect(wpsProcessingServlet);
@ -928,8 +928,7 @@ public class SClient4WPS extends SClient {
return statusLocation; return statusLocation;
} catch (Throwable e) { } catch (Throwable e) {
logger.error(e.getLocalizedMessage()); logger.error(e.getLocalizedMessage(),e);
e.printStackTrace();
throw new ServiceException(e.getLocalizedMessage(), e); throw new ServiceException(e.getLocalizedMessage(), e);
} }
} }
@ -1041,8 +1040,7 @@ public class SClient4WPS extends SClient {
} }
} catch (Throwable e) { } catch (Throwable e) {
logger.error("MonitorProcess: " + e.getLocalizedMessage()); logger.error("MonitorProcess: " + e.getLocalizedMessage(),e);
e.printStackTrace();
throw new ServiceException(e.getLocalizedMessage(), e); throw new ServiceException(e.getLocalizedMessage(), e);
} finally { } finally {
wpsClient.disconnect(wpsProcessingServlet); wpsClient.disconnect(wpsProcessingServlet);
@ -1146,9 +1144,24 @@ public class SClient4WPS extends SClient {
if (responseWPS.getData().startsWith("http:") if (responseWPS.getData().startsWith("http:")
|| responseWPS.getData().startsWith("https:") || responseWPS.getData().startsWith("https:")
|| responseWPS.getData().startsWith("smp:")) { || responseWPS.getData().startsWith("smp:")) {
resource = new FileResource(key, responseWPS.getDescription(),
responseWPS.getDescription(), responseWPS.getData(), Parameter complexParameter = outputParameters.get(outputID);
responseWPS.getMimeType()); if (complexParameter instanceof FileParameter) {
FileParameter fileParameter = (FileParameter) complexParameter;
if (fileParameter.isNetcdf()) {
resource = new FileResource(key, responseWPS.getDescription(),
responseWPS.getDescription(), responseWPS.getData(),
responseWPS.getMimeType(), true);
} else {
resource = new FileResource(key, responseWPS.getDescription(),
responseWPS.getDescription(), responseWPS.getData(),
responseWPS.getMimeType(), false);
}
} else {
resource = new FileResource(key, responseWPS.getDescription(),
responseWPS.getDescription(), responseWPS.getData(),
responseWPS.getMimeType(), false);
}
outputResource.put(key, resource); outputResource.put(key, resource);
} else { } else {
resource = new ObjectResource(key, responseWPS.getDescription(), resource = new ObjectResource(key, responseWPS.getDescription(),
@ -1167,9 +1180,23 @@ public class SClient4WPS extends SClient {
if (responseWPS.getData().startsWith("http:") if (responseWPS.getData().startsWith("http:")
|| responseWPS.getData().startsWith("https:") || responseWPS.getData().startsWith("https:")
|| responseWPS.getData().startsWith("smp:")) { || responseWPS.getData().startsWith("smp:")) {
resource = new FileResource(key, responseWPS.getDescription(), Parameter complexParameter = outputParameters.get(outputID);
responseWPS.getDescription(), responseWPS.getData(), if (complexParameter instanceof FileParameter) {
responseWPS.getMimeType()); FileParameter fileParameter = (FileParameter) complexParameter;
if (fileParameter.isNetcdf()) {
resource = new FileResource(key, responseWPS.getDescription(),
responseWPS.getDescription(), responseWPS.getData(),
responseWPS.getMimeType(), true);
} else {
resource = new FileResource(key, responseWPS.getDescription(),
responseWPS.getDescription(), responseWPS.getData(),
responseWPS.getMimeType(), false);
}
} else {
resource = new FileResource(key, responseWPS.getDescription(),
responseWPS.getDescription(), responseWPS.getData(),
responseWPS.getMimeType(), false);
}
outputResource.put(key, resource); outputResource.put(key, resource);
} else { } else {
resource = new ObjectResource(key, responseWPS.getDescription(), resource = new ObjectResource(key, responseWPS.getDescription(),
@ -1206,7 +1233,7 @@ public class SClient4WPS extends SClient {
return result; return result;
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); logger.error(e.getLocalizedMessage(), e);
throw new ServiceException(e.getLocalizedMessage(), e); throw new ServiceException(e.getLocalizedMessage(), e);
} finally { } finally {
if (wpsClient != null) { if (wpsClient != null) {
@ -1216,6 +1243,7 @@ public class SClient4WPS extends SClient {
} }
@Override
public ComputationId resubmitComputation(Map<String, String> computationProperties) throws ServiceException { public ComputationId resubmitComputation(Map<String, String> computationProperties) throws ServiceException {
ProcessInformations processInformations; ProcessInformations processInformations;
if (computationProperties == null || computationProperties.isEmpty()) { if (computationProperties == null || computationProperties.isEmpty()) {

View File

@ -537,17 +537,20 @@ public class SClient4WPSSession implements Serializable {
URL url = new URL(urlString); URL url = new URL(urlString);
HttpURLConnection conn = (HttpURLConnection) url.openConnection(); HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST"); conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "Basic " + encoded); conn.setRequestProperty("Authorization", "Basic " + encoded);
conn.setRequestProperty("Accept-Encoding", "gzip"); conn.setRequestProperty("Accept-Encoding", "gzip");
conn.setRequestProperty("Content-Type", "text/xml"); conn.setRequestProperty("Content-Type", "text/xml; charset=UTF-8");
conn.setDoOutput(true); conn.setDoOutput(true);
obj.save(conn.getOutputStream()); obj.save(conn.getOutputStream());
InputStream input = null; InputStream input = null;
String encoding = conn.getContentEncoding(); String encoding = conn.getContentEncoding();
if (encoding != null && encoding.equalsIgnoreCase("gzip")) { if (encoding != null && encoding.equalsIgnoreCase("gzip")) {
logger.debug("Read encoding GZIP");
input = new GZIPInputStream(conn.getInputStream()); input = new GZIPInputStream(conn.getInputStream());
} else { } else {
logger.debug("Read encoding: "+encoding);
input = conn.getInputStream(); input = conn.getInputStream();
} }
return input; return input;

View File

@ -50,16 +50,16 @@ public class WPS2DM {
* @param title * @param title
* title * title
* @param minOcc * @param minOcc
* min occurences * min occurrences
* @param maxOcc * @param maxOcc
* max occurences * max occurrences
* @param rangeOccs * @param rangeOccs
* range occurences * range occurrences
* @param id * @param id
* id * id
* @param crs * @param crs
* crs * crs
* @return Parameter * @return parameter
*/ */
public static Parameter manageBoundingBoxInformation(String title, int minOcc, int maxOcc, int rangeOccs, String id, public static Parameter manageBoundingBoxInformation(String title, int minOcc, int maxOcc, int rangeOccs, String id,
String crs) { String crs) {
@ -83,7 +83,7 @@ public class WPS2DM {
* @param title * @param title
* title * title
* @param minOcc * @param minOcc
* min occurences * min occurrences
* @param maxOcc * @param maxOcc
* max occurences * max occurences
* @param rangeOccs * @param rangeOccs
@ -96,7 +96,7 @@ public class WPS2DM {
* uoms * uoms
* @param type * @param type
* type * type
* @return Parameter * @return parameter
*/ */
public static Parameter manageLiteral(String title, int minOcc, int maxOcc, int rangeOccs, String defaultValue, public static Parameter manageLiteral(String title, int minOcc, int maxOcc, int rangeOccs, String defaultValue,
String id, String uoms, DomainMetadataType type) { String id, String uoms, DomainMetadataType type) {
@ -255,18 +255,18 @@ public class WPS2DM {
* @param title * @param title
* title * title
* @param minOcc * @param minOcc
* min occurences * min occurrences
* @param maxOcc * @param maxOcc
* max occurences * max occurrences
* @param rangeOccs * @param rangeOccs
* range occurences * range occurrences
* @param id * @param id
* id * id
* @param defaultType * @param defaultType
* default type * default type
* @param supportedTypes * @param supportedTypes
* supported types * supported type
* @return Parameter * @return parameter
*/ */
public static Parameter manageComplexData(String maxMegaBytes, String title, int minOcc, int maxOcc, int rangeOccs, public static Parameter manageComplexData(String maxMegaBytes, String title, int minOcc, int maxOcc, int rangeOccs,
String id, ComplexDataDescriptionType defaultType, ComplexDataDescriptionType[] supportedTypes) { String id, ComplexDataDescriptionType defaultType, ComplexDataDescriptionType[] supportedTypes) {
@ -297,7 +297,11 @@ public class WPS2DM {
supportedMimeTypes); supportedMimeTypes);
} else { } else {
if (title.contains("[a http link to a file")) { if (title.contains("[a http link to a file")) {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes); if (title.contains("[NETCDF]")) {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
} else {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
}
} else { } else {
if (title.contains("[a sequence of http links")) { if (title.contains("[a sequence of http links")) {
Pattern pattern = Pattern.compile( Pattern pattern = Pattern.compile(
@ -317,18 +321,26 @@ public class WPS2DM {
converted = new TabularListParameter(id, title, separator, mimeType, converted = new TabularListParameter(id, title, separator, mimeType,
supportedMimeTypes); supportedMimeTypes);
} else { } else {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes); if (title.contains("[NETCDF]")) {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
} else {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
}
} }
} else { } else {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes); if (title.contains("[NETCDF]")) {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
} else {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
}
} }
} }
} }
} else { } else {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes); converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
} }
} else { } else {
converted = new FileParameter(id, title, mimeType, supportedMimeTypes); converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
} }
return converted; return converted;
} }
@ -445,7 +457,7 @@ public class WPS2DM {
* @param maxMegabytes * @param maxMegabytes
* max mega bytes * max mega bytes
* @param UoM * @param UoM
* uom * UoM
* @param minElements * @param minElements
* min elements * min elements
* @param maxElements * @param maxElements

View File

@ -33,10 +33,9 @@ public class ComputationValueBuilder {
this.valueParameters = valueParameters; this.valueParameters = valueParameters;
} }
/** /**
* *
* @return map of computation value * @return map from parameter to computation value
*/ */
public LinkedHashMap<String, ComputationValue> create() { public LinkedHashMap<String, ComputationValue> create() {
computationsValueParameters = new LinkedHashMap<String, ComputationValue>(); computationsValueParameters = new LinkedHashMap<String, ComputationValue>();
@ -97,7 +96,7 @@ public class ComputationValueBuilder {
} catch (Throwable e) { } catch (Throwable e) {
logger.error("Retrieve File Name: " + e.getLocalizedMessage()); logger.error("Retrieve File Name: " + e.getLocalizedMessage());
e.printStackTrace(); e.printStackTrace();
return new ComputationValueFile(value, null, null); return new ComputationValueFile(value, null, null,false);
} }
} }
@ -148,8 +147,12 @@ public class ComputationValueBuilder {
computationValue = new ComputationValueImage(value, fileName, computationValue = new ComputationValueImage(value, fileName,
mimeType); mimeType);
} else { } else {
computationValue = new ComputationValueFile(value, fileName, if ((mimeType != null && mimeType.compareToIgnoreCase("application/x-netcdf") == 0)
mimeType); || fileName != null && fileName.endsWith(".nc")) {
computationValue = new ComputationValueFile(value, fileName, mimeType, true);
} else {
computationValue = new ComputationValueFile(value, fileName, mimeType, false);
}
} }
return computationValue; return computationValue;

View File

@ -12,12 +12,7 @@ public class Constants {
public static final String DEFAULT_USER = "giancarlo.panichi"; public static final String DEFAULT_USER = "giancarlo.panichi";
public final static String DEFAULT_SCOPE = "/gcube/devNext/NextNext"; public final static String DEFAULT_SCOPE = "/gcube/devNext/NextNext";
public final static String DEFAULT_TOKEN = "ae1208f0-210d-47c9-9b24-d3f2dfcce05f-98187548"; public final static String DEFAULT_TOKEN = "";
//public final static String DEFAULT_SCOPE = "/gcube/preprod/preVRE";
//public final static String DEFAULT_TOKEN = "04269c7d-dab7-498a-841d-8d38ae2d482b-98187548";
public static final String DATAMINER_SERVICE_CATEGORY = "DataAnalysis"; public static final String DATAMINER_SERVICE_CATEGORY = "DataAnalysis";
public static final String DATA_MINER_SERVICE_NAME = "DataMiner"; public static final String DATA_MINER_SERVICE_NAME = "DataMiner";

View File

@ -11,15 +11,17 @@ public class ComputationValueFile extends ComputationValue {
private String fileName; private String fileName;
private String mimeType; private String mimeType;
private boolean netcdf;
public ComputationValueFile() { public ComputationValueFile() {
super(ComputationValueType.File); super(ComputationValueType.File);
} }
public ComputationValueFile(String url, String fileName, String mimeType) { public ComputationValueFile(String url, String fileName, String mimeType, boolean netcdf) {
super(ComputationValueType.File, url); super(ComputationValueType.File, url);
this.fileName = fileName; this.fileName = fileName;
this.mimeType = mimeType; this.mimeType = mimeType;
this.netcdf = netcdf;
} }
public String getFileName() { public String getFileName() {
@ -38,12 +40,17 @@ public class ComputationValueFile extends ComputationValue {
this.mimeType = mimeType; this.mimeType = mimeType;
} }
@Override public boolean isNetcdf() {
public String toString() { return netcdf;
return "ComputationValueFile [fileName=" + fileName + ", mimeType="
+ mimeType + ", type=" + type + ", value=" + value + "]";
} }
public void setNetcdf(boolean netcdf) {
this.netcdf = netcdf;
}
@Override
public String toString() {
return "ComputationValueFile [fileName=" + fileName + ", mimeType=" + mimeType + ", netcdf=" + netcdf + "]";
}
} }

View File

@ -18,6 +18,7 @@ public class FileResource extends Resource {
private String url; private String url;
private String mimeType; private String mimeType;
private boolean netcdf;
/** /**
* *
@ -39,11 +40,15 @@ public class FileResource extends Resource {
* url * url
* @param mimeType * @param mimeType
* mime type * mime type
* @param netcdf
* netcdf
*/ */
public FileResource(String resourceId, String name, String description, String url, String mimeType) { public FileResource(String resourceId, String name, String description, String url, String mimeType,
boolean netcdf) {
super(resourceId, name, description, ResourceType.FILE); super(resourceId, name, description, ResourceType.FILE);
this.url = url; this.url = url;
this.mimeType = mimeType; this.mimeType = mimeType;
this.netcdf = netcdf;
} }
/** /**
@ -76,11 +81,33 @@ public class FileResource extends Resource {
this.mimeType = mimeType; this.mimeType = mimeType;
} }
@Override /**
public String toString() { *
return "FileResource [url=" + url + ", mimeType=" + mimeType + ", getResourceId()=" + getResourceId() * @return true if is NetCDF file
+ ", getName()=" + getName() + ", getDescription()=" + getDescription() + ", getResourceType()=" */
+ getResourceType() + "]"; public boolean isNetcdf() {
return netcdf;
} }
/**
*
* @param netcdf
* true if is NetCDF file
*/
public void setNetcdf(boolean netcdf) {
this.netcdf = netcdf;
}
@Override
public String toString() {
return "FileResource [url=" + url + ", mimeType=" + mimeType + ", netcdf=" + netcdf + ", getResourceId()="
+ getResourceId() + ", getName()=" + getName() + ", getDescription()=" + getDescription()
+ ", getResourceType()=" + getResourceType() + ", isTabular()=" + isTabular() + ", isObject()="
+ isObject() + ", isFile()=" + isFile() + ", isMap()=" + isMap() + ", isImages()=" + isImages()
+ ", toString()=" + super.toString() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode()
+ "]";
}
} }

View File

@ -16,6 +16,7 @@ public class FileParameter extends Parameter {
private static final long serialVersionUID = -2967577990287112937L; private static final long serialVersionUID = -2967577990287112937L;
private String defaultMimeType; private String defaultMimeType;
private ArrayList<String> supportedMimeTypes; private ArrayList<String> supportedMimeTypes;
private boolean netcdf;
/** /**
* *
@ -23,6 +24,7 @@ public class FileParameter extends Parameter {
public FileParameter() { public FileParameter() {
super(); super();
this.typology = ParameterType.FILE; this.typology = ParameterType.FILE;
netcdf = false;
} }
/** /**
@ -34,13 +36,16 @@ public class FileParameter extends Parameter {
* @param defaultMimeType * @param defaultMimeType
* default mime type * default mime type
* @param supportedMimeTypes * @param supportedMimeTypes
* supported mime type * supported mime types
* @param netcdf
* is netcdf file
*/ */
public FileParameter(String name, String description, String defaultMimeType, public FileParameter(String name, String description, String defaultMimeType, ArrayList<String> supportedMimeTypes,
ArrayList<String> supportedMimeTypes) { boolean netcdf) {
super(name, ParameterType.FILE, description); super(name, ParameterType.FILE, description);
this.defaultMimeType = defaultMimeType; this.defaultMimeType = defaultMimeType;
this.supportedMimeTypes = supportedMimeTypes; this.supportedMimeTypes = supportedMimeTypes;
this.netcdf = netcdf;
} }
public String getDefaultMimeType() { public String getDefaultMimeType() {
@ -59,11 +64,19 @@ public class FileParameter extends Parameter {
this.supportedMimeTypes = supportedMimeTypes; this.supportedMimeTypes = supportedMimeTypes;
} }
public boolean isNetcdf() {
return netcdf;
}
public void setNetcdf(boolean netcdf) {
this.netcdf = netcdf;
}
@Override @Override
public String toString() { public String toString() {
return "FileParameter [value=" + value + ", defaultMimeType=" + defaultMimeType + ", supportedMimeTypes=" return "FileParameter [defaultMimeType=" + defaultMimeType + ", supportedMimeTypes=" + supportedMimeTypes
+ supportedMimeTypes + ", name=" + name + ", description=" + description + ", typology=" + typology + ", netcdf=" + netcdf + ", name=" + name + ", description=" + description + ", typology=" + typology
+ "]"; + ", value=" + value + "]";
} }
} }

View File

@ -3,13 +3,7 @@
<inherits name='com.google.gwt.user.User' /> <inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.http.HTTP" /> <inherits name="com.google.gwt.http.HTTP" />
<!-- <inherits name='com.google.gwt.user.theme.clean.Clean' /> -->
<inherits name='com.sencha.gxt.ui.GXT' />
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
<!-- <inherits name="com.google.gwt.logging.Logging" /> -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
<!-- <!--
<entry-point <entry-point
class='org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManager' /> class='org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManager' />
@ -19,11 +13,12 @@
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED" value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
/> --> /> -->
<!--
<set-property name="log_ConsoleLogger" value="DISABLED" /> <set-property name="log_ConsoleLogger" value="DISABLED" />
<set-property name="log_DivLogger" value="DISABLED" /> <set-property name="log_DivLogger" value="DISABLED" />
<set-property name="log_GWTLogger" value="DISABLED" /> <set-property name="log_GWTLogger" value="DISABLED" />
<set-property name="log_SystemLogger" value="DISABLED" /> <set-property name="log_SystemLogger" value="DISABLED" />
-->