org.gcube.resource.discovery.urlFilter
Class UrlFilter

java.lang.Object
  extended by org.gcube.resource.discovery.urlFilter.UrlFilter

public class UrlFilter
extends java.lang.Object


Constructor Summary
UrlFilter()
           
 
Method Summary
static boolean checkExtension(java.lang.String url)
           
static boolean checkMimeType(java.lang.String url)
           
static boolean checkMimeTypeProvided(java.lang.String mimeType)
           
static java.lang.String getMimeType(java.lang.String resourceURL)
           
static java.util.Collection<java.lang.String> getRequestedMimeTypes()
           
static boolean isUrl(java.lang.String str)
           
static void main(java.lang.String[] args)
           
static int rand(int lo, int hi)
           
static java.lang.String resolveRedirections(java.lang.String resourceURL)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlFilter

public UrlFilter()
Method Detail

getRequestedMimeTypes

public static java.util.Collection<java.lang.String> getRequestedMimeTypes()

isUrl

public static boolean isUrl(java.lang.String str)

getMimeType

public static java.lang.String getMimeType(java.lang.String resourceURL)
                                    throws java.lang.InterruptedException,
                                           java.io.IOException
Throws:
java.lang.InterruptedException
java.io.IOException

rand

public static int rand(int lo,
                       int hi)

checkExtension

public static boolean checkExtension(java.lang.String url)

checkMimeTypeProvided

public static boolean checkMimeTypeProvided(java.lang.String mimeType)

checkMimeType

public static boolean checkMimeType(java.lang.String url)
                             throws java.io.IOException,
                                    java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

resolveRedirections

public static java.lang.String resolveRedirections(java.lang.String resourceURL)
                                            throws java.io.IOException,
                                                   java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception