org.daml.validator
Class URISubstitution

java.lang.Object
  |
  +--org.daml.validator.URISubstitution

public class URISubstitution
extends java.lang.Object

Store and process URI substitutions. Each original URI is associated with a replacement URI (or null) and a boolean used to signal a warning.


Constructor Summary
URISubstitution()
          Generate a new URI Substitution set.
 
Method Summary
 boolean getLoad(java.lang.String originalURI)
          Determine if the replacement URI should be loaded instead.
 java.lang.String getSubstitution(java.lang.String originalURI)
          Get the substitution URI for the original URI.
 boolean getWarn(java.lang.String originalURI)
          Determine if a warning needs to be generated for this URI.
 boolean hasSubstitution(java.lang.String originalURI)
          Determine if a URI has a substitution.
 java.util.Iterator iterator()
          Returns an Iterator over the URIs that have substitutions.
 void put(java.lang.String originalURI, java.lang.String newURI, boolean warn, boolean load)
          Add a substitution to the set.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URISubstitution

public URISubstitution()
Generate a new URI Substitution set.

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

put

public void put(java.lang.String originalURI,
                java.lang.String newURI,
                boolean warn,
                boolean load)
Add a substitution to the set.


hasSubstitution

public boolean hasSubstitution(java.lang.String originalURI)
Determine if a URI has a substitution.


getSubstitution

public java.lang.String getSubstitution(java.lang.String originalURI)
Get the substitution URI for the original URI.


getWarn

public boolean getWarn(java.lang.String originalURI)
Determine if a warning needs to be generated for this URI.


getLoad

public boolean getLoad(java.lang.String originalURI)
Determine if the replacement URI should be loaded instead.


iterator

public java.util.Iterator iterator()
Returns an Iterator over the URIs that have substitutions.