|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sapportals.wcm.util.uri.RID
A RID is an identifier for a CM resource. It holds all information to identify a CM resource and retrieve it via the CM Framework. Each CM resource has its unique RID. The first pathsegment must be a valid name of a repository (prefix).
A RID has a path-like structure, like a path in a file system and follows the following production:
RID ::= '/' pathsegment | '/' pathsegment '?' query pathsegment ::= name | name '/' pathsegment | empty name ::= any char except '/' query ::= parameter | parameter '&' query | empty parameter ::= varname | varname '=' value varname ::= any char except '=', '&' value ::= any character except '&'Equality is defined as ignoring trailing '/' characters. Thus, the RIDs "/docs/" and /docs" are considered equal. There is special handling for the root collection "/", which is not equal to the empty RID "".
Copyright (c) SAP AG 2001-2004
| Field Summary | |
static char |
PATH_SEPARATOR
|
| Constructor Summary | |
RID(java.lang.String uri)
Deprecated. as of NW04. Use RID.getRID(uri) |
|
RID(java.lang.String path,
java.lang.String query)
Deprecated. as of NW04. Use RID.getRID(path, query) |
|
| Method Summary | |
RID |
add(RID uri)
Concatenate this RID with the given RID. |
RID |
add(java.lang.String uri)
Concatenate this RID with the given RID. |
RID |
addPathSegment(java.lang.String segment)
Adds a path segment. |
RID |
addQueryParameter(java.util.Properties parameter)
Deprecated. as of NW04. Use setQueryParameter |
int |
compareTo(java.lang.Object o)
|
RID |
decode()
Deprecated. as of NW04. RID objects are never decoded |
RID |
encode()
Deprecated. as of NW04. RID objects are never encoded |
boolean |
endsWithSlash()
Return if this RID ends with a slash. |
boolean |
equals(java.lang.Object other)
Determine if this RID equals other. |
boolean |
equals(RID other)
Determine if this RID equals other. |
boolean |
equals(java.lang.String other)
Determine if this RID equals other. |
java.lang.String |
extension()
Get the extension part of the resource name. |
java.lang.String |
getPath()
Return the path component of this RID. |
java.lang.String |
getQuery()
Return the query component of this RID (null if it does not exist). |
java.util.Properties |
getQueryParameter()
Get the query parameters of the RID. |
static RID |
getRID(java.lang.String uri)
|
static RID |
getRID(java.lang.String path,
java.lang.String query)
|
int |
hashCode()
|
boolean |
isAbsolute()
Return if RID is absolute, e.g. start with a slash. |
boolean |
isAncestorOf(RID child)
Determine if this RID is an ancestor (parent or parent's parent, etc.) of the given child RID. |
boolean |
isAncestorOfOrSelf(RID child)
Determine if this RID is an ancestor (parent or parent's parent, etc.) of the given child RID or the same. |
boolean |
isRoot()
Return if RID is root collection. |
int |
length()
Return length of RID in string representation |
RID |
name()
Get the name of the resource, designated by this RID. |
RID |
parent()
Get the RID of the parent collection of this RID |
RID |
removeExtension()
Remove the (optional) extension of the resource name. |
RID |
removeName()
Remove the name of the resource, same as parent() |
RID |
removeRoot()
Get a new RID with the toplevel collection removed |
RID |
removeTrailingSlash()
Remove a possible trailing slash from the RID. |
RID |
resolveRelativeRID(java.lang.String uri)
Resolve relative RIDs |
RID |
root()
Get RID of toplevel collection (below root) of this RID. |
RID |
setQueryParameter(java.util.Properties parameter)
Create a new RID by setting the given parameters as query part of this RID. |
java.util.List |
split()
Splits the RID into its path components |
java.lang.String |
toExternalForm()
|
java.lang.String |
toString()
Returns string representation of this RID |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final char PATH_SEPARATOR
| Constructor Detail |
public RID(java.lang.String path,
java.lang.String query)
path - of RIDquery - part or RID (can be null)public RID(java.lang.String uri)
uri - TBD: Description of the incoming method parameter| Method Detail |
public static RID getRID(java.lang.String path,
java.lang.String query)
public static RID getRID(java.lang.String uri)
public RID encode()
public RID decode()
public java.lang.String toExternalForm()
public java.lang.String getPath()
public java.lang.String getQuery()
public java.util.Properties getQueryParameter()
Properties object has no
effect on the RID itself.Propertiespublic RID root()
The root RID of a toplevel collection is the root collection RID. The root RID of the root RID is the root RID itself.
public RID name()
public RID parent()
public java.lang.String extension()
public RID removeRoot()
public RID removeName()
public RID removeExtension()
public RID removeTrailingSlash()
public boolean isAbsolute()
public boolean isRoot()
public boolean isAncestorOf(RID child)
child - to test againstpublic boolean isAncestorOfOrSelf(RID child)
child - to test againstpublic boolean endsWithSlash()
public RID add(java.lang.String uri)
Note: do not use this method to add path segments, as the parameter is
parsed as legal RID, not as a legal RID segment; use addPathSegment(String) instead.
uri - to append to thispublic RID add(RID uri)
uri - to append to thispublic java.util.List split()
Stringspublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(RID other)
other - RIDpublic boolean equals(java.lang.String other)
other - RID (string representation)public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - public int hashCode()
hashCode in class java.lang.Objectpublic int length()
public RID resolveRelativeRID(java.lang.String uri)
uri - An RID, which may be relative or absolute
public RID addPathSegment(java.lang.String segment)
throws WcmException
segment - String containing the new path segmentWcmException - if segment contains characters that aren't allowed in
path segmentspublic RID addQueryParameter(java.util.Properties parameter)
parameter - to set to querypublic RID setQueryParameter(java.util.Properties parameter)
parameter - to set to querypublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||