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()
           
 IStatus validate(IURI uri)
           
 

Method Detail

newURI

public 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

public 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

public 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

public java.lang.String toString()
Returns:
Returns the proper name of the scheme.

isHierarchical

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

isValid

public 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

public 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.