This list is closed, nobody may subscribe to it.
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(139) |
Aug
(94) |
Sep
(232) |
Oct
(143) |
Nov
(138) |
Dec
(55) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2011 |
Jan
(127) |
Feb
(90) |
Mar
(101) |
Apr
(74) |
May
(148) |
Jun
(241) |
Jul
(169) |
Aug
(121) |
Sep
(157) |
Oct
(199) |
Nov
(281) |
Dec
(75) |
| 2012 |
Jan
(107) |
Feb
(122) |
Mar
(184) |
Apr
(73) |
May
(14) |
Jun
(49) |
Jul
(26) |
Aug
(103) |
Sep
(133) |
Oct
(61) |
Nov
(51) |
Dec
(55) |
| 2013 |
Jan
(59) |
Feb
(72) |
Mar
(99) |
Apr
(62) |
May
(92) |
Jun
(19) |
Jul
(31) |
Aug
(138) |
Sep
(47) |
Oct
(83) |
Nov
(95) |
Dec
(111) |
| 2014 |
Jan
(125) |
Feb
(60) |
Mar
(119) |
Apr
(136) |
May
(270) |
Jun
(83) |
Jul
(88) |
Aug
(30) |
Sep
(47) |
Oct
(27) |
Nov
(23) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
(4) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <mrp...@us...> - 2010-07-20 19:40:29
|
Revision: 3249
http://bigdata.svn.sourceforge.net/bigdata/?rev=3249&view=rev
Author: mrpersonick
Date: 2010-07-20 19:40:23 +0000 (Tue, 20 Jul 2010)
Log Message:
-----------
test suite for no inlining
Modified Paths:
--------------
branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestAll.java
Added Paths:
-----------
branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining.java
branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithSidsWithoutInlining.java
Modified: branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestAll.java
===================================================================
--- branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestAll.java 2010-07-20 17:42:58 UTC (rev 3248)
+++ branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestAll.java 2010-07-20 19:40:23 UTC (rev 3249)
@@ -86,6 +86,7 @@
// run the test suite with statement identifiers enabled.
suite.addTest(TestBigdataSailWithSids.suite());
+ suite.addTest(TestBigdataSailWithSidsWithoutInlining.suite());
// run the test suite without statement identifiers enabled.
suite.addTest(TestBigdataSailWithoutSids.suite());
@@ -96,6 +97,7 @@
// quad store test suite w/ pipeline joins.
suite.addTest(TestBigdataSailWithQuadsAndPipelineJoins.suite());
+ suite.addTest(TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining.suite());
return suite;
Added: branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining.java
===================================================================
--- branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining.java (rev 0)
+++ branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining.java 2010-07-20 19:40:23 UTC (rev 3249)
@@ -0,0 +1,175 @@
+/**
+Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved.
+
+Contact:
+ SYSTAP, LLC
+ 4501 Tower Road
+ Greensboro, NC 27410
+ lic...@bi...
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+/*
+ * Created on Sep 4, 2008
+ */
+
+package com.bigdata.rdf.sail;
+
+import java.util.Properties;
+
+import junit.extensions.proxy.ProxyTestSuite;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import com.bigdata.rdf.axioms.NoAxioms;
+import com.bigdata.rdf.sail.BigdataSail.Options;
+import com.bigdata.rdf.sail.tck.BigdataConnectionTest;
+import com.bigdata.rdf.sail.tck.BigdataSparqlTest;
+import com.bigdata.rdf.sail.tck.BigdataStoreTest;
+import com.bigdata.relation.AbstractResource;
+
+/**
+ * Test suite for the {@link BigdataSail} with quads enabled. The provenance
+ * mode is disabled. Inference is disabled. This version of the test suite uses
+ * the pipeline join algorithm.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ * @version $Id$
+ */
+public class TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining extends AbstractBigdataSailTestCase {
+
+ /**
+ *
+ */
+ public TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining() {
+ }
+
+ public TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+
+ final TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining delegate = new TestBigdataSailWithQuadsAndPipelineJoinsWithoutInlining(); // !!!! THIS CLASS !!!!
+
+ /*
+ * Use a proxy test suite and specify the delegate.
+ */
+
+ final ProxyTestSuite suite = new ProxyTestSuite(delegate, "SAIL with Quads (pipline joins, no inlining)");
+
+ // test pruning of variables not required for downstream processing.
+ suite.addTestSuite(TestPruneBindingSets.class);
+
+ // misc named graph API stuff.
+ suite.addTestSuite(TestQuadsAPI.class);
+
+ // SPARQL named graphs tests.
+ suite.addTestSuite(TestNamedGraphs.class);
+
+ // test suite for optionals handling (left joins).
+ suite.addTestSuite(TestOptionals.class);
+
+ // test of the search magic predicate
+ suite.addTestSuite(TestSearchQuery.class);
+
+ // high-level query tests.
+ suite.addTestSuite(TestQuery.class);
+
+ // test of high-level query on a graph with statements about statements.
+ suite.addTestSuite(TestProvenanceQuery.class);
+
+ // unit tests for custom evaluation of high-level query
+ suite.addTestSuite(TestBigdataSailEvaluationStrategyImpl.class);
+
+ // The Sesame TCK, including the SPARQL test suite.
+ {
+
+ final TestSuite tckSuite = new TestSuite("Sesame 2.x TCK");
+
+ tckSuite.addTestSuite(BigdataStoreTest.LTSWithPipelineJoins.class);
+
+ tckSuite.addTestSuite(BigdataConnectionTest.LTSWithPipelineJoins.class);
+
+ try {
+
+ tckSuite.addTest(BigdataSparqlTest.suiteLTSWithPipelineJoins());
+
+ } catch (Exception ex) {
+
+ throw new RuntimeException(ex);
+
+ }
+
+ suite.addTest(tckSuite);
+
+ }
+
+ return suite;
+
+ }
+
+ @Override
+ protected BigdataSail getSail(final Properties properties) {
+
+ return new BigdataSail(properties);
+
+ }
+
+ public Properties getProperties() {
+
+ final Properties properties = new Properties(super.getProperties());
+/*
+ properties.setProperty(Options.STATEMENT_IDENTIFIERS, "false");
+
+ properties.setProperty(Options.QUADS, "true");
+
+ properties.setProperty(Options.AXIOMS_CLASS, NoAxioms.class.getName());
+*/
+ properties.setProperty(Options.QUADS_MODE, "true");
+
+ properties.setProperty(Options.TRUTH_MAINTENANCE, "false");
+
+ properties.setProperty(AbstractResource.Options.NESTED_SUBQUERY, "false");
+
+ properties.setProperty(Options.INLINE_TERMS, "false");
+
+ return properties;
+
+ }
+
+ @Override
+ protected BigdataSail reopenSail(BigdataSail sail) {
+
+ final Properties properties = sail.database.getProperties();
+
+ if (sail.isOpen()) {
+
+ try {
+
+ sail.shutDown();
+
+ } catch (Exception ex) {
+
+ throw new RuntimeException(ex);
+
+ }
+
+ }
+
+ return getSail(properties);
+
+ }
+
+}
Added: branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithSidsWithoutInlining.java
===================================================================
--- branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithSidsWithoutInlining.java (rev 0)
+++ branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestBigdataSailWithSidsWithoutInlining.java 2010-07-20 19:40:23 UTC (rev 3249)
@@ -0,0 +1,130 @@
+/**
+Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved.
+
+Contact:
+ SYSTAP, LLC
+ 4501 Tower Road
+ Greensboro, NC 27410
+ lic...@bi...
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+/*
+ * Created on Sep 4, 2008
+ */
+
+package com.bigdata.rdf.sail;
+
+import java.util.Properties;
+
+import junit.extensions.proxy.ProxyTestSuite;
+import junit.framework.Test;
+
+import com.bigdata.rdf.sail.BigdataSail.Options;
+
+/**
+ * Test suite for the {@link BigdataSail} with statement identifiers enabled.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ * @version $Id$
+ */
+public class TestBigdataSailWithSidsWithoutInlining extends AbstractBigdataSailTestCase {
+
+ /**
+ *
+ */
+ public TestBigdataSailWithSidsWithoutInlining() {
+ }
+
+ public TestBigdataSailWithSidsWithoutInlining(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+
+ final TestBigdataSailWithSidsWithoutInlining delegate = new TestBigdataSailWithSidsWithoutInlining(); // !!!! THIS CLASS !!!!
+
+ /*
+ * Use a proxy test suite and specify the delegate.
+ */
+
+ final ProxyTestSuite suite = new ProxyTestSuite(delegate, "SAIL with SIDS (no inlining)");
+
+ // test pruning of variables not required for downstream processing.
+ suite.addTestSuite(TestPruneBindingSets.class);
+
+ // test of the search magic predicate
+ suite.addTestSuite(TestSearchQuery.class);
+
+ // high-level query tests.
+ suite.addTestSuite(TestQuery.class);
+
+ // test of high-level query on a graph with statements about statements.
+ suite.addTestSuite(TestProvenanceQuery.class);
+
+ suite.addTestSuite(TestBigdataSailEvaluationStrategyImpl.class);
+
+ suite.addTestSuite(TestReadWriteTransactions.class);
+
+ return suite;
+
+ }
+
+ @Override
+ protected BigdataSail getSail(Properties properties) {
+
+ return new BigdataSail(properties);
+
+ }
+
+ public Properties getProperties() {
+
+ final Properties properties = new Properties(super.getProperties());
+/*
+ properties.setProperty(Options.STATEMENT_IDENTIFIERS, "true");
+
+ properties.setProperty(Options.QUADS, "false");
+*/
+ properties.setProperty(Options.TRIPLES_MODE_WITH_PROVENANCE, "true");
+
+ properties.setProperty(Options.INLINE_TERMS, "false");
+
+ return properties;
+
+ }
+
+ @Override
+ protected BigdataSail reopenSail(BigdataSail sail) {
+
+ final Properties properties = sail.database.getProperties();
+
+ if (sail.isOpen()) {
+
+ try {
+
+ sail.shutDown();
+
+ } catch (Exception ex) {
+
+ throw new RuntimeException(ex);
+
+ }
+
+ }
+
+ return getSail(properties);
+
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mrp...@us...> - 2010-07-20 17:43:04
|
Revision: 3248
http://bigdata.svn.sourceforge.net/bigdata/?rev=3248&view=rev
Author: mrpersonick
Date: 2010-07-20 17:42:58 +0000 (Tue, 20 Jul 2010)
Log Message:
-----------
minor bug fix
Modified Paths:
--------------
branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java
Modified: branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java
===================================================================
--- branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java 2010-07-20 17:06:52 UTC (rev 3247)
+++ branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/internal/IVUtility.java 2010-07-20 17:42:58 UTC (rev 3248)
@@ -125,7 +125,7 @@
}
// same for BigInteger
- if (dte1 == DTE.XSDDecimal || dte2 == DTE.XSDDecimal) {
+ if (dte1 == DTE.XSDInteger || dte2 == DTE.XSDInteger) {
return num1.integerValue().compareTo(num2.integerValue());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mrp...@us...> - 2010-07-20 17:06:58
|
Revision: 3247
http://bigdata.svn.sourceforge.net/bigdata/?rev=3247&view=rev
Author: mrpersonick
Date: 2010-07-20 17:06:52 +0000 (Tue, 20 Jul 2010)
Log Message:
-----------
fixed an import
Modified Paths:
--------------
branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/rules/RDFJoinNexus.java
Modified: branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/rules/RDFJoinNexus.java
===================================================================
--- branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/rules/RDFJoinNexus.java 2010-07-20 17:06:24 UTC (rev 3246)
+++ branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/rules/RDFJoinNexus.java 2010-07-20 17:06:52 UTC (rev 3247)
@@ -62,6 +62,7 @@
import com.bigdata.rdf.magic.IMagicTuple;
import com.bigdata.rdf.magic.MagicTuple;
import com.bigdata.rdf.model.BigdataValue;
+import com.bigdata.rdf.relation.rule.BindingSetSortKeyBuilder;
import com.bigdata.rdf.spo.ISPO;
import com.bigdata.rdf.spo.SPO;
import com.bigdata.rdf.spo.SPORelation;
@@ -81,7 +82,6 @@
import com.bigdata.relation.accesspath.UnsynchronizedArrayBuffer;
import com.bigdata.relation.locator.IResourceLocator;
import com.bigdata.relation.rule.ArrayBindingSet;
-import com.bigdata.relation.rule.BindingSetSortKeyBuilder;
import com.bigdata.relation.rule.Constant;
import com.bigdata.relation.rule.IBindingSet;
import com.bigdata.relation.rule.IConstant;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mrp...@us...> - 2010-07-20 17:06:30
|
Revision: 3246
http://bigdata.svn.sourceforge.net/bigdata/?rev=3246&view=rev
Author: mrpersonick
Date: 2010-07-20 17:06:24 +0000 (Tue, 20 Jul 2010)
Log Message:
-----------
move to bigdata-rdf module from bigdata module
Added Paths:
-----------
branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/relation/rule/BindingSetSortKeyBuilder.java
Removed Paths:
-------------
branches/LEXICON_REFACTOR_BRANCH/bigdata/src/java/com/bigdata/relation/rule/BindingSetSortKeyBuilder.java
Deleted: branches/LEXICON_REFACTOR_BRANCH/bigdata/src/java/com/bigdata/relation/rule/BindingSetSortKeyBuilder.java
===================================================================
--- branches/LEXICON_REFACTOR_BRANCH/bigdata/src/java/com/bigdata/relation/rule/BindingSetSortKeyBuilder.java 2010-07-20 17:05:39 UTC (rev 3245)
+++ branches/LEXICON_REFACTOR_BRANCH/bigdata/src/java/com/bigdata/relation/rule/BindingSetSortKeyBuilder.java 2010-07-20 17:06:24 UTC (rev 3246)
@@ -1,103 +0,0 @@
-/*
-
-Copyright (C) SYSTAP, LLC 2006-2008. All rights reserved.
-
-Contact:
- SYSTAP, LLC
- 4501 Tower Road
- Greensboro, NC 27410
- lic...@bi...
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; version 2 of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-*/
-/*
- * Created on Sep 15, 2008
- */
-
-package com.bigdata.relation.rule;
-
-import com.bigdata.btree.keys.IKeyBuilder;
-import com.bigdata.btree.keys.ISortKeyBuilder;
-import com.bigdata.rdf.internal.IV;
-
-/**
- * Builds unsigned byte[] sort keys from {@link IBindingSet}s.
- *
- * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
- * @version $Id$
- */
-public class BindingSetSortKeyBuilder implements ISortKeyBuilder<IBindingSet> {
-
- private final IKeyBuilder keyBuilder;
- private final IVariable[] vars;
-
- /**
- *
- * @param keyBuilder
- * Used to generate the unsigned byte[] key for each bound
- * variable. In particular, the configuration for the
- * {@link IKeyBuilder} governs how Unicode fields are handled.
- * @param vars
- * An array of {@link IVariable}s, all of which MUST be bound.
- */
- public BindingSetSortKeyBuilder(final IKeyBuilder keyBuilder,
- final IVariable[] vars) {
-
- if (keyBuilder == null)
- throw new IllegalArgumentException();
-
- if (vars == null || vars.length == 0)
- throw new IllegalArgumentException();
-
- this.keyBuilder = keyBuilder;
-
- this.vars = vars;
-
- }
-
- public byte[] getSortKey(final IBindingSet bindingSet) {
-
- keyBuilder.reset();
-
- for (int i = 0; i < vars.length; i++) {
-
- final IVariable var = vars[i];
-
- Object val = bindingSet.get(var);
- if(val==null) {
- val=Long.valueOf(0);
- }else if(val instanceof Constant) {
- val=((Constant)val).get();
- }
-
- if (val instanceof IV) {
-
- final IV iv = (IV) val;
-
- iv.encode(keyBuilder);
-
- } else {
-
- keyBuilder.append(val);
-
- }
-
- }
-
- return keyBuilder.getKey();
-
- }
-
-}
Copied: branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/relation/rule/BindingSetSortKeyBuilder.java (from rev 3242, branches/LEXICON_REFACTOR_BRANCH/bigdata/src/java/com/bigdata/relation/rule/BindingSetSortKeyBuilder.java)
===================================================================
--- branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/relation/rule/BindingSetSortKeyBuilder.java (rev 0)
+++ branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/relation/rule/BindingSetSortKeyBuilder.java 2010-07-20 17:06:24 UTC (rev 3246)
@@ -0,0 +1,110 @@
+/*
+
+Copyright (C) SYSTAP, LLC 2006-2008. All rights reserved.
+
+Contact:
+ SYSTAP, LLC
+ 4501 Tower Road
+ Greensboro, NC 27410
+ lic...@bi...
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; version 2 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+/*
+ * Created on Sep 15, 2008
+ */
+
+package com.bigdata.rdf.relation.rule;
+
+import com.bigdata.btree.keys.IKeyBuilder;
+import com.bigdata.btree.keys.ISortKeyBuilder;
+import com.bigdata.rdf.internal.IV;
+import com.bigdata.relation.rule.Constant;
+import com.bigdata.relation.rule.IBindingSet;
+import com.bigdata.relation.rule.IVariable;
+
+/**
+ * Builds unsigned byte[] sort keys from {@link IBindingSet}s.
+ *
+ * @author <a href="mailto:tho...@us...">Bryan Thompson</a>
+ * @version $Id$
+ */
+public class BindingSetSortKeyBuilder implements ISortKeyBuilder<IBindingSet> {
+
+ private final IKeyBuilder keyBuilder;
+ private final IVariable[] vars;
+
+ /**
+ *
+ * @param keyBuilder
+ * Used to generate the unsigned byte[] key for each bound
+ * variable. In particular, the configuration for the
+ * {@link IKeyBuilder} governs how Unicode fields are handled.
+ * @param vars
+ * An array of {@link IVariable}s, all of which MUST be bound.
+ */
+ public BindingSetSortKeyBuilder(final IKeyBuilder keyBuilder,
+ final IVariable[] vars) {
+
+ if (keyBuilder == null)
+ throw new IllegalArgumentException();
+
+ if (vars == null || vars.length == 0)
+ throw new IllegalArgumentException();
+
+ this.keyBuilder = keyBuilder;
+
+ this.vars = vars;
+
+ }
+
+ public byte[] getSortKey(final IBindingSet bindingSet) {
+
+ keyBuilder.reset();
+
+ for (int i = 0; i < vars.length; i++) {
+
+ final IVariable var = vars[i];
+
+ /*
+ * FIXME Do we ever get unbound values here? This looks suspiciously
+ * like old Long code to me.
+ */
+ Object val = bindingSet.get(var);
+ if(val==null) {
+ val=Long.valueOf(0);
+ }else if(val instanceof Constant) {
+ val=((Constant)val).get();
+ }
+
+ if (val instanceof IV) {
+
+ final IV iv = (IV) val;
+
+ iv.encode(keyBuilder);
+
+ } else {
+
+ keyBuilder.append(val);
+
+ }
+
+ }
+
+ return keyBuilder.getKey();
+
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mrp...@us...> - 2010-07-20 17:05:45
|
Revision: 3245
http://bigdata.svn.sourceforge.net/bigdata/?rev=3245&view=rev
Author: mrpersonick
Date: 2010-07-20 17:05:39 +0000 (Tue, 20 Jul 2010)
Log Message:
-----------
turn off support for XSDDecimal for now
Modified Paths:
--------------
branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/lexicon/LexiconRelation.java
Modified: branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/lexicon/LexiconRelation.java
===================================================================
--- branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/lexicon/LexiconRelation.java 2010-07-20 16:17:08 UTC (rev 3244)
+++ branches/LEXICON_REFACTOR_BRANCH/bigdata-rdf/src/java/com/bigdata/rdf/lexicon/LexiconRelation.java 2010-07-20 17:05:39 UTC (rev 3245)
@@ -2253,9 +2253,9 @@
case XSDInteger:
iv = new XSDIntegerInternalValue(XMLDatatypeUtil.parseInteger(v));
break;
- case XSDDecimal:
- iv = new XSDDecimalInternalValue(XMLDatatypeUtil.parseDecimal(v));
- break;
+// case XSDDecimal:
+// iv = new XSDDecimalInternalValue(XMLDatatypeUtil.parseDecimal(v));
+// break;
case UUID:
iv = new UUIDInternalValue(UUID.fromString(v));
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mrp...@us...> - 2010-07-20 16:17:14
|
Revision: 3244
http://bigdata.svn.sourceforge.net/bigdata/?rev=3244&view=rev
Author: mrpersonick
Date: 2010-07-20 16:17:08 +0000 (Tue, 20 Jul 2010)
Log Message:
-----------
test case for named graph search query
Modified Paths:
--------------
trunk/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNamedGraphs.java
Modified: trunk/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNamedGraphs.java
===================================================================
--- trunk/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNamedGraphs.java 2010-07-20 16:12:35 UTC (rev 3243)
+++ trunk/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNamedGraphs.java 2010-07-20 16:17:08 UTC (rev 3244)
@@ -33,7 +33,9 @@
import org.apache.log4j.Logger;
import org.openrdf.model.BNode;
+import org.openrdf.model.Resource;
import org.openrdf.model.URI;
+import org.openrdf.model.ValueFactory;
import org.openrdf.model.impl.BNodeImpl;
import org.openrdf.model.impl.LiteralImpl;
import org.openrdf.model.impl.URIImpl;
@@ -50,6 +52,7 @@
import org.openrdf.query.impl.BindingImpl;
import org.openrdf.repository.RepositoryException;
import org.openrdf.sail.SailException;
+import com.bigdata.rdf.store.BD;
/**
* Unit tests for named graphs. Specify
@@ -1559,4 +1562,114 @@
}
+ public void testSearchQuery() throws Exception {
+
+ final BigdataSail sail = getSail();
+ sail.initialize();
+ final BigdataSailRepository repo = new BigdataSailRepository(sail);
+ final BigdataSailRepositoryConnection cxn = (BigdataSailRepositoryConnection) repo
+ .getConnection();
+ cxn.setAutoCommit(false);
+
+ try {
+
+ if (!sail.getDatabase().isQuads()) {
+
+ log.warn("test requires quads.");
+
+ return;
+
+ }
+
+ final ValueFactory vf = cxn.getValueFactory();
+
+ //create context
+ final Resource context1 = vf.createURI( "http://example.org" );
+
+ //add statement to context1
+ cxn.add( vf.createStatement(
+ vf.createURI("http://example.org#Chris"),
+ RDFS.LABEL,
+ vf.createLiteral("Chris") ),
+ context1);
+ cxn.commit();
+
+ //add statement to default graph
+ cxn.add( vf.createStatement(
+ vf.createURI("http://example.org#Christian"),
+ RDFS.LABEL,
+ vf.createLiteral("Christian") ) );
+ cxn.commit();
+
+ {
+ //when running this query, we correctly get bindings for both triples
+ final String query =
+ "select ?x ?y " +
+ "where { " +
+ " ?y <"+ BD.SEARCH+"> \"Chris\" . " +
+ " ?x <"+ RDFS.LABEL.stringValue() + "> ?y . " +
+ "}";
+
+ final TupleQuery tupleQuery = cxn.prepareTupleQuery(
+ QueryLanguage.SPARQL, query);
+ final TupleQueryResult result = tupleQuery.evaluate();
+
+// int i = 1;
+// while (result.hasNext()) {
+// System.err.println(i++ + "#: " + result.next());
+// }
+
+ final Collection<BindingSet> answer = new LinkedList<BindingSet>();
+ answer.add(createBindingSet(//
+ new BindingImpl("x", vf.createURI("http://example.org#Christian")),//
+ new BindingImpl("y", vf.createLiteral("Christian"))//
+ ));
+ answer.add(createBindingSet(//
+ new BindingImpl("x", vf.createURI("http://example.org#Chris")),//
+ new BindingImpl("y", vf.createLiteral("Chris"))//
+ ));
+
+ compare(result, answer);
+
+ }
+
+ {
+ //however, when running this query, we incorrectly get both results as it should only return bindings for the triple added to context 1.
+ String query =
+ "select ?x ?y " +
+ "where { " +
+ " graph <http://example.org> { " +
+ " ?y <"+ BD.SEARCH+"> \"Chris\" . " +
+ " ?x <"+ RDFS.LABEL.stringValue() + "> ?y ." +
+ " } . " +
+ "}";
+
+ final TupleQuery tupleQuery = cxn.prepareTupleQuery(
+ QueryLanguage.SPARQL, query);
+ final TupleQueryResult result = tupleQuery.evaluate();
+
+// int i = 1;
+// while (result.hasNext()) {
+// System.err.println(i++ + "#: " + result.next());
+// }
+
+ final Collection<BindingSet> answer = new LinkedList<BindingSet>();
+ answer.add(createBindingSet(//
+ new BindingImpl("x", vf.createURI("http://example.org#Chris")),//
+ new BindingImpl("y", vf.createLiteral("Chris"))//
+ ));
+
+ compare(result, answer);
+
+ }
+
+ } finally {
+
+ cxn.close();
+ sail.__tearDownUnitTest();
+
+ }
+
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mrp...@us...> - 2010-07-20 16:12:42
|
Revision: 3243
http://bigdata.svn.sourceforge.net/bigdata/?rev=3243&view=rev
Author: mrpersonick
Date: 2010-07-20 16:12:35 +0000 (Tue, 20 Jul 2010)
Log Message:
-----------
test case for named graph search query
Modified Paths:
--------------
branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNamedGraphs.java
Modified: branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNamedGraphs.java
===================================================================
--- branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNamedGraphs.java 2010-07-20 15:54:46 UTC (rev 3242)
+++ branches/LEXICON_REFACTOR_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/TestNamedGraphs.java 2010-07-20 16:12:35 UTC (rev 3243)
@@ -28,28 +28,27 @@
import java.io.IOException;
import java.util.Collection;
-import java.util.Iterator;
import java.util.LinkedList;
-
import org.apache.log4j.Logger;
import org.openrdf.model.BNode;
+import org.openrdf.model.Resource;
import org.openrdf.model.URI;
+import org.openrdf.model.ValueFactory;
import org.openrdf.model.impl.BNodeImpl;
import org.openrdf.model.impl.LiteralImpl;
import org.openrdf.model.impl.URIImpl;
import org.openrdf.model.vocabulary.RDF;
import org.openrdf.model.vocabulary.RDFS;
-import org.openrdf.query.Binding;
import org.openrdf.query.BindingSet;
import org.openrdf.query.MalformedQueryException;
import org.openrdf.query.QueryEvaluationException;
import org.openrdf.query.QueryLanguage;
import org.openrdf.query.TupleQuery;
import org.openrdf.query.TupleQueryResult;
-import org.openrdf.query.algebra.evaluation.QueryBindingSet;
import org.openrdf.query.impl.BindingImpl;
import org.openrdf.repository.RepositoryException;
import org.openrdf.sail.SailException;
+import com.bigdata.rdf.store.BD;
/**
* Unit tests for named graphs. Specify
@@ -1558,5 +1557,115 @@
}
}
+
+ public void testSearchQuery() throws Exception {
+
+ final BigdataSail sail = getSail();
+ sail.initialize();
+ final BigdataSailRepository repo = new BigdataSailRepository(sail);
+ final BigdataSailRepositoryConnection cxn = (BigdataSailRepositoryConnection) repo
+ .getConnection();
+ cxn.setAutoCommit(false);
+ try {
+
+ if (!sail.getDatabase().isQuads()) {
+
+ log.warn("test requires quads.");
+
+ return;
+
+ }
+
+ final ValueFactory vf = cxn.getValueFactory();
+
+ //create context
+ final Resource context1 = vf.createURI( "http://example.org" );
+
+ //add statement to context1
+ cxn.add( vf.createStatement(
+ vf.createURI("http://example.org#Chris"),
+ RDFS.LABEL,
+ vf.createLiteral("Chris") ),
+ context1);
+ cxn.commit();
+
+ //add statement to default graph
+ cxn.add( vf.createStatement(
+ vf.createURI("http://example.org#Christian"),
+ RDFS.LABEL,
+ vf.createLiteral("Christian") ) );
+ cxn.commit();
+
+ {
+ //when running this query, we correctly get bindings for both triples
+ final String query =
+ "select ?x ?y " +
+ "where { " +
+ " ?y <"+ BD.SEARCH+"> \"Chris\" . " +
+ " ?x <"+ RDFS.LABEL.stringValue() + "> ?y . " +
+ "}";
+
+ final TupleQuery tupleQuery = cxn.prepareTupleQuery(
+ QueryLanguage.SPARQL, query);
+ final TupleQueryResult result = tupleQuery.evaluate();
+
+// int i = 1;
+// while (result.hasNext()) {
+// System.err.println(i++ + "#: " + result.next());
+// }
+
+ final Collection<BindingSet> answer = new LinkedList<BindingSet>();
+ answer.add(createBindingSet(//
+ new BindingImpl("x", vf.createURI("http://example.org#Christian")),//
+ new BindingImpl("y", vf.createLiteral("Christian"))//
+ ));
+ answer.add(createBindingSet(//
+ new BindingImpl("x", vf.createURI("http://example.org#Chris")),//
+ new BindingImpl("y", vf.createLiteral("Chris"))//
+ ));
+
+ compare(result, answer);
+
+ }
+
+ {
+ //however, when running this query, we incorrectly get both results as it should only return bindings for the triple added to context 1.
+ String query =
+ "select ?x ?y " +
+ "where { " +
+ " graph <http://example.org> { " +
+ " ?y <"+ BD.SEARCH+"> \"Chris\" . " +
+ " ?x <"+ RDFS.LABEL.stringValue() + "> ?y ." +
+ " } . " +
+ "}";
+
+ final TupleQuery tupleQuery = cxn.prepareTupleQuery(
+ QueryLanguage.SPARQL, query);
+ final TupleQueryResult result = tupleQuery.evaluate();
+
+// int i = 1;
+// while (result.hasNext()) {
+// System.err.println(i++ + "#: " + result.next());
+// }
+
+ final Collection<BindingSet> answer = new LinkedList<BindingSet>();
+ answer.add(createBindingSet(//
+ new BindingImpl("x", vf.createURI("http://example.org#Chris")),//
+ new BindingImpl("y", vf.createLiteral("Chris"))//
+ ));
+
+ compare(result, answer);
+
+ }
+
+ } finally {
+
+ cxn.close();
+ sail.__tearDownUnitTest();
+
+ }
+
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|