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.BNode;
09:
10: /**
11: * Wraps a {@link BNodeImpl} providing an internal id and version.
12: *
13: * @author James Leigh
14: *
15: */
16: public class RdbmsBNode extends RdbmsResource implements BNode {
17: private static final long serialVersionUID = 861142250999359435L;
18: private BNode bnode;
19:
20: public RdbmsBNode(BNode bnode) {
21: this .bnode = bnode;
22: }
23:
24: public RdbmsBNode(Number id, Integer version, BNode bnode) {
25: super (id, version);
26: this .bnode = bnode;
27: }
28:
29: public String getID() {
30: return bnode.getID();
31: }
32:
33: public String stringValue() {
34: return bnode.stringValue();
35: }
36:
37: @Override
38: public String toString() {
39: return bnode.toString();
40: }
41:
42: @Override
43: public boolean equals(Object o) {
44: if (this == o)
45: return true;
46: return bnode.equals(o);
47: }
48:
49: @Override
50: public int hashCode() {
51: return bnode.hashCode();
52: }
53:
54: }
|