Repository: incubator-rya
Updated Branches:
refs/heads/master bcf152eea -> f58eedadc
RYA-83-select-all-spo-query-support added capability to perform SELECT * { s?
p? o? } queries.
Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/015dcd31
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/015dcd31
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/015dcd31
Branch: refs/heads/master
Commit: 015dcd310781b5965766941339b4f7b8247a109f
Parents: bcf152e
Author: John Smith <[email protected]>
Authored: Wed Jan 4 14:10:14 2017 -0800
Committer: pujav65 <[email protected]>
Committed: Fri Jan 6 11:55:47 2017 -0500
----------------------------------------------------------------------
.../wholerow/NullRowTriplePatternStrategy.java | 52 ++++++++++++++++++++
.../rya/api/resolver/RyaTripleContext.java | 2 +
2 files changed, 54 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/015dcd31/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategy.java
----------------------------------------------------------------------
diff --git
a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategy.java
b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategy.java
new file mode 100644
index 0000000..314ce91
--- /dev/null
+++
b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategy.java
@@ -0,0 +1,52 @@
+package org.apache.rya.api.query.strategy.wholerow;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.IOException;
+import java.util.Map;
+import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
+import static org.apache.rya.api.RdfCloudTripleStoreConstants.*;
+import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
+import org.apache.rya.api.RdfCloudTripleStoreUtils;
+import org.apache.rya.api.domain.RyaType;
+import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.query.strategy.AbstractTriplePatternStrategy;
+import org.apache.rya.api.query.strategy.ByteRange;
+
+public class NullRowTriplePatternStrategy extends
AbstractTriplePatternStrategy {
+
+ @Override
+ public TABLE_LAYOUT getLayout() {
+ return TABLE_LAYOUT.SPO;
+ }
+
+ @Override
+ public Map.Entry<TABLE_LAYOUT, ByteRange> defineRange(RyaURI subject,
RyaURI predicate, RyaType object,
+ RyaURI context,
RdfCloudTripleStoreConfiguration conf) throws IOException {
+ byte[] start = new byte[]{ /* empty array */ }; // Scan from the
beginning of the Accumulo Table
+ byte[] stop = LAST_BYTES; // Scan to the end, up through things
beginning with 0xff.
+ return new RdfCloudTripleStoreUtils.CustomEntry<>(TABLE_LAYOUT.SPO, new
ByteRange(start, stop));
+ }
+
+ @Override
+ public boolean handles(RyaURI subject, RyaURI predicate, RyaType object,
RyaURI context) {
+ return subject == null && predicate == null && object == null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/015dcd31/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaTripleContext.java
----------------------------------------------------------------------
diff --git
a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaTripleContext.java
b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaTripleContext.java
index a8c6e7b..17fab47 100644
---
a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaTripleContext.java
+++
b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaTripleContext.java
@@ -37,6 +37,7 @@ import org.apache.rya.api.domain.RyaURI;
import org.apache.rya.api.query.strategy.TriplePatternStrategy;
import
org.apache.rya.api.query.strategy.wholerow.HashedPoWholeRowTriplePatternStrategy;
import
org.apache.rya.api.query.strategy.wholerow.HashedSpoWholeRowTriplePatternStrategy;
+import org.apache.rya.api.query.strategy.wholerow.NullRowTriplePatternStrategy;
import
org.apache.rya.api.query.strategy.wholerow.OspWholeRowTriplePatternStrategy;
import
org.apache.rya.api.query.strategy.wholerow.PoWholeRowTriplePatternStrategy;
import
org.apache.rya.api.query.strategy.wholerow.SpoWholeRowTriplePatternStrategy;
@@ -97,6 +98,7 @@ public class RyaTripleContext {
else {
triplePatternStrategyList.add(new
SpoWholeRowTriplePatternStrategy());
triplePatternStrategyList.add(new
PoWholeRowTriplePatternStrategy());
+ triplePatternStrategyList.add(new NullRowTriplePatternStrategy());
}
triplePatternStrategyList.add(new OspWholeRowTriplePatternStrategy());
}