added javadoc

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@122234 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2016-01-14 16:40:47 +00:00
parent 2259c746c8
commit 56ab11b3ec
3 changed files with 123 additions and 4 deletions

View File

@ -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="

View File

@ -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);
}
}

View File

@ -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 + "'" +