|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.xmldb.XmldbURI
public class XmldbURI
A utility class for xmldb URis. Since, java.net.URI is final this class acts as a wrapper.
Field Summary | |
---|---|
static String |
API_LOCAL
|
static String |
API_REST
|
static String |
API_WEBDAV
|
static String |
API_XMLRPC
|
static XmldbURI |
CONFIG_COLLECTION_URI
|
static String |
DEFAULT_INSTANCE_NAME
|
static String |
EMBEDDED_SERVER_AUTHORITY
|
static XmldbURI |
EMBEDDED_SERVER_URI
|
static XmldbURI |
EMPTY_URI
|
static XmldbURI |
METADATA_COLLECTION_URI
|
static int |
NO_PORT
|
static XmldbURI |
RELATIVE_ROOT_COLLECTION_URI
|
static XmldbURI |
ROOT_COLLECTION_CONFIG_URI
|
static XmldbURI |
ROOT_COLLECTION_URI
|
static XmldbURI |
SYSTEM_COLLECTION_URI
|
static XmldbURI |
TEMP_COLLECTION_URI
|
static String |
XMLDB_SCHEME
|
static String |
XMLDB_URI_PREFIX
|
Method Summary | |
---|---|
XmldbURI |
append(String uri)
|
XmldbURI |
append(XmldbURI uri)
|
XmldbURI |
appendInternal(XmldbURI uri)
|
static String |
checkPath(String currentPath,
String parentPath)
|
static String |
checkPath2(String fileName,
String parentPath)
Deprecated. Legacy method used here and there in the code |
int |
compareTo(Object ob)
|
static XmldbURI |
create(String uri)
|
static XmldbURI |
create(String accessURI,
String collectionPath)
|
static XmldbURI |
create(URI uri)
|
static XmldbURI |
createInternal(String collectionPath)
|
boolean |
endsWith(String string)
|
boolean |
endsWith(XmldbURI xmldbUri)
|
boolean |
equals(Object ob)
|
boolean |
equalsInternal(XmldbURI other)
|
String |
getApiName()
|
String |
getAuthority()
|
String |
getCollectionPath()
|
String |
getContext()
|
String |
getFragment()
|
String |
getHost()
|
String |
getInstanceName()
|
static String[] |
getPathComponents(String collectionPath)
|
XmldbURI[] |
getPathSegments()
This function returns a relative XmldbURI with the value after the last / in the collection path of the URI |
int |
getPort()
|
String |
getQuery()
|
String |
getRawAuthority()
|
String |
getRawCollectionPath()
Method to return the collection path with reserved characters percent encoded |
String |
getRawFragment()
|
String |
getRawQuery()
|
String |
getRawUserInfo()
|
URI |
getURI()
This returns a proper heirarchical URI - the xmldb scheme is trimmed from the beginning. |
String |
getUserInfo()
|
URI |
getXmldbURI()
This returns an xmldb uri. |
int |
hashCode()
|
boolean |
isAbsolute()
|
boolean |
isCollectionPathAbsolute()
|
boolean |
isContextAbsolute()
|
XmldbURI |
lastSegment()
This function returns a relative XmldbURI with the value after the last / in the collection path of the URI |
String |
makeAbsolute(String name)
Deprecated. Legacy method used here and there in the code and copied as such |
static String |
normalizeCollectionName(String name)
Deprecated. Legacy method used here and there in the code and copied as such |
XmldbURI |
normalizeCollectionPath()
|
XmldbURI |
normalizeContext()
|
int |
numSegments()
This function returns a relative XmldbURI with the value after the last / in the collection path of the URI |
XmldbURI |
prepend(XmldbURI xmldbUri)
|
static String |
recoverPseudoURIs(String pseudoURI)
Deprecated. By definition, using this method is strongly discouraged |
URI |
relativizeCollectionPath(URI uri)
|
URI |
relativizeContext(URI uri)
|
XmldbURI |
removeLastSegment()
This function returns a string with everything after the last / removed |
URI |
resolveCollectionPath(URI uri)
|
XmldbURI |
resolveCollectionPath(XmldbURI child)
|
URI |
resolveContext(String str)
|
URI |
resolveContext(URI uri)
|
boolean |
startsWith(String string)
|
boolean |
startsWith(XmldbURI xmldbUri)
|
String |
toASCIIString()
|
XmldbURI |
toCollectionPathURI()
|
String |
toString()
|
URL |
toURL()
|
XmldbURI |
trimFromBeginning(String string)
|
XmldbURI |
trimFromBeginning(XmldbURI xmldbUri)
|
static XmldbURI |
xmldbUriFor(String xmldbURI)
|
static XmldbURI |
xmldbUriFor(String xmldbURI,
boolean escape)
|
static XmldbURI |
xmldbUriFor(String accessURI,
String collectionPath)
|
static XmldbURI |
xmldbUriFor(URI uri)
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NO_PORT
public static final String XMLDB_SCHEME
public static final String XMLDB_URI_PREFIX
public static final String DEFAULT_INSTANCE_NAME
public static final String EMBEDDED_SERVER_AUTHORITY
public static final XmldbURI ROOT_COLLECTION_URI
public static final XmldbURI RELATIVE_ROOT_COLLECTION_URI
public static final XmldbURI SYSTEM_COLLECTION_URI
public static final XmldbURI CONFIG_COLLECTION_URI
public static final XmldbURI ROOT_COLLECTION_CONFIG_URI
public static final XmldbURI METADATA_COLLECTION_URI
public static final XmldbURI TEMP_COLLECTION_URI
public static final XmldbURI EMPTY_URI
public static final XmldbURI EMBEDDED_SERVER_URI
public static final String API_XMLRPC
public static final String API_WEBDAV
public static final String API_REST
public static final String API_LOCAL
Method Detail |
---|
public static XmldbURI xmldbUriFor(URI uri) throws URISyntaxException
URISyntaxException
public static XmldbURI xmldbUriFor(String xmldbURI) throws URISyntaxException
URISyntaxException
public static XmldbURI xmldbUriFor(String xmldbURI, boolean escape) throws URISyntaxException
URISyntaxException
public static XmldbURI xmldbUriFor(String accessURI, String collectionPath) throws URISyntaxException
URISyntaxException
public static XmldbURI create(URI uri)
public static XmldbURI create(String uri)
public static XmldbURI create(String accessURI, String collectionPath)
public static XmldbURI createInternal(String collectionPath)
public URI getURI()
getXmldbURI(java.net.URI)
public URI getXmldbURI()
public String getInstanceName()
public String getRawCollectionPath()
public String getCollectionPath()
public XmldbURI toCollectionPathURI()
public String getApiName()
public String getContext()
public int compareTo(Object ob) throws ClassCastException
compareTo
in interface Comparable
ClassCastException
public XmldbURI lastSegment()
public int numSegments()
public XmldbURI[] getPathSegments()
public XmldbURI removeLastSegment()
public XmldbURI append(String uri)
public XmldbURI append(XmldbURI uri)
public XmldbURI appendInternal(XmldbURI uri)
public static String recoverPseudoURIs(String pseudoURI) throws URISyntaxException
pseudoURI
- What is supposed to be a URI
URISyntaxException
public boolean equals(Object ob)
equals
in class Object
public boolean equalsInternal(XmldbURI other)
public boolean isAbsolute()
public boolean isContextAbsolute()
public XmldbURI normalizeContext()
public URI relativizeContext(URI uri)
public URI resolveContext(String str) throws NullPointerException, IllegalArgumentException
NullPointerException
IllegalArgumentException
public URI resolveContext(URI uri) throws NullPointerException
NullPointerException
public boolean isCollectionPathAbsolute()
public XmldbURI normalizeCollectionPath()
public URI relativizeCollectionPath(URI uri)
public XmldbURI resolveCollectionPath(XmldbURI child) throws NullPointerException, IllegalArgumentException
NullPointerException
IllegalArgumentException
public URI resolveCollectionPath(URI uri) throws NullPointerException
NullPointerException
public String toASCIIString()
public URL toURL() throws IllegalArgumentException, MalformedURLException
IllegalArgumentException
MalformedURLException
public boolean startsWith(XmldbURI xmldbUri)
public boolean startsWith(String string) throws URISyntaxException
URISyntaxException
public boolean endsWith(XmldbURI xmldbUri)
public boolean endsWith(String string) throws URISyntaxException
URISyntaxException
public XmldbURI prepend(XmldbURI xmldbUri)
public XmldbURI trimFromBeginning(XmldbURI xmldbUri)
public XmldbURI trimFromBeginning(String string) throws URISyntaxException
URISyntaxException
public String toString()
toString
in class Object
public static String[] getPathComponents(String collectionPath)
public static String checkPath(String currentPath, String parentPath)
public static String checkPath2(String fileName, String parentPath)
fileName
- parentPath
- public String makeAbsolute(String name)
name
- public static final String normalizeCollectionName(String name)
name
- public String getAuthority()
public String getFragment()
public int getPort()
public String getQuery()
public String getRawAuthority()
public String getHost()
public String getUserInfo()
public String getRawFragment()
public String getRawQuery()
public String getRawUserInfo()
public int hashCode()
hashCode
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |