/[cashew-s-editor]/cashews/src/nongnu/cashews/rdf/RDFURI.java
ViewVC logotype

Diff of /cashews/src/nongnu/cashews/rdf/RDFURI.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by gnu_andrew, Mon Mar 28 19:29:21 2005 UTC revision 1.3 by gnu_andrew, Sun Apr 3 17:15:39 2005 UTC
# Line 22  Line 22 
22  package nongnu.cashews.rdf;  package nongnu.cashews.rdf;
23    
24  import java.net.URI;  import java.net.URI;
25    import java.net.URISyntaxException;
26    
27  /**  /**
28   * <p>   * <p>
# Line 43  public class RDFURI Line 44  public class RDFURI
44     */     */
45    private URI uri;    private URI uri;
46    
47      /**
48       * Constructs an <code>RDFURI</code> using the specified URI.
49       *
50       * @param uri the URI to use for this RDF URI.
51       */
52      public RDFURI(URI uri)
53      {
54        this.uri = uri;
55      }
56    
57      /**
58       * Returns a textual representation of the RDF URI.
59       *
60       * @return a textual representation.
61       */
62      public String toString()
63      {
64        return getClass().getName() +
65          "[uri = " +
66          uri +
67          "]";
68      }
69    
70      /**
71       * Returns a clone of the URI used by this RDF URI.
72       *
73       * @return a clone of the URI.
74       */
75      public URI getURI()
76      {
77        try
78          {
79            return new URI(uri.toString());
80          }
81        catch (URISyntaxException e)
82          {
83            throw new IllegalStateException("The URI is invalid.", e);
84          }
85      }
86    
87  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26