public class URI extends Object implements IURI, IPooledObject<IURI>
IURI
interface.Modifier and Type | Field and Description |
---|---|
protected IObjectPool<IURI> |
m_pool |
protected List<String> |
m_segments |
protected String |
m_uri |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
This creates a non-pooled clone of the object.
|
boolean |
equals(Object obj) |
IObjectPool<IURI> |
getPool()
Gets this object's pool.
|
String |
getSegment(int segment)
Get the specified segment.
|
String |
getSegments(int start)
Get the partial URI starting with the supplied segment to the end of the URI.
|
String |
getSegments(int start,
int end)
Get the segments that fall within the given range, inclusively.
|
String |
getServiceName()
Returns the service name to which the identified resource belongs,
or null if not determined.
|
int |
getSize()
Get the number of segments in this URI
|
int |
hashCode()
Returns a hash code value for the object.
|
void |
initialize(String uri)
Initialize this URI with the given String.
|
protected void |
parseURI() |
void |
release()
Cleans up this object's member resources,
preparing it to be added back into the pool.
|
void |
setPool(IObjectPool<IURI> pool)
Sets this object's pool.
|
void |
setURI(String uri)
Set the URI on this object
|
String |
toString()
Gets the resource's string id.
|
protected String m_uri
protected transient IObjectPool<IURI> m_pool
public URI()
public URI(String uri)
public String getSegment(int segment)
getSegment
in interface IURI
segment
- the index of the segment to retrieve (0 based)public int getSize()
public void setURI(String uri)
uri
- the new URIpublic String getServiceName()
getServiceName
in interface IURI
public String getSegments(int start)
getSegments
in interface IURI
start
- the segment to start the URIpublic String getSegments(int start, int end)
getSegments
in interface IURI
start
- the starting segmentend
- the last segment to retrievepublic String toString()
IURI
public void initialize(String uri) throws PortalException
initialize
in interface IURI
uri
- the String version of the URIPortalException
- if invalid uripublic IObjectPool<IURI> getPool()
getPool
in interface IPooledObject<IURI>
public void release()
release
in interface IPooledObject<IURI>
public void setPool(IObjectPool<IURI> pool)
setPool(com.webmethods.portal.system.pool.IObjectPool<com.webmethods.portal.system.IURI>)
does nothing.setPool
in interface IPooledObject<IURI>
public int hashCode()
public Object clone() throws CloneNotSupportedException
clone
in interface IURI
clone
in class Object
CloneNotSupportedException
protected void parseURI()