SAP NetWeaver '04

com.sapportals.wcm.util.uri
Interface IHierarchicalUri

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
All Superinterfaces:
IUri
All Known Implementing Classes:
HttpUrl, ResourceUrl

public interface IHierarchicalUri
extends IUri

A RFC2396 URI interface.

    remainder   ::= '//' authority abspath query
    abspath     ::= '/' pathsegment | empty
    pathsegment ::= name | name '/' pathsegment | empty
    query       ::= '?' uri-characters | empty
 
Copyright (c) SAP AG 2001-2002


Method Summary
 IHierarchicalUri appendPath(java.lang.String path)
          Append the given path segment to the current path of this uri.
 java.lang.String getAuthority()
          Return authority part of this hierarchical Uri.
 java.lang.String getPath()
          Return path of this Uri or, if not there, the emtpy string
 java.lang.String[] getPathSegments()
          Return the segments of the uri path
 java.lang.String getQuery()
          Return query of this Uri in RFC 2396 encoded form or, if not there, null
 IHierarchicalUri getRoot()
          Returns the uri of the root collection (path = "/").
 boolean isAncestorOf(IHierarchicalUri other)
          Determine if this Uri is ancestor of other uri
 IUriReference mapToAbsolutePath(IUriReference ref)
          Given this Uri as the base, map the uri reference to a uri reference with absolute path component.
 IUriReference mapToAbsolutePath(RID wcmPath)
           
 IUriReference mapToAbsolutePath(RID wcmPath, URICodec codec)
           
 IUriReference mapToAbsolutePath(URI wcmPath)
          Given this Uri as the base of the WCM repository, map the WCM Path to a uri reference with absolute path component.
 IUriReference mapToAbsolutePath(URI wcmPath, URICodec codec)
          Given this Uri as the base of the WCM repository, map the WCM Path to a uri reference with absolute path component.
 IHierarchicalUri mapToAbsoluteUri(RID wcmPath)
           
 IHierarchicalUri mapToAbsoluteUri(RID wcmPath, URICodec codec)
           
 IHierarchicalUri mapToAbsoluteUri(URI wcmPath)
          Given this Uri as the base of the WCM repository, map the WCM Path to a absolute uri.
 IHierarchicalUri mapToAbsoluteUri(URI wcmPath, URICodec codec)
          Given this Uri as the base of the WCM repository, map the WCM Path to a absolute uri.
 RID mapToResourceID(IUriReference ref)
           
 RID mapToResourceID(IUriReference ref, URICodec codec)
           
 URI mapToWcmPath(IUriReference ref)
          Given this Uri as the base of the WCM repository, map the Uri Reference to the corresponsing WCM Path in the framework.
 URI mapToWcmPath(IUriReference ref, URICodec codec)
          Given this Uri as the base of the WCM repository, map the Uri Reference to the corresponsing WCM Path in the framework.
 IHierarchicalUri setPath(java.lang.String path)
          Construct a new object of same type with the given path.
 IHierarchicalUri setQuery(java.lang.String query)
          Construct a new object of same type with the given query.
 IUriReference unresolve(IHierarchicalUri other, java.lang.String fragment)
          Convert the given uri to a relative uri reference with this uri as base.
 
Methods inherited from interface com.sapportals.wcm.util.uri.IUri
getRemainder, getScheme, resolve, toExternalForm
 

Method Detail

appendPath

public IHierarchicalUri appendPath(java.lang.String path)
Append the given path segment to the current path of this uri. Takes care of leading, trailing slashes. Note that the path must be uri encoded or the resulting uri is not valid.
Parameters:
path - TBD: Description of the incoming method parameter
Returns:
new uri with concatenated path

getAuthority

public java.lang.String getAuthority()
Return authority part of this hierarchical Uri.
Returns:
authority part of this hierarchical Uri

getPath

public java.lang.String getPath()
Return path of this Uri or, if not there, the emtpy string
Returns:
path of this uri

getPathSegments

public java.lang.String[] getPathSegments()
Return the segments of the uri path
Returns:
segments of uri path

getQuery

public java.lang.String getQuery()
Return query of this Uri in RFC 2396 encoded form or, if not there, null
Returns:
query of this uri in RFC 2396 encoded form or null

getRoot

public IHierarchicalUri getRoot()
Returns the uri of the root collection (path = "/").
Returns:
uri of server root

isAncestorOf

public boolean isAncestorOf(IHierarchicalUri other)
Determine if this Uri is ancestor of other uri
Parameters:
other - TBD: Description of the incoming method parameter
Returns:
if this Uri is ancestor of other uri

unresolve

public IUriReference unresolve(IHierarchicalUri other,
                               java.lang.String fragment)
