|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sap.netweaver.bc.rf.common.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-2003
| 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 | |
IRid |
add(IRid uri)
Concatenate this Rid with the given Rid. |
IRid |
add(java.lang.String uri)
Concatenate this Rid with the given Rid. |
IRid |
addPathSegment(java.lang.String segment)
Adds a path segment. |
IRid |
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(IRid other)
Determine if this Rid equals other. |
boolean |
equals(java.lang.Object 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 IRid |
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(IRid child)
Determine if this Rid is an ancestor (parent or parent's parent, etc.) of the given child Rid. |
boolean |
isAncestorOfOrSelf(IRid 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 |
IRid |
name()
Get the name of the resource, designated by this Rid. |
IRid |
parent()
Get the Rid of the parent collection of this Rid |
IRid |
removeExtension()
Remove the (optional) extension of the resource name. |
IRid |
removeName()
Remove the name of the resource, same as parent() |
IRid |
removeRoot()
Get a new Rid with the toplevel collection removed |
IRid |
removeTrailingSlash()
Remove a possible trailing slash from the Rid. |
IRid |
resolveRelativeRid(java.lang.String uri)
Resolve relative Rids |
IRid |
root()
Get Rid of toplevel collection (below root) of this Rid. |
IRid |
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()
Convert this Rid to a representation usable in RFC2396 URI references. |
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 IRid 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()
IRidNote that such an encoded string cannot be used to construct an new Rid object! The path in Rid objects is never, ever encoded.
toExternalForm in interface IRidcom.sap.netweaver.bc.rf.common.IRidpublic java.lang.String getPath()
getPath in interface IRidpublic java.lang.String getQuery()
getQuery in interface IRidpublic java.util.Properties getQueryParameter()
Properties object has no
effect on the Rid itself.getQueryParameter in interface IRidPropertiespublic IRid 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.
root in interface IRidpublic IRid name()
name in interface IRidpublic IRid parent()
parent in interface IRidpublic java.lang.String extension()
extension in interface IRidpublic IRid removeRoot()
removeRoot in interface IRidpublic IRid removeName()
removeName in interface IRidpublic IRid removeExtension()
removeExtension in interface IRidpublic IRid removeTrailingSlash()
removeTrailingSlash in interface IRidpublic boolean isAbsolute()
isAbsolute in interface IRidpublic boolean isRoot()
isRoot in interface IRidpublic boolean isAncestorOf(IRid child)
isAncestorOf in interface IRidchild - to test againstpublic boolean isAncestorOfOrSelf(IRid child)
isAncestorOfOrSelf in interface IRidchild - to test againstpublic boolean endsWithSlash()
endsWithSlash in interface IRidpublic IRid 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.
add in interface IRiduri - to append to thispublic IRid add(IRid uri)
add in interface IRiduri - to append to thispublic java.util.List split()
split in interface IRidStringspublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(IRid other)
other - Ridpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - public int hashCode()
hashCode in class java.lang.Objectpublic int length()
length in interface IRidpublic IRid resolveRelativeRid(java.lang.String uri)
resolveRelativeRid in interface IRiduri - An Rid, which may be relative or absolute
public IRid addPathSegment(java.lang.String segment)
throws WcmException
addPathSegment in interface IRidsegment - String containing the new path segmentWcmException - if segment contains characters that aren't allowed in
path segmentspublic IRid addQueryParameter(java.util.Properties parameter)
parameter - to set to querypublic IRid setQueryParameter(java.util.Properties parameter)
setQueryParameter in interface IRidparameter - 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 | |||||||||