com.ibm.sketch.utilities
Interface ILocationCorrespondance


public interface ILocationCorrespondance

This interface encapsulates information about the location correspondance association. Some applications might want to redirect a location (let's call it "named" location) to another location called "use" location. Each time a connection to the "named" location is requested, a connection to the "use" location will be opened instead. Creation date: (3/27/2001 4:35:24 PM)


Field Summary
static java.lang.String copyright
           
 
Method Summary
 java.lang.Exception[] add(org.w3c.dom.Element locationCorrespondance)
          adds in this ILocationCorrespondance information from a {http://w3.research.ibm.com/SKETCH/ns/locationCorrespondance}{locationCorrespondance} DOM Element.
 void add(java.lang.String namedURL, java.lang.String useURL)
          creates a new association between two URLs.
 void add(java.net.URL named, java.net.URL use)
          creates a new association between two URLs.
 void clear()
          removes all location associations
 java.net.URL getUse(java.lang.String namedURL)
          returns the URL to connect to whenever a connection to namedURI is required.
 java.net.URL getUse(java.net.URL named)
          returns the URL to connect to whenever a connection to named is required.
 void remove(java.lang.String namedURL)
          removes the association whose key is namedURL.
 void remove(java.net.URL named)
          removes the association whose key is named.
 

Field Detail

copyright

public static final java.lang.String copyright
Method Detail

add

public void add(java.lang.String namedURL,
                java.lang.String useURL)
         throws java.net.MalformedURLException
creates a new association between two URLs.
Throws:
java.net.MalformedURLException - thrown if one of the parameter is not a valid URL.

add

public void add(java.net.URL named,
                java.net.URL use)
creates a new association between two URLs.

add

public java.lang.Exception[] add(org.w3c.dom.Element locationCorrespondance)
adds in this ILocationCorrespondance information from a {http://w3.research.ibm.com/SKETCH/ns/locationCorrespondance}{locationCorrespondance} DOM Element.

Here is an example of a locationCorrespondance element

<locationCorrespondance xmlns="http://w3.research.ibm.com/SKETCH/ns/locationCorrespondance">

<schemaLocation named="file:/C:/ImportSimpleType.xsd" use="file:///C:/temp/ImportSimpleType.xsd"/>

<schemaLocation named="file:///C:/SKETCH/ImportSimpleType.xsd" use="file:/C:/temp/SKETCH/ImportSimpleType.xsd"/>

<schemaLocation named="http://w3.research.ibm.com/SKETCH/ImportSimpleType-Import1.xsd" use="ftp://ftp.research.ibm.com/SKETCH/ImportSimpleType-Import1.xsd"/>

</locationCorrespondance>

It returns exceptions found while adding information to this ILocationCorrespondance.


clear

public void clear()
removes all location associations

getUse

public java.net.URL getUse(java.lang.String namedURL)
                    throws java.net.MalformedURLException
returns the URL to connect to whenever a connection to namedURI is required.
Throws:
java.net.MalformedURLException - thrown to indicate that namedURL is not a valid URL

getUse

public java.net.URL getUse(java.net.URL named)
returns the URL to connect to whenever a connection to named is required.

remove

public void remove(java.lang.String namedURL)
removes the association whose key is namedURL.

remove

public void remove(java.net.URL named)
removes the association whose key is named.