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/01/10 15:26:25 UTC
svn commit: r1431383 -
/jena/Scratch/AFS/Jena-Dev/trunk/src/reports/archive/Jena378_serializeUpdate.java
Author: andy
Date: Thu Jan 10 14:26:25 2013
New Revision: 1431383
URL: http://svn.apache.org/viewvc?rev=1431383&view=rev
Log: (empty)
Added:
jena/Scratch/AFS/Jena-Dev/trunk/src/reports/archive/Jena378_serializeUpdate.java
Added: jena/Scratch/AFS/Jena-Dev/trunk/src/reports/archive/Jena378_serializeUpdate.java
URL: http://svn.apache.org/viewvc/jena/Scratch/AFS/Jena-Dev/trunk/src/reports/archive/Jena378_serializeUpdate.java?rev=1431383&view=auto
==============================================================================
--- jena/Scratch/AFS/Jena-Dev/trunk/src/reports/archive/Jena378_serializeUpdate.java (added)
+++ jena/Scratch/AFS/Jena-Dev/trunk/src/reports/archive/Jena378_serializeUpdate.java Thu Jan 10 14:26:25 2013
@@ -0,0 +1,47 @@
+/**
+ * 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 reports.archive;
+
+import org.apache.jena.atlas.io.IndentedWriter ;
+
+import com.hp.hpl.jena.sparql.modify.request.UpdateWriter ;
+import com.hp.hpl.jena.update.UpdateFactory ;
+import com.hp.hpl.jena.update.UpdateRequest ;
+
+public class Jena378_serializeUpdate
+{
+
+ public static void main(String[] args)
+ {
+
+ //arq.qparse.main("SELECT * WHERE { ?x ?p [ ?a ?b ] } ") ;
+
+ String x = "INSERT { _:a <x:p> _:b } WHERE { ?x ?p [ ?a ?b ] } ; INSERT {_:a <x:p> _:b } WHERE { ?x ?p [ ?a ?b ] } ;" ;
+
+ arq.uparse.main(x) ;
+ UpdateRequest update = UpdateFactory.create(x) ;
+ System.out.println() ;
+ UpdateWriter uw = new UpdateWriter(IndentedWriter.stdout, null) ;
+ uw.open();
+ uw.update(update);
+ uw.close();
+ }
+
+}
+