net.sf.mmm.util.resource.api
Interface ResourceUri

All Known Implementing Classes:
ResourceUriImpl

public interface ResourceUri

This interface represents an URI pointing to the location of a DataResource. A ResourceUri can be represented as string but consists of two parts: a scheme-prefix and a path.
Here are some examples:

URI scheme-prefix path
file:///tmp/config.xml file:// /tmp/config.xml
http://m-m-m.sourceforge.net/maven/index.html http:// m-m-m.sourceforge.net/maven/index.html
classpath:net/sf/mmm/util/beans-core.xml classpath: net/sf/mmm/util/beans-core.xml
/home/mmm/.profile <null> /home/mmm/.profile
../foo/bar.ext <null> ../foo/bar.ext
C:\WINDOWS\system32\drivers\etc\hosts <null> C:\WINDOWS\system32\drivers\etc\hosts

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

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()
          
 

Method Detail

getUri

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

Returns:
the URI as string.

getSchemePrefix

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:

Returns:
the schemePrefix or null if this ResourceUri is unqualified.

getPath

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

Returns:
the path.

toString

String toString()

Overrides:
toString in class Object


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