jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [17/50] [abbrv] jena git commit: Tweak documentation
Date Thu, 28 Sep 2017 11:08:33 GMT
Tweak documentation


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/df590825
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/df590825
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/df590825

Branch: refs/heads/jena-tdb2
Commit: df5908256c889b28b4ab18dfa0d9bba18c79490a
Parents: dcfa94e
Author: Andy Seaborne <andy@seaborne.org>
Authored: Mon Sep 4 16:36:35 2017 +0100
Committer: Andy Seaborne <andy@seaborne.org>
Committed: Mon Sep 4 16:36:35 2017 +0100

----------------------------------------------------------------------
 use-fuseki-tdb2.md |  9 ++++--
 use-tdb2-cmds.md   |  3 +-
 use-tdb2.md        | 73 +++++++++----------------------------------------
 3 files changed, 20 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/df590825/use-fuseki-tdb2.md
----------------------------------------------------------------------
diff --git a/use-fuseki-tdb2.md b/use-fuseki-tdb2.md
index bafdc30..4c02612 100644
--- a/use-fuseki-tdb2.md
+++ b/use-fuseki-tdb2.md
@@ -2,11 +2,11 @@ There is a combined Fuseki server jar:
 
 Release builds are available from the central maven repository:
 
-https://central.maven.org/maven2/org/seaborne/mantis/fuseki-tdb2/)
+https://central.maven.org/maven2/org/seaborne/mantis/fuseki-tdb2/
 
 and development builds at:
 
-https://oss.sonatype.org/content/repositories/snapshots/org/seaborne/mantis/fuseki-tdb2/)
+https://oss.sonatype.org/content/repositories/snapshots/org/seaborne/mantis/fuseki-tdb2/
 
 
 In addition, you will need a copy of Apache Jena Fuseki to get the web pages.
@@ -15,6 +15,7 @@ In addition, you will need a copy of Apache Jena Fuseki to get the web pages.
 ## Set the environment variable FUSEKI_HOME to the location of a
 ## Fuseki2 distribution to pick up the admin UI web pages.
 export FUSEKI_HOME=???? 
+export FUSEKI_BASE="$FUSEKI_HOME"
 # Alternatively, copy or link "webapp" in this directory
 # to the webapp of a distribution.
 
@@ -59,4 +60,6 @@ in `DB2` is:
 
 The key difference is the declared `rdf:type` of the dataset.
 
-Note that the Fuseki UI does not provide a way to create TDB2 databases; a configuration
file must be used. Once setup, upload, query and graph editting will be routed to the TDB2
database.
+Note that the Fuseki UI does not provide a way to create TDB2 databases;
+a configuration file must be used. Once setup, upload, query and graph
+editting will be routed to the TDB2 database.

http://git-wip-us.apache.org/repos/asf/jena/blob/df590825/use-tdb2-cmds.md
----------------------------------------------------------------------
diff --git a/use-tdb2-cmds.md b/use-tdb2-cmds.md
index f2846ce..b420c9d 100644
--- a/use-tdb2-cmds.md
+++ b/use-tdb2-cmds.md
@@ -6,6 +6,7 @@ command has help message; the arguments are the mostly the same as TDB1.
 
 * `tdb2.tdbbackup`
 * `tdb2.tdbdump`
+* `tdb2.tdbcompact` (not in v 0.3.0)
 * `tdb2.tdbloader`
 * `tdb2.tdbquery`
 * `tdb2.tdbstats`
@@ -13,8 +14,6 @@ command has help message; the arguments are the mostly the same as TDB1.
 
 [Command line jar (release builds)](http://central.maven.org/maven2/org/seaborne/mantis/tdb2-cmds/
 
-[Development builds (Sonatype snapshot repository)](https://oss.sonatype.org/content/repositories/snapshots/org/seaborne/mantis/tdb2-cmds/)
-
 Example usage:
 
 ```

http://git-wip-us.apache.org/repos/asf/jena/blob/df590825/use-tdb2.md
----------------------------------------------------------------------
diff --git a/use-tdb2.md b/use-tdb2.md
index 2101437..9208366 100644
--- a/use-tdb2.md
+++ b/use-tdb2.md
@@ -1,74 +1,27 @@
 *TDB2 is not compatible with Apache Jena TDB (TDB1).*
 
-
-TDB2 example:
-
-Set the repositories (see below) and use:
+The maven artifact, a non-Apache build, is in maven central:
 ```
    <dependency>
      <groupId>org.seaborne.mantis</groupId>
      <artifactId>tdb2</artifactId>
-     <version>X.Y.Z</version>
+     <version>0.3.0</version>
    </dependency>
 ```
 
+Simple migration is to use `TDB2Factory` in placeTDFCatory to create
+datasets. `DatasetGraph` objects are now created via `DatabaseMgr`.
 
 Example code: **`TDB2Factory`**
 
-For disk location 
-
-```
-     public static void main(String[] args) {
-        Quad q1 = SSE.parseQuad("(_ <s> <p> 1 )") ; 
-        # In-memory dataset.
-        DatasetGraph dsg = TDB2Factory.createDatasetGraph() ;
-        # Transactions are required.
-        Txn.execWrite(dsg, ()->{
-            dsg.add(q1) ;        
-        }) ;
-            
-        Txn.execRead(dsg, ()->{
-            RDFDataMgr.write(System.out, dsg, Lang.TRIG) ;
-        }) ;
-        System.out.println("-----------") ;
-        
-        Quad q2 = SSE.parseQuad("(_ <s> <p> 2 )") ;
-        TransactionalSystem txnSystem = ((DatasetGraphTDB)dsg).getTxnSystem() ;
-        dsg.begin(ReadWrite.READ);
-        Transaction txn = txnSystem.getThreadTransaction() ;
-        boolean b = txn.promote() ;
-        if ( ! b ) {
-            System.out.println("Did not promote");
-            throw new RuntimeException() ;
-        }
-        
-        dsg.add(q2) ;
-        dsg.commit() ;
-        dsg.end() ;
-        
-        Txn.execRead(dsg, ()->{
-            RDFDataMgr.write(System.out, dsg, Lang.TRIG) ;
-        }) ;
-    }        
-```
-
-Maven repositories setup:
-
-For development builds:
-
 ```
-  <repositories>
-    <!-- Sonatype snapshot repository -->
-    <repository>
-      <id>sonatype.public</id>
-      <name>Sonatype Snapshots Repository</name>
-      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
+    public static void main(String[] args) {
+         Dataset ds = TDB2Factory.createDatasetGraph() ;
+         Txn.execWrite(ds, ()->{
+              RDFDataMgr.read(ds, "SomeData.ttl");
+         }) ;
+          Txn.execRead(dsg, ()->{
+             RDFDataMgr.write(System.out, ds, Lang.TRIG) ;
+         }) ;
+    }
 ```


Mime
View raw message