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.URI;
09: import org.openrdf.model.impl.LiteralImpl;
10: import org.openrdf.sail.nativerdf.ValueStoreRevision;
11:
12: public class NativeLiteral extends LiteralImpl implements NativeValue {
13:
14: /*----------*
15: * Variable *
16: *----------*/
17:
18: /**
19: *
20: */
21: private static final long serialVersionUID = 2258721720531482856L;
22:
23: private ValueStoreRevision revision;
24:
25: private int id;
26:
27: /*--------------*
28: * Constructors *
29: *--------------*/
30:
31: public NativeLiteral(ValueStoreRevision revision, String label) {
32: this (revision, label, UNKNOWN_ID);
33: }
34:
35: public NativeLiteral(ValueStoreRevision revision, String label,
36: int id) {
37: super (label);
38: setInternalID(id, revision);
39: }
40:
41: public NativeLiteral(ValueStoreRevision revision, String label,
42: String lang) {
43: this (revision, label, lang, UNKNOWN_ID);
44: }
45:
46: public NativeLiteral(ValueStoreRevision revision, String label,
47: String lang, int id) {
48: super (label, lang);
49: setInternalID(id, revision);
50: }
51:
52: public NativeLiteral(ValueStoreRevision revision, String label,
53: URI datatype) {
54: this (revision, label, datatype, UNKNOWN_ID);
55: }
56:
57: public NativeLiteral(ValueStoreRevision revision, String label,
58: URI datatype, int id) {
59: super (label, datatype);
60: setInternalID(id, revision);
61: }
62:
63: /*---------*
64: * Methods *
65: *---------*/
66:
67: public void setInternalID(int id, ValueStoreRevision revision) {
68: this .id = id;
69: this .revision = revision;
70: }
71:
72: public ValueStoreRevision getValueStoreRevision() {
73: return revision;
74: }
75:
76: public int getInternalID() {
77: return id;
78: }
79: }
|