com.ge.research.acuity.utils
Class StringUtils

java.lang.Object
  extended bycom.ge.research.utils.StringUtils
      extended bycom.ge.research.acuity.utils.StringUtils

public class StringUtils
extends StringUtils

String utilities for acuity ui models, with specific convienence methods for formatting and manipulating ontology URI strings, and parsing acuity client HttpServletRequest parameters.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:35 $
Author:
garbiras

Field Summary
 
Fields inherited from class com.ge.research.utils.StringUtils
DOUBLEQUOTE, EMPTY_STRING, LOWERCASE_LETTERS, NEWLINE, SINGLEQUOTE, SPACE, TAB, UPPERCASE_LETTERS
 
Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String extractSubjectPropertyfromRequestParameter(java.lang.String requestParameter)
          Strips the leading characters from an HttpServletRequest string before the first appearance of the AcuityConstants.PARAM_DELIMITER string
static java.lang.String extractURIfromRequestParameter(java.lang.String requestParameter)
          Strips the trailing characters from an HttpServletRequest string after the first appearance of the AcuityConstants.PARAM_DELIMITER string
static java.lang.String getNamespacePrefix(java.lang.String type)
          Returns the leading namespace prefix from the type
static java.lang.String getURINamespace(java.lang.String uri)
          Returns the leading namespace from the uri
static java.lang.String makeHumanReadableURI(java.lang.String uri)
          Invokes the StringUtils.separateInitCapString(java.lang.String) method on the string returned from a call to stripURINamespace(java.lang.String) on the uri argument
static java.lang.String stripNamespacePrefix(java.lang.String type)
          Strips the leading namespace prefix from the type
static java.lang.String stripURINamespace(java.lang.String uri)
          Strips the leading namespace from the uri
 
Methods inherited from class com.ge.research.utils.StringUtils
initCap, isNullOrEmpty, separateInitCapString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

extractSubjectPropertyfromRequestParameter

public static java.lang.String extractSubjectPropertyfromRequestParameter(java.lang.String requestParameter)
Strips the leading characters from an HttpServletRequest string before the first appearance of the AcuityConstants.PARAM_DELIMITER string

Parameters:
requestParameter - the request string to parse
Returns:
The ontology property identification portion of the request parameter

extractURIfromRequestParameter

public static java.lang.String extractURIfromRequestParameter(java.lang.String requestParameter)
Strips the trailing characters from an HttpServletRequest string after the first appearance of the AcuityConstants.PARAM_DELIMITER string

Parameters:
requestParameter - the request string to parse
Returns:
The ontology URI identification portion of the request parameter

getNamespacePrefix

public static java.lang.String getNamespacePrefix(java.lang.String type)
Returns the leading namespace prefix from the type

Parameters:
type - the ontology type string to parse
Returns:
The namespace prefix without the trailing type information.

getURINamespace

public static java.lang.String getURINamespace(java.lang.String uri)
Returns the leading namespace from the uri

Parameters:
uri - the URI string to parse
Returns:
The URI namespace information without the trailing instance information.

makeHumanReadableURI

public static java.lang.String makeHumanReadableURI(java.lang.String uri)
Invokes the StringUtils.separateInitCapString(java.lang.String) method on the string returned from a call to stripURINamespace(java.lang.String) on the uri argument

Parameters:
uri - the URI string to parse
Returns:
The URI local name with init cap sequences separated by whitespace
See Also:
StringUtils.separateInitCapString(java.lang.String), stripURINamespace(java.lang.String)

stripNamespacePrefix

public static java.lang.String stripNamespacePrefix(java.lang.String type)
Strips the leading namespace prefix from the type

Parameters:
type - the ontology type string to parse
Returns:
The type without the leading namespace prefix. Equivalent to the type localname.

stripURINamespace

public static java.lang.String stripURINamespace(java.lang.String uri)
Strips the leading namespace from the uri

Parameters:
uri - the URI string to parse
Returns:
The URI without the leading namespace information. Equivalent to the URI localname.