Class UriResolverReaderParameter
- java.lang.Object
-
- org.gcube.applicationsupportlayer.social.storage.UriResolverReaderParameter
-
public class UriResolverReaderParameter extends Object
- Author:
- Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.log4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description UriResolverReaderParameter(String context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBaseUri()StringgetContentTypeParameter()StringgetFileNameParameter()Map<String,String>getHashParemeters(String smp, String fileName, String contentType)StringgetQuery()StringgetSmpParameter()booleanisAvailable()InputStreamresolveAsInputStream(String smp, String fileName, String contentType)Resolve - open stream with http get methodStringresolveAsUriRequest(String smp, String fileName, String contentType, boolean encodeParams)StringtoString()
-
-
-
Method Detail
-
resolveAsInputStream
public InputStream resolveAsInputStream(String smp, String fileName, String contentType) throws Exception
Resolve - open stream with http get method- Parameters:
smp-- Returns:
- Throws:
IOExceptionException
-
resolveAsUriRequest
public String resolveAsUriRequest(String smp, String fileName, String contentType, boolean encodeParams) throws Exception
- Parameters:
smp-fileName-contentType-encodeParams- - if true, translates a string intoapplication/x-www-form-urlencodedformat using a specific encoding scheme- Returns:
- the http url to get file
- Throws:
Exception
-
getHashParemeters
public Map<String,String> getHashParemeters(String smp, String fileName, String contentType) throws Exception
- Parameters:
smp-fileName-contentType-- Returns:
- Throws:
Exception
-
isAvailable
public boolean isAvailable()
-
getBaseUri
public String getBaseUri()
-
getSmpParameter
public String getSmpParameter()
-
getFileNameParameter
public String getFileNameParameter()
-
getContentTypeParameter
public String getContentTypeParameter()
-
getQuery
public String getQuery()
-
-