edu.ucsb.nceas.metacat.advancedsearch
Class MetacatHelper

java.lang.Object
  extended by edu.ucsb.nceas.metacat.advancedsearch.MetacatHelper

public class MetacatHelper
extends java.lang.Object

Author:
dcosta MetacatHelper provides auxiliary methods for helping the advanced search classes interact with Metacat.

Constructor Summary
MetacatHelper()
           
 
Method Summary
 java.lang.String constructDN(java.lang.String username, java.lang.String organization)
          Constructs a DN (Distinguished Name) string for the ecoinformatics.org LDAP.
 java.lang.String constructMetacatURL(java.lang.String serverName, int serverPort, java.lang.String contextString)
          Constructs a URL to the metacat servlet.
 java.lang.String getResultsetXSL(javax.servlet.http.HttpServletRequest request)
          Gets the path to the resultset XSL file.
 java.lang.String getResultsJSP()
          Gets the relative path to the advancedsearchresults.jsp file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetacatHelper

public MetacatHelper()
Method Detail

constructDN

public java.lang.String constructDN(java.lang.String username,
                                    java.lang.String organization)
Constructs a DN (Distinguished Name) string for the ecoinformatics.org LDAP.

Parameters:
username - The LDAP uid, e.g. "dcosta"
organization - The LDAP organization, e.g. "LTER"
Returns:
DN The distinguished name string.

constructMetacatURL

public java.lang.String constructMetacatURL(java.lang.String serverName,
                                            int serverPort,
                                            java.lang.String contextString)
Constructs a URL to the metacat servlet.

Parameters:
serverName - A server name, e.g. "prairie.lternet.edu"
serverPort - A server port, e.g. 8080. If no port is required in the URL, pass a 0 and the argument will be ignored.
contextString - The context under which metacat is running, e.g. "knb".
Returns:
metacatURL The URL to the metacat servlet.

getResultsJSP

public java.lang.String getResultsJSP()
Gets the relative path to the advancedsearchresults.jsp file.

Returns:
resultsJSP The relative path to the advanced search results JSP.

getResultsetXSL

public java.lang.String getResultsetXSL(javax.servlet.http.HttpServletRequest request)
Gets the path to the resultset XSL file.

Parameters:
request - The HttpServletRequest object.
Returns:
xslPath The real path to the resultset XSL file.


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.