You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2013/05/27 19:28:29 UTC

svn commit: r1486678 - /jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/TupleIndexWrapper.java

Author: andy
Date: Mon May 27 17:28:28 2013
New Revision: 1486678

URL: http://svn.apache.org/r1486678
Log:
Add TupleIndexWrapper

Added:
    jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/TupleIndexWrapper.java

Added: jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/TupleIndexWrapper.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/TupleIndexWrapper.java?rev=1486678&view=auto
==============================================================================
--- jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/TupleIndexWrapper.java (added)
+++ jena/trunk/jena-tdb/src/main/java/com/hp/hpl/jena/tdb/index/TupleIndexWrapper.java Mon May 27 17:28:28 2013
@@ -0,0 +1,104 @@
+/*
+ * 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.
+ */
+
+package com.hp.hpl.jena.tdb.index;
+
+import java.util.Iterator ;
+
+import org.apache.jena.atlas.lib.ColumnMap ;
+import org.apache.jena.atlas.lib.Tuple ;
+
+import com.hp.hpl.jena.tdb.index.TupleIndex ;
+import com.hp.hpl.jena.tdb.store.NodeId ;
+
+public class TupleIndexWrapper implements TupleIndex
+{
+    protected final TupleIndex index ;
+
+    public TupleIndexWrapper(TupleIndex index) { this.index = index ; }
+
+    @Override
+    public boolean add(Tuple<NodeId> tuple) {
+        return index.add(tuple) ;
+    }
+
+    @Override
+    public boolean delete(Tuple<NodeId> tuple) {
+        return index.delete(tuple) ;
+    }
+
+    @Override
+    public Iterator<Tuple<NodeId>> find(Tuple<NodeId> pattern) {
+        return index.find(pattern) ;
+    }
+
+    @Override
+    public Iterator<Tuple<NodeId>> all() {
+        return index.all() ;
+    }
+
+    @Override
+    public int getTupleLength() {
+        return index.getTupleLength() ;
+    }
+
+    @Override
+    public String getMapping() {
+        return index.getMapping() ;
+    }
+
+    @Override
+    public ColumnMap getColumnMap() {
+        return index.getColumnMap() ;
+    }
+
+    @Override
+    public String getName() {
+        return index.getName() ;
+    }
+
+    @Override
+    public int weight(Tuple<NodeId> pattern) {
+        return index.weight(pattern) ;
+    }
+
+    @Override
+    public long size() {
+        return index.size() ;
+    }
+
+    @Override
+    public boolean isEmpty() {
+        return index.isEmpty() ;
+    }
+
+    @Override
+    public void clear() {
+        index.clear() ;
+    }
+
+    @Override
+    public void sync() {
+        index.sync() ;
+    }
+
+    @Override
+    public void close() {
+        index.close() ;
+    }
+}