From: <mrp...@us...> - 2014-01-16 19:30:22
|
Revision: 7811 http://bigdata.svn.sourceforge.net/bigdata/?rev=7811&view=rev Author: mrpersonick Date: 2014-01-16 19:30:15 +0000 (Thu, 16 Jan 2014) Log Message: ----------- baby step 1: don't overload c in SPO Modified Paths: -------------- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/spo/SPO.java Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/spo/SPO.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/spo/SPO.java 2014-01-16 19:20:09 UTC (rev 7810) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/spo/SPO.java 2014-01-16 19:30:15 UTC (rev 7811) @@ -78,15 +78,18 @@ @SuppressWarnings("rawtypes") public final IV o; + /** The internal value for the context position. */ + @SuppressWarnings("rawtypes") + private final IV c; + /** - * The context position or statement identifier (optional). + * The statement identifier (optional). * <p> - * Note: this is not final since, for SIDs mode, we have to set it lazily - * when adding an {@link SPO} to the database. + * Note: this is not final since we create it only on demand. */ @SuppressWarnings("rawtypes") - private IV c = null; - + private IV sid = null; + // /** // * Statement type (inferred, explicit, or axiom). // */ @@ -154,7 +157,7 @@ case 0: return s; case 1: return p; case 2: return o; - case 3: return c(); + case 3: return c; default: throw new IllegalArgumentException(); } } @@ -180,13 +183,18 @@ @Override @SuppressWarnings("rawtypes") final public IV c() { + return c; + } + + @SuppressWarnings("rawtypes") + final public IV sid() { // lazy instantiate the sid if necessary - if (c == null && sidable()) { - c = new SidIV(this); + if (sid == null && sidable()) { + sid = new SidIV(this); } - return c; + return sid; } @@ -203,7 +211,7 @@ sidable(sid); // clear the current value for c - this.c = null; + this.sid = null; } @@ -215,7 +223,7 @@ + toString()); // will lazy instantiate the sid - return c(); + return sid(); } @@ -253,6 +261,7 @@ this.s = s; this.p = p; this.o = o; + this.c = null; type(null); } @@ -295,6 +304,7 @@ this.s = s; this.p = p; this.o = o; + this.c = null; type(type); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |