Author: sallen
Date: Mon Mar 26 19:24:04 2012
New Revision: 1305501

URL: http://svn.apache.org/viewvc?rev=1305501&view=rev
Log:
Changing package name to org.apache.jena.*

Added:
    incubator/jena/Experimental/jena-client/trunk/src/main/java/org/
    incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/
    incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/BulkDataHandler.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Connection.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/ConnectionBase.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/DatasetGraphConnection.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Deleter.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/GraphOperations.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Inserter.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/RDFFormat.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Repository.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/SPARQLConnection.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Updater.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/GraphStoreProtocolService.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/QueryService.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/Service.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/ServiceDescription.java
    
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/UpdateService.java
Removed:
    incubator/jena/Experimental/jena-client/trunk/src/main/java/com/

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/BulkDataHandler.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/BulkDataHandler.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/BulkDataHandler.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/BulkDataHandler.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,27 @@
+/**
+ * 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.client;
+
+import org.openjena.atlas.lib.Closeable ;
+
+public interface BulkDataHandler extends Deleter, Closeable
+{
+
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Connection.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Connection.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Connection.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Connection.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,73 @@
+/**
+ * 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.client;
+
+import org.openjena.atlas.lib.Closeable ;
+
+import com.hp.hpl.jena.client.service.QueryService ;
+import com.hp.hpl.jena.client.service.Service ;
+import com.hp.hpl.jena.client.service.UpdateService ;
+import com.hp.hpl.jena.query.QueryExecution ;
+import com.hp.hpl.jena.sparql.core.Transactional ;
+import com.hp.hpl.jena.update.UpdateProcessor ;
+
+/**
+ * A connection to a specific repository.  SPARQL statements are executed and 
results returned within the context of a connection.
+ */
+public interface Connection extends Transactional, Closeable
+{
+    
+//    void isAutoCommit();
+//    void setAutoCommit(boolean autoCommit);
+    
+    Service getServices();
+    
+    
+    Repository getRepository();
+    
+    
+    // These set up the services to use for the connection.  They'll be set to 
a reasonable default when the connection is created.
+    void setQueryService(QueryService service);
+    void setUpdateService(UpdateService service);
+    void setBulkService(UpdateService service);
+    
+    QueryService getQueryService();
+    UpdateService getUpdateService();
+    UpdateService getBulkService();
+    
+    /**
+     * Answers whether the {@link Connection} supports Transactions.  If it 
does then the {@link Transactional} methods
+     * can be used to control transactions.  If it doesn't, then the {@link 
Transactional} methods are no-ops.
+     * 
+     * @return <code>true</code> if transactions are supported; 
<code>false</code> otherwise
+     */
+    boolean supportsTransactions();
+    
+    
+    BulkDataHandler getBulkDataHandler();
+    
+    // TODO stick with legacy query execution/update interfaces, or create new?
+    QueryExecution createQuery(String query);
+    UpdateProcessor createUpdate(String updateQuery);
+    
+    // TODO make ParameterizedQueryExecution and ParameterizedUpdateProcessor
+    QueryExecution createParameterizedQuery(String query);
+    UpdateProcessor createPparameterizedUpdate(String updateQuery);
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/ConnectionBase.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/ConnectionBase.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/ConnectionBase.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/ConnectionBase.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,66 @@
+/**
+ * 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.client;
+
+import java.util.Iterator ;
+
+import com.hp.hpl.jena.graph.Graph ;
+import com.hp.hpl.jena.graph.Node ;
+import com.hp.hpl.jena.graph.Triple ;
+import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.Quad ;
+
+public abstract class ConnectionBase implements Inserter, Connection
+{
+
+    @Override
+    public void add(Node graphName, Triple t)
+    {
+        add(new Quad(graphName, t));
+    }
+
+    @Override
+    public void add(Iterable<? extends Quad> quads)
+    {
+        for (Quad q : quads)
+        {
+            add(q);
+        }
+    }
+
+    @Override
+    public void add(DatasetGraph dsg)
+    {
+        for (Iterator<Quad> it = dsg.find(); it.hasNext(); )
+        {
+            add(it.next());
+        }
+    }
+
+    @Override
+    public void add(Node graphName, Graph g)
+    {
+        for (Iterator<Triple> it = g.find(null, null, null); it.hasNext(); )
+        {
+            add(graphName, it.next());
+        }
+    }
+
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/DatasetGraphConnection.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/DatasetGraphConnection.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/DatasetGraphConnection.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/DatasetGraphConnection.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,25 @@
+/**
+ * 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.client;
+
+public class DatasetGraphConnection
+{
+
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Deleter.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Deleter.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Deleter.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Deleter.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,45 @@
+/**
+ * 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.client;
+
+import java.io.InputStream;
+
+import com.hp.hpl.jena.graph.Graph;
+import com.hp.hpl.jena.graph.Node;
+import com.hp.hpl.jena.graph.Triple;
+import com.hp.hpl.jena.sparql.core.DatasetGraph;
+import com.hp.hpl.jena.sparql.core.Quad;
+
+public interface Deleter
+{
+    // Quads
+    void delete(Quad q);
+    void delete(Iterable<? extends Quad> quads);
+    void delete(DatasetGraph dsg);
+    void delete(InputStream in, RDFFormat lang);  // Lang must be NQUADS or 
TRIG
+    void delete(InputStream in, String base, RDFFormat lang);  // Lang must be 
NQUADS or TRIG
+    
+    // Triples
+    void delete(Node graphName, Triple t);
+    void delete(Node graphName, Iterable<? extends Triple> triples);
+    void delete(Node graphName, Graph g);
+    void delete(Node graphName, InputStream in, RDFFormat lang);
+    void delete(Node graphName, InputStream in, String base, RDFFormat lang);
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/GraphOperations.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/GraphOperations.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/GraphOperations.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/GraphOperations.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,32 @@
+/**
+ * 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.client;
+
+import com.hp.hpl.jena.graph.Node;
+
+public interface GraphOperations
+{
+    void create(Node graphName);
+    void drop(Node graphName);
+    void clear(Node graphName);
+    void copy(Node sourceGraphName, Node destGraphName);
+    void move(Node sourceGraphName, Node destGraphName);
+    void add(Node sourceGraphName, Node destGraphName);
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Inserter.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Inserter.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Inserter.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Inserter.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,49 @@
+/**
+ * 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.client;
+
+import java.io.InputStream;
+
+import org.apache.jena.iri.IRI;
+
+import com.hp.hpl.jena.graph.Graph;
+import com.hp.hpl.jena.graph.Node;
+import com.hp.hpl.jena.graph.Triple;
+import com.hp.hpl.jena.sparql.core.DatasetGraph;
+import com.hp.hpl.jena.sparql.core.Quad;
+
+public interface Inserter
+{
+    // Quads
+    void add(Quad q);
+    void add(Iterable<? extends Quad> quads);
+    void add(DatasetGraph dsg);
+    void add(InputStream in, RDFFormat lang);  // Lang must be NQUADS or TRIG
+    void add(InputStream in, String base, RDFFormat lang);  // Lang must be 
NQUADS or TRIG
+    
+    // Triples
+    void add(Node graphName, Triple t);
+    void add(Node graphName, Iterable<? extends Triple> triples);
+    void add(Node graphName, Graph g);
+    void add(Node graphName, InputStream in, RDFFormat lang);
+    void add(Node graphName, InputStream in, String base, RDFFormat lang);
+    void add(Node graphName, IRI sourceDocument);
+    
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/RDFFormat.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/RDFFormat.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/RDFFormat.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/RDFFormat.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,211 @@
+/**
+ * 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.client ;
+
+
+/**
+ * Enum that specifies the various RDF formats Jena can handle. The .toString()
+ * method will return a string that can be used for Jena methods requiring a 
<code>lang</code> string.
+ */
+public enum RDFFormat
+{
+    /** RDF/XML format */
+    RDFXML   (new String[] { "RDF/XML", "rdfxml", "rdf/xml-abbrev" }, new 
String[] { "rdf", "xml", "owl" }),
+
+    /** N-Triples format */
+    NTRIPLES (new String[] { "N-TRIPLES", "ntriples", "nt"         }, new 
String[] { "nt"                }),
+
+    /** N3 format */
+    N3       (new String[] { "N3"                                  }, new 
String[] { "n3"                }),
+
+    /** Turtle format */
+    TURTLE   (new String[] { "TURTLE", "ttl"                       }, new 
String[] { "ttl"               }),
+
+    /** Trig format */
+    TRIG     (new String[] { "TURTLE"                              }, new 
String[] { "trig"              }),
+
+    /** NQuads format */
+    NQUADS   (new String[] { "NQUADS", "nq"                        }, new 
String[] { "nquads", "nq"      });
+    
+    // TODO Design question: should we use null or UNKNOWN for the parse* 
methods?
+    //UNKNOWN  (new String[] { "UNKNOWN"                             }, new 
String[] { "unknown"           });
+    
+    private final String[] formatStrings;
+    private final String[] fileNameExtensions;
+
+    /**
+     * @param formatStrings The format strings.  The first item is the 
canonical format string.
+     * @param fileNameExtensions The filename extensions.  The first item is 
the canonical extension.
+     */
+    private RDFFormat(String[] formatStrings, String[] fileNameExtensions)
+    {
+        this.formatStrings = formatStrings;
+        this.fileNameExtensions = fileNameExtensions;
+    }
+
+    /**
+     * Parses a string into the proper enum type. This can handle slightly 
non-standard variations.
+     * 
+     * @param formatStr The string containing the format.
+     * @return An enum corresponding to the given string.
+     * @throws IllegalArgumentException if the format string does not 
correspond to a known RDF format
+     */
+    public static RDFFormat parse(String formatStr)
+    {
+        RDFFormat toReturn = tryParse(formatStr);
+        if (null != toReturn)
+        {
+            return toReturn;
+        }
+        throw new IllegalArgumentException("Unknown RDF format: " + formatStr);
+    }
+    
+    /**
+     * Tries to parses a string into the proper enum type. This can handle 
slightly non-standard variations.
+     * 
+     * @param formatStr The string containing the format.
+     * @return An enum corresponding to the given string, or null if the 
format string does not correspond to a known RDF format
+     */
+    public static RDFFormat tryParse(String formatStr)
+    {
+        if (null != formatStr)
+        {
+            for (RDFFormat f : RDFFormat.values())
+            {
+                for (String s : f.formatStrings)
+                {
+                    if (s.equalsIgnoreCase(formatStr))
+                    {
+                        return f;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+    
+    /**
+     * Parses a given filename, examines its extension and returns an RDFFormat
+     * that matches that extension.
+     * 
+     * @param filename The filename to parse
+     * @return The RDFFormat that matches the filename extension
+     * @throws IllegalArgumentException if the filename does not have an 
extension that corresponds to a known RDF format
+     */
+    public static RDFFormat parseFilename(String filename)
+    {
+        RDFFormat toReturn = tryParseFilename(filename);
+        if (null != toReturn)
+        {
+            return toReturn;
+        }
+        throw new IllegalArgumentException("Unknown RDF extension for file: " 
+ filename);
+    }
+    
+    /**
+     * Tries to parses a given filename, examines its extension and returns an 
RDFFormat
+     * that matches that extension.
+     * 
+     * @param filename The filename to parse
+     * @return The RDFFormat that matches the filename extension, or null if 
the filename does not have an extension that corresponds to a known RDF format
+     */
+    public static RDFFormat tryParseFilename(String filename)
+    {
+        if (null != filename)
+        {
+            int dotIndex = filename.lastIndexOf('.') ;
+            if ((dotIndex >= 0) && (dotIndex + 1 < filename.length()))
+            {
+                return tryParseExtension(filename.substring(dotIndex + 1));
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Parses a given extension string and returns the proper RDFFormat.
+     * 
+     * @param extensionStr The extension string to parse
+     * @return The RDFFormat that matches the given extension string
+     * @throws IllegalArgumentException if the extension does not correspond 
to a known RDF format
+     */
+    public static RDFFormat parseExtension(String extensionStr)
+    {
+        RDFFormat toReturn = tryParseExtension(extensionStr);
+        if (null != toReturn)
+        {
+            return toReturn;
+        }
+        throw new IllegalArgumentException("Unknown RDF extension: " + 
extensionStr);
+    }
+    
+    /**
+     * Tries to parse a given extension string and return the proper RDFFormat.
+     * 
+     * @param extensionStr The extension string to parse
+     * @return The RDFFormat that matches the given extension string, or null 
if the extension does not correspond to a known RDF format
+     */
+    public static RDFFormat tryParseExtension(String extensionStr)
+    {
+        if (null != extensionStr)
+        {
+            for (RDFFormat f : RDFFormat.values())
+            {
+                for (String s : f.fileNameExtensions)
+                {
+                    if (s.equalsIgnoreCase(extensionStr))
+                    {
+                        return f;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Returns a filename extension string that matches this RDFFormat.
+     * 
+     * @return Returns a filename extension string that matches this RDFFormat
+     */
+    public String getExtension()
+    {
+        return this.fileNameExtensions[0];
+    }
+    
+    /**
+     * Returns a String that is suitable for passing into Jena methods that 
call
+     * for a <code>lang</code> parameter.
+     */
+    public String getFormatString()
+    {
+        return this.formatStrings[0];
+    }
+    
+    /**
+     * Returns a String that is suitable for passing into Jena methods that 
call
+     * for a <code>lang</code> parameter.
+     */
+    @Override
+    public String toString()
+    {
+        return getFormatString();
+    }
+
+}

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Repository.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Repository.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Repository.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Repository.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,33 @@
+/**
+ * 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.client;
+
+import com.hp.hpl.jena.client.service.Service ;
+
+/**
+ * Represents an RDF database.  This can be local or remote.
+ */
+public interface Repository
+{
+    // A limit on the number of connections?  I guess based on the underlying 
implementation.  HTTP usually has a limit.
+    Connection getConnection();
+    
+    Service getServices();
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/SPARQLConnection.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/SPARQLConnection.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/SPARQLConnection.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/SPARQLConnection.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,25 @@
+/**
+ * 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.client;
+
+public class SPARQLConnection
+{
+
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Updater.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Updater.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Updater.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/Updater.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,26 @@
+/**
+ * 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.client;
+
+
+public interface Updater extends Inserter, Deleter
+{
+    
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/GraphStoreProtocolService.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/GraphStoreProtocolService.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/GraphStoreProtocolService.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/GraphStoreProtocolService.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,25 @@
+/**
+ * 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.client.service;
+
+public interface GraphStoreProtocolService
+{
+
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/QueryService.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/QueryService.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/QueryService.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/QueryService.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,26 @@
+/**
+ * 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.client.service;
+
+
+public interface QueryService extends Service
+{
+
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/Service.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/Service.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/Service.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/Service.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,26 @@
+/**
+ * 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.client.service;
+
+
+public interface Service
+{
+    ServiceDescription getDescription();
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/ServiceDescription.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/ServiceDescription.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/ServiceDescription.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/ServiceDescription.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,52 @@
+/**
+ * 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.client.service;
+
+import com.hp.hpl.jena.graph.Graph;
+
+/**
+ * Information about the database.
+ * 
+ * @see <a href="http://www.w3.org/TR/sparql11-service-description/";>SPARQL 
1.1 Service Description</a>
+ */
+public interface ServiceDescription
+{
+    /**
+     * Returns this service description as a Graph.
+     * @see <a 
href="http://www.w3.org/TR/sparql11-service-description/";>SPARQL 1.1 Service 
Description</a>
+     */
+    Graph asGraph();
+    
+    
+    
+    
+    // -- Convenience methods ------------------------------
+    
+    //Collection<Syntax> supportedLanguages();
+    
+    
+    
+    
+    // -- Custom Jena properties below ---------------------
+    
+    
+    
+    
+}
+

Added: 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/UpdateService.java
URL: 
http://svn.apache.org/viewvc/incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/UpdateService.java?rev=1305501&view=auto
==============================================================================
--- 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/UpdateService.java
 (added)
+++ 
incubator/jena/Experimental/jena-client/trunk/src/main/java/org/apache/jena/client/service/UpdateService.java
 Mon Mar 26 19:24:04 2012
@@ -0,0 +1,26 @@
+/**
+ * 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.client.service;
+
+
+public interface UpdateService extends Service
+{
+
+}
+


Reply via email to