[Mulgara-svn] r470 - branches/nw-interface/src/jar/query/java/org/mulgara/query/operation
pag at mulgara.org
pag at mulgara.org
Thu Oct 11 15:35:04 UTC 2007
Author: pag
Date: 2007-10-11 10:35:03 -0500 (Thu, 11 Oct 2007)
New Revision: 470
Modified:
branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Load.java
Log:
execution of the Load command now returns the number of loaded statements
Modified: branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Load.java
===================================================================
--- branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Load.java 2007-10-11 06:13:25 UTC (rev 469)
+++ branches/nw-interface/src/jar/query/java/org/mulgara/query/operation/Load.java 2007-10-11 15:35:03 UTC (rev 470)
@@ -45,7 +45,7 @@
/**
* Load the data into the destination graph through the given connection.
* @param conn The connection to load the data over.
- * @return A text string describing how many statements were inserted.
+ * @return The number of statements that were inserted.
*/
public Object execute(Connection conn) throws Exception {
URI src = getSource();
@@ -54,9 +54,11 @@
long stmtCount = isLocal() ? sendMarshalledData(conn) : conn.getSession().setModel(dest, srcRsc);
if (logger.isDebugEnabled()) logger.debug("Loaded " + stmtCount + " statements from " + src + " into " + dest);
- return (stmtCount > 0L) ? setResultMessage("Successfully loaded " + stmtCount + " statements from " + src + " into " + dest)
- : setResultMessage("WARNING: No valid RDF statements found in " + src);
-
+ if (stmtCount > 0L) setResultMessage("Successfully loaded " + stmtCount + " statements from " + src + " into " + dest);
+ else setResultMessage("WARNING: No valid RDF statements found in " + src);
+
+ return stmtCount;
+
} catch (IOException ex) {
logger.error("Error attempting to load : " + src, ex);
throw new QueryException("Error attempting to load : " + src, ex);
More information about the Mulgara-svn
mailing list