diff --git a/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/ApplicationProfile.java b/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/ApplicationProfile.java index 0d8c47f..c27b943 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/ApplicationProfile.java +++ b/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/ApplicationProfile.java @@ -2,6 +2,12 @@ package org.gcube.datatransfer.resolver.applicationprofile; import java.io.Serializable; +/** + * The Class ApplicationProfile. + * + * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it + * Jan 14, 2016 + */ public class ApplicationProfile implements Serializable { @@ -17,10 +23,23 @@ public class ApplicationProfile implements Serializable { private String scope; private String url; + /** + * Instantiates a new application profile. + */ public ApplicationProfile() { super(); } + /** + * Instantiates a new application profile. + * + * @param key the key + * @param name the name + * @param description the description + * @param imageUrl the image url + * @param scope the scope + * @param url the url + */ public ApplicationProfile(String key, String name, String description, String imageUrl, String scope, String url) { super(); this.key = key; @@ -30,43 +49,118 @@ public class ApplicationProfile implements Serializable { this.scope = scope; this.url = url; } + + /** + * Gets the key. + * + * @return the key + */ public String getKey() { return key; } + + /** + * Sets the key. + * + * @param key the new key + */ public void setKey(String key) { this.key = key; } + + /** + * Gets the name. + * + * @return the name + */ public String getName() { return name; } + + /** + * Sets the name. + * + * @param name the new name + */ public void setName(String name) { this.name = name; } + + /** + * Gets the description. + * + * @return the description + */ public String getDescription() { return description; } + + /** + * Sets the description. + * + * @param description the new description + */ public void setDescription(String description) { this.description = description; } + + /** + * Gets the image url. + * + * @return the image url + */ public String getImageUrl() { return imageUrl; } + + /** + * Sets the image url. + * + * @param imageUrl the new image url + */ public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } + + /** + * Gets the scope. + * + * @return the scope + */ public String getScope() { return scope; } + + /** + * Sets the scope. + * + * @param scope the new scope + */ public void setScope(String scope) { this.scope = scope; } + /** + * Gets the url. + * + * @return the url + */ public String getUrl() { return url; } + + /** + * Sets the url. + * + * @param url the new url + */ public void setUrl(String url) { this.url = url; } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ @Override public String toString() { return "ApplicationProfile [key=" + key + ", name=" + name + ", description=" diff --git a/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/ApplicationProfileNotFoundException.java b/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/ApplicationProfileNotFoundException.java index 537d635..bdfb608 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/ApplicationProfileNotFoundException.java +++ b/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/ApplicationProfileNotFoundException.java @@ -1,8 +1,20 @@ package org.gcube.datatransfer.resolver.applicationprofile; +/** + * The Class ApplicationProfileNotFoundException. + * + * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it + * Jan 14, 2016 + */ @SuppressWarnings("serial") public class ApplicationProfileNotFoundException extends Exception { - public ApplicationProfileNotFoundException(String message) { + + /** + * Instantiates a new application profile not found exception. + * + * @param message the message + */ + public ApplicationProfileNotFoundException(String message) { super(message); } } \ No newline at end of file diff --git a/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/GcubeQuery.java b/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/GcubeQuery.java index f8f869f..0ebd6c5 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/GcubeQuery.java +++ b/src/main/java/org/gcube/datatransfer/resolver/applicationprofile/GcubeQuery.java @@ -1,10 +1,23 @@ package org.gcube.datatransfer.resolver.applicationprofile; +/** + * The Class GcubeQuery. + * + * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it + * Jan 14, 2016 + */ public class GcubeQuery { - - + + + /** + * Gets the gcube generic query string. + * + * @param secondaryType the secondary type + * @param appId the app id + * @return the gcube generic query string + */ public static String getGcubeGenericQueryString(String secondaryType, String appId){ - + return "for $profile in collection('/db/Profiles/GenericResource')//Resource " + "where $profile/Profile/SecondaryType/string() eq '"+secondaryType+"' and $profile/Profile/Body/AppId/string() " + " eq '" + appId + "'" +