net.sf.mmm.util.resource.base
Class ResourceUriImpl

java.lang.Object
  extended by net.sf.mmm.util.resource.base.ResourceUriImpl
All Implemented Interfaces:
ResourceUri

public class ResourceUriImpl
extends Object
implements ResourceUri

This is the implementation of the ResourceUri interface.

Since:
1.0.2
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private  String path
           
private static Pattern SCHEME_PATTERN
          The Pattern for a ResourceUri as string.
private  String schemePrefix
           
private  String uri
           
 
Constructor Summary
ResourceUriImpl(String uri)
          The constructor.
ResourceUriImpl(String schemePrefix, String path)
          The constructor.
 
Method Summary
 String getPath()
          This method gets the path of this ResourceUri.
 String getSchemePrefix()
          This method gets the scheme-prefix of a qualified ResourceUri.
 String getUri()
          This method gets this ResourceUri as string.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SCHEME_PATTERN

private static final Pattern SCHEME_PATTERN
The Pattern for a ResourceUri as string.


uri

private final String uri
See Also:
getUri()

schemePrefix

private final String schemePrefix
See Also:
getSchemePrefix()

path

private final String path
See Also:
getPath()
Constructor Detail

ResourceUriImpl

public ResourceUriImpl(String uri)
The constructor.

Parameters:
uri - is the URI.

ResourceUriImpl

public ResourceUriImpl(String schemePrefix,
                       String path)
The constructor.

Parameters:
schemePrefix - is the scheme-prefix.
path - is the path.
Method Detail

getUri

public String getUri()
This method gets this ResourceUri as string.

Specified by:
getUri in interface ResourceUri
Returns:
the URI as string.

getSchemePrefix

public String getSchemePrefix()
This method gets the scheme-prefix of a qualified ResourceUri. The scheme-prefix has the following form: [a-zA-Z][a-zA-Z0-9\\.\\-+]+:(//)?. The part before the colon (:) is called the scheme.
Examples for scheme-prefixes are:

Specified by:
getSchemePrefix in interface ResourceUri
Returns:
the schemePrefix or null if this ResourceUri is unqualified.

getPath

public String getPath()
This method gets the path of this ResourceUri. This is the part of the URI after the scheme-prefix.

Specified by:
getPath in interface ResourceUri
Returns:
the path.

toString

public String toString()

Specified by:
toString in interface ResourceUri
Overrides:
toString in class Object


Copyright © 2001-2010 mmm-Team. All Rights Reserved.