org.mindswap.pellet.utils
Class URIUtils
java.lang.Object
org.mindswap.pellet.utils.URIUtils
public class URIUtils
- extends java.lang.Object
Utility functions for URI's.
- Author:
- Evren Sirin
Method Summary |
static java.lang.String |
getFilePart(java.lang.String uri)
|
static java.lang.String |
getLocalName(java.lang.String uri)
Return the local name of a URI string. |
static java.lang.String |
getLocalName(java.net.URI uri)
Return the local name of a URI. |
static java.lang.String |
getNameSpace(java.lang.String uri)
|
static java.lang.String |
getNameSpace(java.net.URI uri)
|
static java.lang.String |
getQName(java.lang.String uri)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URIUtils
public URIUtils()
getQName
public static java.lang.String getQName(java.lang.String uri)
getFilePart
public static java.lang.String getFilePart(java.lang.String uri)
getLocalName
public static java.lang.String getLocalName(java.net.URI uri)
- Return the local name of a URI. This function is not equiavlent to
URI.getFragment() because it tries to handle handle slashy URI's
such as the ones found in Dublin Core. It is equiavalent to
getLocalName(uri.toString()).
- Parameters:
uri
-
- Returns:
getLocalName
public static java.lang.String getLocalName(java.lang.String uri)
- Return the local name of a URI string. This naive implementation splits
the URI from the position of a '#' character or the last occurunce of
'/' character. If neither of these characters are found, the parameter
itself is returned.
- Parameters:
uri
-
- Returns:
getNameSpace
public static java.lang.String getNameSpace(java.net.URI uri)
getNameSpace
public static java.lang.String getNameSpace(java.lang.String uri)
Copyright © 2007-2009 Natalya Keberle. All Rights Reserved.