SAP NetWeaver '04

com.sap.netweaver.bc.rf.common
Interface IUriReference

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.common_api.jar]
All Known Implementing Classes:
UriReference

public interface IUriReference

A RFC2396 URI reference interface.

urireference ::= refpart fragment refpart ::= uri | relativeref fragment ::= '#' uri-characters | empty relativeref ::= hierarchical_part | opaque_part hierarchical_part ::= pathsegment query | [ netpath ] abspath query netpath ::= '//' authority

The opaque part is not directly mapped to this interface, but is the composition of path + query. This is due to the fact that at construction time of a relatice uri reference, it is not clear if the reference is part of an opaque or hierarchical uri scheme. Base uri classes, not hierarchical, which have to resolve references, have to concatenate path and query to get the opaque part of the reference.

There are degenrate cases of relative uri reference with a scheme, but without authority component. See RFC 2396, page 32 as an example. The use is discouraged.

Copyright (c) SAP AG 2001-2002


Method Summary
 IUriReference appendPath(java.lang.String path)
          Create a new uri reference by appending the given path to any existing path in the uri reference.
 java.lang.String getAuthority()
          Get the authority of the reference
 java.lang.String getFragmentIdentifier()
          Get the fragment identifier (without '#') of the uri
 java.lang.String getPath()
          Get the path of the reference
 java.lang.String getQuery()
          Get the query of the reference
 java.lang.String getScheme()
          Get the scheme of the reference
 IAbsoluteUri getUri()
          Get the uri of the reference if absolute
 boolean isAbsolute()
          Determine if the reference is absolute
 IUriReference resolveWith(IAbsoluteUri base)
          With base Uri, resolve this reference to an absolute reference.
 IUriReference setQuery(java.lang.String query)
          Gets a new URI reference resulting from setting the query of this URI reference to the given query.
 java.lang.String toExternalForm()
          Returns a string representation according to RFC 2396 of this uri reference.
 

Method Detail

appendPath

public IUriReference appendPath(java.lang.String path)
                         throws java.lang.UnsupportedOperationException
Create a new uri reference by appending the given path to any existing path in the uri reference. The path must be uri encoded or the created reference will not be valid. The given path is appended by prefixing a slash character, if necessary.
Parameters:
path - uri encoded path to be appended
Returns:
an uri reference with path appended
Throws:
java.lang.UnsupportedOperationException - Exception raised in failure situation

setQuery

public IUriReference setQuery(java.lang.String query)
Gets a new URI reference resulting from setting the query of this URI reference to the given query. The query string must be in RFC 2396 encoded form. See UriQuery for manipulation of query strings.
Parameters:
query - the encoded query string to be set (may be null )
Returns:
an uri reference with query set to given query

getFragmentIdentifier

public java.lang.String getFragmentIdentifier()
Get the fragment identifier (without '#') of the uri
Returns:
fragment identifier or empty string

getScheme

public java.lang.String getScheme()
Get the scheme of the reference
Returns:
scheme of reference or null

getAuthority

public java.lang.String getAuthority()
Get the authority of the reference
Returns:
authority of reference or null

getPath

public java.lang.String getPath()
Get the path of the reference
Returns:
path of reference or empty string

getQuery

public java.lang.String getQuery()
Get the query of the reference
Returns:
query of reference or null

getUri

public IAbsoluteUri getUri()
Get the uri of the reference if absolute
Returns:
uri of reference or null

isAbsolute

public boolean isAbsolute()
Determine if the reference is absolute
Returns:
if reference is absolute

resolveWith

public IUriReference resolveWith(IAbsoluteUri base)
With base Uri, resolve this reference to an absolute reference. If this reference is already absolute, this is the identity operation.
Parameters:
base - uri to resolve reference with
Returns:
absolute uri reference

toExternalForm

public java.lang.String toExternalForm()
Returns a string representation according to RFC 2396 of this uri reference.
Returns:
string in uri reference format

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.