com.sapportals.wcm.util.uri

Class GenericUri

java.lang.Object
  extended by com.sapportals.wcm.util.uri.GenericUri
All Implemented Interfaces:
IUri
Direct Known Subclasses:
DataUri

public class GenericUri
extends Object
implements IUri

A RFC2396 IUri implementation.

     Uri ::= scheme ':' opaque_part
 

Copyright (c) SAP AG 2001-2005


Constructor Summary
GenericUri(String scheme, String remainder)
           
 
Method Summary
 boolean equals(IUri other)
           
 boolean equals(Object other)
           
 String getRemainder()
          Get the remainder of this Uri (opaque part after scheme without ':').
 String getScheme()
          Get the scheme of this Uri (without ':').
 int hashCode()
           
protected  IUri newInstance(String remainder)
          Construct a new IUri with the scheme of this and the given remainder. used when generic uri resolves references.
 IUri resolve(IUriReference ref)
          Resolve the uri reference in the context of this Uri.
 String toExternalForm()
          Returns a string representation according to RFC 2396 of this URI.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericUri

public GenericUri(String scheme,
                  String remainder)
           throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

getScheme

public String getScheme()
Get the scheme of this Uri (without ':').

Specified by:
getScheme in interface IUri
Returns:
scheme of this Uri

getRemainder

public String getRemainder()
Get the remainder of this Uri (opaque part after scheme without ':').

Specified by:
getRemainder in interface IUri
Returns:
remainder of this Uri

resolve

public IUri resolve(IUriReference ref)
             throws IllegalArgumentException
Resolve the uri reference in the context of this Uri.

Specified by:
resolve in interface IUri
Parameters:
ref - reference to resolve
Returns:
resolved reference as absolute uri without fragment identifier
Throws:
IllegalArgumentException

equals

public boolean equals(Object other)
Overrides:
equals in class Object

equals

public boolean equals(IUri other)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

toExternalForm

public String toExternalForm()
Description copied from interface: IUri
Returns a string representation according to RFC 2396 of this URI.

Specified by:
toExternalForm in interface IUri
Returns:
string in uri format

newInstance

protected IUri newInstance(String remainder)
                    throws IllegalArgumentException
Construct a new IUri with the scheme of this and the given remainder. used when generic uri resolves references. This method should be overridden by subclasses to construct their own class.

Parameters:
remainder - new opaque part of uri
Returns:
new IUri instance
Throws:
IllegalArgumentException - when remainder is not legal
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice