[Mulgara-svn] r405 - in branches/nw-interface/src/jar/query/java/org/mulgara: connection query/operation

pag at mulgara.org pag at mulgara.org
Thu Sep 6 21:22:27 UTC 2007


Author: pag
Date: 2007-09-06 16:22:26 -0500 (Thu, 06 Sep 2007)
New Revision: 405

Modified:
   branches/nw-interface/src/jar/query/java/org/mulgara/connection/Connection.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java
   branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/CreateGraph.java
Log:
continuing to implement. Checking in to move computers.

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/connection/Connection.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/connection/Connection.java	2007-09-06 20:17:11 UTC (rev 404)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/connection/Connection.java	2007-09-06 21:22:26 UTC (rev 405)
@@ -42,7 +42,7 @@
   
   /** The session to use for this connection. */
   private Session session;
-  
+
   /**
    * Creates a new connection, given a URI to a server.
    * @param serverUri The URI to connect to.

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java	2007-09-06 20:17:11 UTC (rev 404)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Backup.java	2007-09-06 21:22:26 UTC (rev 405)
@@ -85,7 +85,8 @@
 
     backup(conn, serverUri, fileOutputStream);
 
-    return null;
+    resultMessage = "Successfully backed up: " + serverUri;
+    return resultMessage;
   }
 
 

Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/CreateGraph.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/CreateGraph.java	2007-09-06 20:17:11 UTC (rev 404)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/CreateGraph.java	2007-09-06 21:22:26 UTC (rev 405)
@@ -13,7 +13,9 @@
 
 import java.net.URI;
 
+import org.apache.log4j.Logger;
 import org.mulgara.connection.Connection;
+import org.mulgara.itql.ItqlInterpreter;
 
 /**
  * Represents a command to create a new graph.
@@ -24,9 +26,15 @@
  */
 public class CreateGraph extends ServerCommand {
 
+  /** The logger */
+  private static final Logger logger = Logger.getLogger(CreateGraph.class.getName());
+
   /** The URI for the graph. */
   private URI graphUri;
   
+  /** The canonical URI for the graph. */
+  private URI canonicalGraphUri;
+  
   /** The URI for the type of the graph. */
   private URI type;
   
@@ -34,6 +42,7 @@
     super(graphUri);
     this.graphUri = graphUri;
     this.type = type;
+    canonicalGraphUri = getCanonicalUriAlias(graphUri);
   }
   
   /**
@@ -53,8 +62,15 @@
   }
 
   public Object execute(Connection conn) throws Exception {
-    // TODO Auto-generated method stub
+    if (logger.isDebugEnabled()) logger.debug("Creating new model " + graphUri);
+    if (logger.isDebugEnabled()) logger.debug("Model is alias for " + canonicalGraphUri);
+    // TODO: this is not yet complete
+    conn.getSession().createModel(canonicalGraphUri, type);
     return null;
   }
 
+  // TODO: get from ItqlInterpreter
+  private URI getCanonicalUriAlias(URI uri) {
+    return uri;
+  }
 }




More information about the Mulgara-svn mailing list