public class MetacatURL
extends java.lang.Object
Constructor and Description |
---|
MetacatURL(java.lang.String url)
This constructor takes a string url and parses it according to the
following rules.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getHashParam(java.lang.String paramname)
returns a single parameter from the hash by name
|
java.util.Hashtable |
getHashParams()
Returns the parameters in a hashtable.
|
java.lang.String[] |
getParam(int index)
Returns a single parameter and value as a 1D string array.
|
java.lang.String[][] |
getParams()
Returns the parameters as a 2D string array.
|
java.lang.String |
getProtocol()
Returns the type of the url.
|
static void |
main(java.lang.String[] args)
Test method for this class.
|
void |
printHashParams() |
void |
printParams()
Prints the parameters neatly to system.out
|
java.lang.String |
toString()
returns a string representation of this metacatURL
|
public MetacatURL(java.lang.String url) throws java.net.MalformedURLException
url
- the string to parsejava.net.MalformedURLException
public java.lang.String getProtocol()
public java.lang.String[][] getParams()
public java.util.Hashtable getHashParams()
public java.lang.Object getHashParam(java.lang.String paramname)
paramname
- the name of the parameter to return.public java.lang.String toString()
toString
in class java.lang.Object
public void printHashParams()
public void printParams()
public java.lang.String[] getParam(int index)
index
- the index of the parameter, value array that you want.public static void main(java.lang.String[] args)
Copyright © 2020 Regents of the University of California. All Rights Reserved.