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 2016/01/05 13:45:57 UTC
[03/20] jena git commit: JENA-1108 : jena-cmds module
http://git-wip-us.apache.org/repos/asf/jena/blob/498b2264/jena-tdb/src/main/java/tdb/tools/tdbgenindex.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/main/java/tdb/tools/tdbgenindex.java b/jena-tdb/src/main/java/tdb/tools/tdbgenindex.java
deleted file mode 100644
index 9371ce2..0000000
--- a/jena-tdb/src/main/java/tdb/tools/tdbgenindex.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * 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 tdb.tools ;
-
-import java.util.Iterator ;
-
-import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.atlas.lib.tuple.Tuple ;
-import org.apache.jena.tdb.base.file.Location ;
-import org.apache.jena.tdb.store.NodeId ;
-import org.apache.jena.tdb.store.tupletable.TupleIndex ;
-import org.apache.jena.tdb.sys.Names ;
-import org.apache.jena.tdb.sys.SetupTDB ;
-import org.apache.jena.tdb.sys.SystemTDB ;
-
-/** copy one index to another, possibly changing the order */
-public class tdbgenindex {
- public static void main(String... argv) {
- // Usage: srcLocation indexName dstLocation indexName
- if ( argv.length != 4 ) {
- System.err.println("Usage: " + Lib.classShortName(tdbgenindex.class) + " srcLocation srcIndex dstLocation dstIndex") ;
- System.exit(1) ;
- }
-
- Location srcLoc = Location.create(argv[0]) ;
- String srcIndexName = argv[1] ;
-
- Location dstLoc = Location.create(argv[2]) ;
- String dstIndexName = argv[3] ;
-
- int readCacheSize = 0 ;
- int writeCacheSize = -1 ;
-
- if ( srcIndexName.length() != dstIndexName.length() ) {
- System.err.println("srcIndexName.length() != dstIndexName.length() " + srcIndexName + " :: " + dstIndexName) ;
- System.exit(1) ;
- }
-
- String primary ;
- int dftKeyLength ;
- int dftValueLength ;
-
- if ( srcIndexName.length() == 3 ) {
- primary = Names.primaryIndexTriples ;
- dftKeyLength = SystemTDB.LenIndexTripleRecord ;
- dftValueLength = 0 ;
- } else if ( srcIndexName.length() == 4 ) {
- primary = Names.primaryIndexQuads ;
- dftKeyLength = SystemTDB.LenIndexQuadRecord ;
- dftValueLength = 0 ;
- } else {
- System.err.println("indexlength != 3 or 4") ;
- System.exit(1) ;
- primary = null ;
- dftKeyLength = 0 ;
- dftValueLength = 0 ;
- }
-
- TupleIndex srcIdx = SetupTDB.makeTupleIndex(srcLoc, primary, srcIndexName, srcIndexName, dftKeyLength) ;
- TupleIndex dstIdx = SetupTDB.makeTupleIndex(dstLoc, primary, dstIndexName, dstIndexName, dftKeyLength) ;
-
- Iterator<Tuple<NodeId>> iter = srcIdx.all() ;
- for ( ; iter.hasNext() ; ) {
- Tuple<NodeId> tuple = iter.next() ;
- dstIdx.add(tuple) ;
- }
- srcIdx.close() ;
- dstIdx.close() ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/498b2264/jena-text/pom.xml
----------------------------------------------------------------------
diff --git a/jena-text/pom.xml b/jena-text/pom.xml
index 7b8b78d..8f81f13 100644
--- a/jena-text/pom.xml
+++ b/jena-text/pom.xml
@@ -46,6 +46,12 @@
</dependency>
<dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-cmds</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>