Convert the given uri to a relative uri reference with this uri as base. If this uri is no ancestor of the other uri, an absolute uri refernce is returned.
Parameters:
other - uri to unresolve
fragment - to add to result uri reference
Returns:
uri reference relative to this uri

mapToWcmPath

public URI mapToWcmPath(IUriReference ref)
Given this Uri as the base of the WCM repository, map the Uri Reference to the corresponsing WCM Path in the framework.
 Example: "http://host/docs" + "/docs/test%203", gives "/test 3"
 Example: "http://host/docs" + "/xxx/test%203", gives null
 
Parameters:
ref - the uri reference to map
Returns:
the mapped wcm path or null if not possible

mapToResourceID

public RID mapToResourceID(IUriReference ref)

mapToWcmPath

public URI mapToWcmPath(IUriReference ref,
                        URICodec codec)
Given this Uri as the base of the WCM repository, map the Uri Reference to the corresponsing WCM Path in the framework.
 Example: "http://host/docs" + "/docs/test%203", gives "/test 3"
 Example: "http://host/docs" + "/xxx/test%203", gives null
 
Parameters:
ref - the uri reference to map
codec - to use for uri decoding
Returns:
the mapped wcm path or null if not possible

mapToResourceID

public RID mapToResourceID(IUriReference ref,
                           URICodec codec)

mapToAbsolutePath

public IUriReference mapToAbsolutePath(URI wcmPath)
Given this Uri as the base of the WCM repository, map the WCM Path to a uri reference with absolute path component.
 Example: "http://host/docs" + "test 3", gives "/docs/test%203"
 Example: "http://host/docs" + "/fs/test", gives "/docs/fs/test"
 
Parameters:
wcmPath - to map
Returns:
the mapped uri reference

mapToAbsolutePath

public IUriReference mapToAbsolutePath(RID wcmPath)

mapToAbsolutePath

public IUriReference mapToAbsolutePath(URI wcmPath,
                                       URICodec codec)
Given this Uri as the base of the WCM repository, map the WCM Path to a uri reference with absolute path component.
 Example: "http://host/docs" + "test 3", gives "/docs/test%203"
 Example: "http://host/docs" + "/fs/test", gives "/docs/fs/test"
 
Parameters:
wcmPath - to map
codec - to use for uri encoding
Returns:
the mapped uri reference

mapToAbsolutePath

public IUriReference mapToAbsolutePath(RID wcmPath,
                                       URICodec codec)

mapToAbsolutePath

public IUriReference mapToAbsolutePath(IUriReference ref)
Given this Uri as the base, map the uri reference to a uri reference with absolute path component.
 Example: "http://host/docs" + "test%203", gives "/docs/test%203"
 Example: "http://host/docs" + "http://another/fs/test", gives "http://another/fs/test"
 
Parameters:
ref - TBD: Description of the incoming method parameter
Returns:
the mapped uri reference

mapToAbsoluteUri

public IHierarchicalUri mapToAbsoluteUri(URI wcmPath)
Given this Uri as the base of the WCM repository, map the WCM Path to a absolute uri.
 Example: "http://host/docs" + "test 3", gives "http://host/docs/test%203"
 Example: "http://host/docs" + "/fs/test", gives "http://host/docs/fs/test"
 
Parameters:
wcmPath - to map
Returns:
the mapped uri

mapToAbsoluteUri

public IHierarchicalUri mapToAbsoluteUri(RID wcmPath)

mapToAbsoluteUri

public IHierarchicalUri mapToAbsoluteUri(URI wcmPath,
                                         URICodec codec)
Given this Uri as the base of the WCM repository, map the WCM Path to a absolute uri.
 Example: "http://host/docs" + "test 3", gives "http://host/docs/test%203"
 Example: "http://host/docs" + "/fs/test", gives "http://host/docs/fs/test"
 
Parameters:
wcmPath - to map
codec - to use for uri encoding
Returns:
the mapped uri

mapToAbsoluteUri

public IHierarchicalUri mapToAbsoluteUri(RID wcmPath,
                                         URICodec codec)

setQuery

public IHierarchicalUri setQuery(java.lang.String query)
Construct a new object of same type with the given query. If query is null , the new uri will be without query. The query string must be in RFC 2396 encoded form. See UriQuery for manipulation of query strings.
Parameters:
query - encoded query string for returned object
Returns:
hierarchical uri of same type as this

setPath

public IHierarchicalUri setPath(java.lang.String path)
Construct a new object of same type with the given path. If path is null , the new uri will have the root path /. The path string must be in RFC 2396 encoded form. See URICodec. The query of the resulting uri will always be empty.
Parameters:
path - encoded path string for returned object
Returns:
hierarchical uri of same type as this

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.