dods.clients.importwizard
Class DodsURL

java.lang.Object
  extended by dods.clients.importwizard.DodsURL

public class DodsURL
extends Object

A DodsURL stores information about a Dods URL. More specifially, it stores the base url, the constraint expression, the type of URL, and what class is need to get further information from the URL. It should be used over String to represent Dods URLs whenever possible.

Author:
rhonhart

Field Summary
static int CATALOG_URL
           
static int DATA_URL
           
protected static String DEFAULT_CATALOG_PROCESSOR
           
protected static String DEFAULT_DATA_PROCESSOR
           
protected static String DEFAULT_DIRECTORY_PROCESSOR
           
static int DIRECTORY_URL
           
 
Constructor Summary
DodsURL()
          Create an empty DodsURL.
DodsURL(DodsURL dodsURL)
          Create a DodsURL by copying an existing DodsURL
DodsURL(String dodsURL, int type)
          Create a DodsURL with a specific base URL of type type.
DodsURL(String dodsURL, int type, String processorName)
          Create a DodsURL with a specific base URL of type type.
DodsURL(String dodsURL, String dodsCE)
          Create a DodsURL with a specific base URL and constraint expression.
 
Method Summary
 String getBaseURL()
          Returns the base URL of the DodsURL.
 String getConstraintExpression()
          Returns the CE of the DodsURL.
 String getFullURL()
          Concatenates the baseURL and the constraint expression to get the full Dods URL.
 String getProcessorName()
          Returns the name of the class needed to further process the URL.
 String getTitle()
          Returns the title, if any, of the URL.
 int getType()
          Returns the type of the URL.
 boolean hasBeenProcessed()
          Returns true if the URL has been processed yet, false otherwise.
 void setConstraintExpression(String dodsCE)
          Set the constraint expression for the URL.
 void setProcessed(boolean isDoneProcessing)
          Set whether or not the URL has been processed.
 void setProcessorName(String className)
          Set the name of the class needed to process the URL.
 void setTitle(String urlTitle)
          Set the title of the URL.
 void setType(int type)
          Set the type of the URL.
 void setURL(String dodsURL)
          Set the base URL
 String toString()
          Create a string representation of the URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_URL

public static int DATA_URL

DIRECTORY_URL

public static int DIRECTORY_URL

CATALOG_URL

public static int CATALOG_URL

DEFAULT_DATA_PROCESSOR

protected static String DEFAULT_DATA_PROCESSOR

DEFAULT_DIRECTORY_PROCESSOR

protected static String DEFAULT_DIRECTORY_PROCESSOR

DEFAULT_CATALOG_PROCESSOR

protected static String DEFAULT_CATALOG_PROCESSOR
Constructor Detail

DodsURL

public DodsURL()
Create an empty DodsURL.


DodsURL

public DodsURL(DodsURL dodsURL)
Create a DodsURL by copying an existing DodsURL

Parameters:
dodsURL - The url to copy.

DodsURL

public DodsURL(String dodsURL,
               String dodsCE)
Create a DodsURL with a specific base URL and constraint expression. This url is assumed to be a DATA_URL, and it uses the default DATA_URL processor.

Parameters:
dodsURL - The base url.
dodsCE - The constraint expression.

DodsURL

public DodsURL(String dodsURL,
               int type)
Create a DodsURL with a specific base URL of type type. The constraint expression is set to an empty string and the urlProcessor is set to the default for the give type.

Parameters:
dodsURL - The base url.
type - The type of URL.

DodsURL

public DodsURL(String dodsURL,
               int type,
               String processorName)
Create a DodsURL with a specific base URL of type type. The constraint expression is set to an empty string and the urlProcessor is set to processorName.

Parameters:
dodsURL - The base url.
type - The type of URL.
processorName - The name of the class needed to further process the URL.
Method Detail

getBaseURL

public String getBaseURL()
Returns the base URL of the DodsURL.

Returns:
the base URL of the DodsURL.

getConstraintExpression

public String getConstraintExpression()
Returns the CE of the DodsURL.

Returns:
the CE of the DodsURL.

getFullURL

public String getFullURL()
Concatenates the baseURL and the constraint expression to get the full Dods URL.

Returns:
a complete Dods URL.

getProcessorName

public String getProcessorName()
Returns the name of the class needed to further process the URL.

Returns:
the name of the class needed to further process the URL.

getTitle

public String getTitle()
Returns the title, if any, of the URL.

Returns:
the title, if any, of the URL.

getType

public int getType()
Returns the type of the URL.

Returns:
the type of the URL.

hasBeenProcessed

public boolean hasBeenProcessed()
Returns true if the URL has been processed yet, false otherwise.

Returns:
true if the URL has been processed yet, false otherwise.

toString

public String toString()
Create a string representation of the URL.

Overrides:
toString in class Object
Returns:
The base URL.

setConstraintExpression

public void setConstraintExpression(String dodsCE)
Set the constraint expression for the URL.

Parameters:
dodsCE - The constraint expression.

setProcessorName

public void setProcessorName(String className)
Set the name of the class needed to process the URL.

Parameters:
className - the name of the class needed to process the URL.

setProcessed

public void setProcessed(boolean isDoneProcessing)
Set whether or not the URL has been processed. This is used by the DodsURLList class (as well as others) to let the user know which urls have had a constraint expression applied

Parameters:
isDoneProcessing - Whether or not the URL has been processed.

setTitle

public void setTitle(String urlTitle)
Set the title of the URL.

Parameters:
urlTitle - The title of the URL.

setType

public void setType(int type)
Set the type of the URL. Additionally, if no processor has been set, this function will set it to the default processor for type type.

Parameters:
type - The type of URL.

setURL

public void setURL(String dodsURL)
Set the base URL

Parameters:
dodsURL - the base URL.