01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 2008.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.sail.rdbms.model;
07:
08: import org.openrdf.model.URI;
09:
10: /**
11: * Wraps a {@link URIImpl} providing an internal id and version.
12: *
13: * @author James Leigh
14: *
15: */
16: public class RdbmsURI extends RdbmsResource implements URI {
17: private static final long serialVersionUID = 3317398596013196032L;
18: private URI uri;
19:
20: public RdbmsURI(URI uri) {
21: this .uri = uri;
22: }
23:
24: public RdbmsURI(Number id, Integer version, URI uri) {
25: super (id, version);
26: this .uri = uri;
27: }
28:
29: public String getLocalName() {
30: return uri.getLocalName();
31: }
32:
33: public String getNamespace() {
34: return uri.getNamespace();
35: }
36:
37: public String stringValue() {
38: return uri.stringValue();
39: }
40:
41: @Override
42: public String toString() {
43: return uri.toString();
44: }
45:
46: @Override
47: public boolean equals(Object o) {
48: if (this == o)
49: return true;
50: return uri.equals(o);
51: }
52:
53: @Override
54: public int hashCode() {
55: return uri.hashCode();
56: }
57:
58: }
|