org.eclipse.wst.common.environment.uri
Interface IURIScheme


public interface IURIScheme

A IURIScheme represents a single scheme for some a family of Univeral Resource Identifiers. Examples include "file", "http" and "platform" (Eclipse).

Since:
1.0

Method Summary
 boolean isHierarchical()
           
 boolean isValid(IURI uri)
           
 IURI newURI(IURI uri)
           
 IURI newURI(java.lang.String uri)
           
 IURI newURI(java.net.URL url)
           
 java.lang.String toString()
           
 org.eclipse.core.runtime.IStatus validate(IURI uri)
           
 

Method Detail

newURI

IURI newURI(java.lang.String uri)
            throws URIException
Parameters:
uri - the URI to be created.
Returns:
Returns a new IURI.
Throws:
URIException - if the uri specified is not valid or can not be created.

newURI

IURI newURI(java.net.URL url)
            throws URIException
Parameters:
url - the url used to create the URI.
Returns:
Returns a new IURI.
Throws:
URIException - if the url specified is not valid or can not be created.

newURI

IURI newURI(IURI uri)
            throws URIException
Parameters:
uri - the URI to be created.
Returns:
Returns a new IURI.
Throws:
URIException - if the uri specified is not valid or can not be created.

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns the proper name of the scheme.

isHierarchical

boolean isHierarchical()
Returns:
Returns true if and only if this is a hierarchical scheme.

isValid

boolean isValid(IURI uri)
Parameters:
uri - the uri to check for validity.
Returns:
Returns true if and only if the given IURI satisfies the grammatical requirements of the scheme. Absolute URIs must begin with ":". Relative URIs must either not contain a colon, ":", or it must begin with "./".

validate

org.eclipse.core.runtime.IStatus validate(IURI uri)
Parameters:
uri - the uri to check for validity.
Returns:
Returns a Status object indicating whether or not the given IURI is valid. The severity and message of the Status object will describe this.