01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.sail.nativerdf.model;
07:
08: import org.openrdf.model.impl.URIImpl;
09: import org.openrdf.sail.nativerdf.ValueStoreRevision;
10:
11: public class NativeURI extends URIImpl implements NativeResource {
12:
13: /*-----------*
14: * Variables *
15: *-----------*/
16:
17: /**
18: *
19: */
20: private static final long serialVersionUID = -4434961231872778488L;
21:
22: private ValueStoreRevision revision;
23:
24: private int id;
25:
26: /*--------------*
27: * Constructors *
28: *--------------*/
29:
30: public NativeURI(ValueStoreRevision revision, String uri) {
31: this (revision, uri, UNKNOWN_ID);
32: }
33:
34: public NativeURI(ValueStoreRevision revision, String uri, int id) {
35: super (uri);
36: setInternalID(id, revision);
37: }
38:
39: public NativeURI(ValueStoreRevision revision, String namespace,
40: String localname) {
41: this (revision, namespace + localname);
42: }
43:
44: public NativeURI(ValueStoreRevision revision, String namespace,
45: String localname, int id) {
46: this (revision, namespace + localname, id);
47: }
48:
49: /*---------*
50: * Methods *
51: *---------*/
52:
53: public void setInternalID(int id, ValueStoreRevision revision) {
54: this .id = id;
55: this .revision = revision;
56: }
57:
58: public ValueStoreRevision getValueStoreRevision() {
59: return revision;
60: }
61:
62: public int getInternalID() {
63: return id;
64: }
65:
66: }
|