[Mulgara-svn] r1248 - in trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml: . writer
alexhall at mulgara.org
alexhall at mulgara.org
Sat Sep 6 06:36:23 UTC 2008
Author: alexhall
Date: 2008-09-05 23:36:22 -0700 (Fri, 05 Sep 2008)
New Revision: 1248
Modified:
trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/RDFXMLContentHandler.java
trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/AbstractWritableStatement.java
trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/BlankNodeWritableStatement.java
trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/LiteralWritableStatement.java
trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/NamespaceMap.java
trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/RDFXMLWriter.java
trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/URIReferenceWritableStatement.java
Log:
Preparing the RDF/XML writer's namespace map to handle a user-defined set of initial prefix mappings. Added a new constructor to NamespaceMap to pre-populate the mappings; this feature is not yet exposed to the client.
This change also contains general house-keeping updates in content-rdfxml related to NamespaceMap which were not practical to separate into their own commit:
1. Code formatting fixes.
2. Javadoc corrections and updates.
3. Replace references to GraphException with QueryException. GraphException is a JRDF class which indicates an error in a JRDF operation; the RDF/XML writer is not a JRDF class and should not throw these exceptions.
4. Exception handling: remove unnecessary "throws" clauses, and change private/protected methods to throw something more specific than Exception.
Modified: trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/RDFXMLContentHandler.java
===================================================================
--- trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/RDFXMLContentHandler.java 2008-09-05 20:56:49 UTC (rev 1247)
+++ trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/RDFXMLContentHandler.java 2008-09-06 06:36:22 UTC (rev 1248)
@@ -31,21 +31,17 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
-// Java 2 enterprise packages
import javax.activation.MimeType;
import javax.activation.MimeTypeParseException;
-// Third party packages
-import org.apache.log4j.Logger; // Apache Log4J
-import org.jrdf.graph.GraphException; // JRDF
-
-// Local packages
+import org.apache.log4j.Logger;
import org.mulgara.content.Content;
import org.mulgara.content.ContentHandler;
import org.mulgara.content.ContentHandlerException;
import org.mulgara.content.ModifiedException;
import org.mulgara.content.NotModifiedException;
import org.mulgara.content.rdfxml.writer.RDFXMLWriter;
+import org.mulgara.query.QueryException;
import org.mulgara.resolver.spi.ResolverSession;
import org.mulgara.resolver.spi.Statements;
@@ -146,7 +142,7 @@
new OutputStreamWriter(content.newOutputStream(), "utf-8")
);
}
- catch (GraphException e) {
+ catch (QueryException e) {
throw new ContentHandlerException(
"Failed to serialize RDF/XML to " + content.getURI(), e
);
Modified: trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/AbstractWritableStatement.java
===================================================================
--- trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/AbstractWritableStatement.java 2008-09-05 20:56:49 UTC (rev 1247)
+++ trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/AbstractWritableStatement.java 2008-09-06 06:36:22 UTC (rev 1248)
@@ -29,13 +29,10 @@
// Java 2 standard packages
import java.io.PrintWriter;
-// Apache packages
import org.apache.log4j.Logger;
-
-// JRDF
-import org.jrdf.graph.GraphException;
import org.jrdf.graph.SubjectNode;
import org.jrdf.graph.URIReference;
+import org.mulgara.query.QueryException;
// Local packages
@@ -80,10 +77,8 @@
*
* @param subject SubjectNode
* @param predicate URIReference
- * @throws GraphException
*/
- public AbstractWritableStatement(SubjectNode subject, URIReference predicate)
- throws GraphException {
+ public AbstractWritableStatement(SubjectNode subject, URIReference predicate) {
//validate
if (subject == null) {
@@ -104,19 +99,18 @@
*
* @param namespaces NamespaceMap
* @param writer PrintWriter
- * @throws GraphException
+ * @throws QueryException
*/
- public abstract void write(NamespaceMap namespaces, PrintWriter writer) throws
- GraphException;
+ public abstract void write(NamespaceMap namespaces, PrintWriter writer) throws QueryException;
/**
* Utility method for getting the predicate with namespaces substituted.
*
* @param namespaces NamespaceMap
- * @throws GraphException
+ * @throws QueryException
* @return String
*/
- protected String getPredicateString(NamespaceMap namespaces) throws GraphException {
+ protected String getPredicateString(NamespaceMap namespaces) throws QueryException {
if (namespaces == null) {
Modified: trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/BlankNodeWritableStatement.java
===================================================================
--- trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/BlankNodeWritableStatement.java 2008-09-05 20:56:49 UTC (rev 1247)
+++ trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/BlankNodeWritableStatement.java 2008-09-06 06:36:22 UTC (rev 1248)
@@ -29,14 +29,11 @@
// Java 2 standard packages
import java.io.PrintWriter;
-// Apache packages
import org.apache.log4j.Logger;
-
-// JRDF
-import org.jrdf.graph.GraphException;
+import org.jrdf.graph.BlankNode;
import org.jrdf.graph.SubjectNode;
import org.jrdf.graph.URIReference;
-import org.jrdf.graph.BlankNode;
+import org.mulgara.query.QueryException;
import org.mulgara.util.StringUtil;
// Local packages
@@ -80,12 +77,8 @@
* @param subject SubjectNode
* @param predicate URIReference
* @param blankNode BlankNode
- * @throws GraphException
*/
- public BlankNodeWritableStatement(SubjectNode subject,
- URIReference predicate,
- BlankNode blankNode)
- throws GraphException {
+ public BlankNodeWritableStatement(SubjectNode subject, URIReference predicate, BlankNode blankNode) {
super(subject, predicate);
@@ -103,10 +96,9 @@
*
* @param namespaces NamespaceMap
* @param writer PrintWriter
- * @throws GraphException
+ * @throws QueryException
*/
- public void write(NamespaceMap namespaces, PrintWriter writer) throws
- GraphException {
+ public void write(NamespaceMap namespaces, PrintWriter writer) throws QueryException {
//validate
if (namespaces == null) {
Modified: trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/LiteralWritableStatement.java
===================================================================
--- trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/LiteralWritableStatement.java 2008-09-05 20:56:49 UTC (rev 1247)
+++ trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/LiteralWritableStatement.java 2008-09-06 06:36:22 UTC (rev 1248)
@@ -30,16 +30,11 @@
import java.io.PrintWriter;
import java.net.URI;
-// Apache packages
import org.apache.log4j.Logger;
-
-// JRDF
-import org.jrdf.graph.GraphException;
+import org.jrdf.graph.Literal;
import org.jrdf.graph.SubjectNode;
import org.jrdf.graph.URIReference;
-import org.jrdf.graph.Literal;
-
-// Local packages
+import org.mulgara.query.QueryException;
import org.mulgara.util.StringUtil;
@@ -81,11 +76,8 @@
* @param subject SubjectNode
* @param predicate URIReference
* @param literal Literal
- * @throws GraphException
*/
- public LiteralWritableStatement(SubjectNode subject, URIReference predicate,
- Literal literal)
- throws GraphException {
+ public LiteralWritableStatement(SubjectNode subject, URIReference predicate, Literal literal) {
super (subject, predicate);
@@ -111,10 +103,9 @@
*
* @param namespaces NamespaceMap
* @param writer PrintWriter
- * @throws GraphException
+ * @throws QueryException
*/
- public void write(NamespaceMap namespaces, PrintWriter writer) throws
- GraphException {
+ public void write(NamespaceMap namespaces, PrintWriter writer) throws QueryException {
//validate
if (namespaces == null) {
Modified: trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/NamespaceMap.java
===================================================================
--- trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/NamespaceMap.java 2008-09-05 20:56:49 UTC (rev 1247)
+++ trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/NamespaceMap.java 2008-09-06 06:36:22 UTC (rev 1248)
@@ -27,27 +27,22 @@
package org.mulgara.content.rdfxml.writer;
// Java 2 standard packages
+import java.net.URI;
import java.util.HashMap;
-import java.net.URI;
+import java.util.Map;
-// Apache packages
import org.apache.log4j.Logger;
-
-// JRDF
+import org.apache.xerces.util.XMLChar;
import org.jrdf.graph.Node;
import org.jrdf.graph.URIReference;
-import org.jrdf.graph.GraphException;
import org.jrdf.vocabulary.RDF;
import org.jrdf.vocabulary.RDFS;
-
-// Local packages
+import org.mulgara.query.QueryException;
import org.mulgara.query.TuplesException;
import org.mulgara.resolver.spi.GlobalizeException;
import org.mulgara.resolver.spi.ResolverSession;
import org.mulgara.resolver.spi.Statements;
-import java.util.*;
-
/**
* Map that contains all namespaces for a set of Statements.
*
@@ -84,15 +79,34 @@
/** Prefix used to abbreviate RDFS Namespace */
private static final String RDFS_PREFIX = "rdfs";
+
+ /**
+ * Constructor. Pre-populates the map with prefixes for a set of default namespaces
+ * (RDF, RDFS, OWL, DC), and then populates the map with generated prefixes for all
+ * unique namespaces in the statements.
+ *
+ * @param statements The statements which will be parsed for namespaces.
+ * @param session The session used to globalize statement URI's.
+ * @throws QueryException if an error occurred reading the statements.
+ */
+ public NamespaceMap(Statements statements, ResolverSession session) throws QueryException {
+ this(statements, session, null);
+ }
/**
- * Constructor. Populates the map with all unique namespaces in the statements.
+ * Constructor. Pre-populates the map with prefixes for a set of default namespaces
+ * (RDF, RDFS, OWL, DC), and adds a set of user-defined initial namespace prefixes.
+ * Any initial prefix mapping which attempts to redefine a default namespace prefix, or which
+ * contains a prefix that is not a valid XML NCName, will be ignored. It then populates
+ * the map with generated prefixes for all unique namespaces in the statements that do not
+ * match a default or initial namespace prefix mapping.
*
- * @param statements Statements
- * @param session ResolverSession
- * @throws GraphException
+ * @param statements The statements which will be parsed for namespaces.
+ * @param session The session used to globalize statement URI's.
+ * @param initialPrefixes A set of user-defined namespace prefixes.
+ * @throws QueryException if an error occurred reading the statements.
*/
- public NamespaceMap(Statements statements, ResolverSession session) throws GraphException {
+ public NamespaceMap(Statements statements, ResolverSession session, Map<String,URI> initialPrefixes) throws QueryException {
mirror = new HashMap<String,String>();
@@ -101,29 +115,50 @@
put(RDFS_PREFIX, RDFS.BASE_URI.toString());
put("owl", "http://www.w3.org/2002/07/owl#");
put("dc", "http://purl.org/dc/elements/1.1/");
+
+ if (initialPrefixes != null) {
+ prePopulate(initialPrefixes);
+ }
//read namespaces from the statements
try {
populate(statements, session);
} catch (TuplesException tuplesException) {
- throw new GraphException("Could not read statements.", tuplesException);
+ throw new QueryException("Could not read statements.", tuplesException);
} catch (GlobalizeException globalException) {
- throw new GraphException("Could not globalize statements.", globalException);
+ throw new QueryException("Could not globalize statements.", globalException);
}
}
+
+ /**
+ * Pre-populates the namespace mapping with a user-defined set of initial prefixes.
+ * All prefixes are validated as XML NCNames, and prefixes for namespaces that have
+ * already been defined will be ignored.
+ * @param existingMap A mapping of prefix to namespace URI.
+ */
+ protected void prePopulate(Map<String,URI> existingMap) {
+ for (Map.Entry<String,URI> entry : existingMap.entrySet()) {
+ String prefix = entry.getKey();
+ // If the value is a valid XML namespace, it will be untouched. If it is not a namespace, the
+ // namespace portion will be extracted and used.
+ String namespace = toNamespaceURI(entry.getValue().toString());
+
+ if (namespace != null && !containsValue(namespace) && XMLChar.isValidNCName(prefix)) {
+ put(prefix, namespace);
+ }
+ }
+ }
/**
- * Evaluates the statements and adds namespace mappings for all unique
- * namespaces.
+ * Evaluates the statements and adds namespace mappings for all unique namespaces.
*
- * @param statements Statements
- * @param session ResolverSession
- * @throws TuplesException
- * @throws GraphException
- * @throws GlobalizeException
+ * @param statements The statements to be parsed for namespaces.
+ * @param session ResolverSession Session used to globalize nodes from the statments.
+ * @throws TuplesException if an error occurred iterating the statements.
+ * @throws GlobalizeException if an error occurred globalizing a statement node.
*/
private void populate(Statements statements, ResolverSession session) throws
- TuplesException, GraphException, GlobalizeException {
+ TuplesException, GlobalizeException {
Statements clonedStatements = (Statements)statements.clone();
@@ -167,15 +202,13 @@
}
/**
- * Globalizes the node ID and evaluates it if it is an URI.
+ * Globalizes the node ID and adds it to the namespace mappings it if it is a URI.
*
- * @param nodeID long
- * @param session ResolverSession
- * @throws GlobalizeException
- * @throws GraphException
+ * @param nodeID The local node ID.
+ * @param session Session used to globalize the node.
+ * @throws GlobalizeException if an error occurred during globalization.
*/
- protected void evaluateAndPut(long nodeID, ResolverSession session) throws
- GlobalizeException, GraphException {
+ protected void evaluateAndPut(long nodeID, ResolverSession session) throws GlobalizeException {
//only URI's need namespace substitution
Node node = session.globalize(nodeID);
@@ -187,12 +220,12 @@
}
/**
- * Evaluates a URI and adds it to the namespace map as a namespace.
+ * Extracts the namespace from a URI, and adds the namespace to the mappings using a generated
+ * prefix if the namespace is not already part of the mappings.
*
- * @param uri URI
- * @throws GraphException
+ * @param uri The URI containing a namespace to add.
*/
- protected void addNamespaceURI(URI uri) throws GraphException {
+ protected void addNamespaceURI(URI uri) {
if (uri == null) throw new IllegalArgumentException("URI argument is null.");
@@ -208,13 +241,14 @@
}
/**
- * Extracts the root namespace from an URI.
+ * Extracts the root namespace from an URI. The root namespace is defined here as the substring
+ * extending from the start of the URI string to the final occurrence of '/', '#', or ':', or
+ * the entire URI string if none of these characters occurs.
*
- * @param uri URI
- * @throws GraphException
- * @return String
+ * @param uri An input URI.
+ * @return The namespace of the URI, or the original URI if no namespace could be found.
*/
- private String toNamespaceURI(String uri) throws GraphException {
+ private String toNamespaceURI(String uri) {
if (uri == null) throw new IllegalArgumentException("URI argument is null.");
@@ -244,7 +278,7 @@
* Returns the key used to represent RDF.baseURI:
* (http://www.w3.org/1999/02/22-rdf-syntax-ns#).
*
- * @return String
+ * @return The RDF namespace prefix (always <code>rdf</code>).
*/
public String getRDFPrefix() {
return RDF_PREFIX;
@@ -252,18 +286,20 @@
/**
* Substitutes part of the uri with the corresponding namespace from the map.
+ * If the URI contains no local part (i.e. is a namespace itself) then the entire URI is
+ * replaced with an XML entity.
*
- * @param uri String
- * @throws GraphException
- * @return String
+ * @param uri The URI to perform substitution on.
+ * @throws QueryException if the URI's namespace is not present in the map.
+ * @return An XML QName representation of the URI suitable for use as an XML attribute name.
*/
- public String replaceNamespace(String uri) throws GraphException {
+ public String replaceNamespace(String uri) throws QueryException {
String newURI = null;
String nsURI = toNamespaceURI(uri);
String key = mirror.get(nsURI);
- if (key == null) throw new GraphException("Namespace: " + nsURI + " has not been mapped.");
+ if (key == null) throw new QueryException("Namespace: " + nsURI + " has not been mapped.");
//should all or part of the URI be replaced?
if (uri.equals(nsURI)) {
@@ -292,9 +328,8 @@
*
* @param original original URI.
* @return new URI with any necessary li.
- * @throws GraphException
*/
- private String replaceCollection(String original) throws GraphException {
+ private String replaceCollection(String original){
//value to be returned
String uri = original;
@@ -310,9 +345,9 @@
* Overridden to allow for bi-directional mapping. Not intended to be called
* outside this class.
*
- * @param key String
- * @param value Object
- * @return Object
+ * @param key The prefix string
+ * @param value The namespace URI string.
+ * @return The previous namespace URI associated with the prefix, or <code>null</code> if there was none.
*/
@Override
public String put(String key, String value) {
Modified: trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/RDFXMLWriter.java
===================================================================
--- trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/RDFXMLWriter.java 2008-09-05 20:56:49 UTC (rev 1247)
+++ trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/RDFXMLWriter.java 2008-09-06 06:36:22 UTC (rev 1248)
@@ -27,23 +27,26 @@
package org.mulgara.content.rdfxml.writer;
// Java 2 standard packages
-import java.io.*;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
import java.net.URI;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Set;
-// Third party packages
-import org.apache.log4j.Logger; // Log4J
-import org.apache.xerces.util.EncodingMap; // Xerces XML parser
-import org.jrdf.graph.BlankNode; // JRDF
-import org.jrdf.graph.GraphException;
+import org.apache.log4j.Logger;
+import org.apache.xerces.util.EncodingMap;
+import org.jrdf.graph.BlankNode;
import org.jrdf.graph.Literal;
import org.jrdf.graph.Node;
import org.jrdf.graph.ObjectNode;
import org.jrdf.graph.SubjectNode;
import org.jrdf.graph.URIReference;
-
-// Local packages
+import org.mulgara.query.QueryException;
+import org.mulgara.query.TuplesException;
import org.mulgara.query.Variable;
+import org.mulgara.resolver.spi.GlobalizeException;
import org.mulgara.resolver.spi.ResolverSession;
import org.mulgara.resolver.spi.Statements;
import org.mulgara.resolver.spi.StatementsWrapperTuples;
@@ -115,10 +118,10 @@
* @param session ResolverSession Used to globalize nodes
* @param writer OutputStreamWriter Destination of the RDF/XML (supports
* character encoding)
- * @throws GraphException
+ * @throws QueryException
*/
synchronized public void write(Statements statements, ResolverSession session,
- OutputStreamWriter writer) throws GraphException {
+ OutputStreamWriter writer) throws QueryException {
//validate
if (statements == null) {
@@ -157,7 +160,7 @@
exception.printStackTrace();
log.error("Failed to write Statements.", exception);
- throw new GraphException("Failed to write Statements.", exception);
+ throw new QueryException("Failed to write Statements.", exception);
} finally {
if (out != null) out.close();
}
@@ -314,7 +317,7 @@
* @throws Exception
*/
protected void writeBody(Statements statements, ResolverSession session,
- PrintWriter out) throws Exception {
+ PrintWriter out) throws TuplesException, GlobalizeException, QueryException {
assert statements != null:"Statements is null";
assert session != null:"ResolverSession is null";
@@ -342,7 +345,7 @@
subjectNode = (SubjectNode) session.globalize(subject);
//validate
if (subjectNode == null) {
- throw new GraphException("subject is null");
+ throw new QueryException("subject is null");
}
writeOpeningSubjectTag(subjectNode, out);
}
@@ -351,17 +354,17 @@
Node predicateNode = session.globalize(statements.getPredicate());
Node objectNode = session.globalize(statements.getObject());
if (predicateNode == null) {
- throw new GraphException("predicate is null");
+ throw new QueryException("predicate is null");
}
if (!(predicateNode instanceof URIReference)) {
- throw new GraphException("PredicateNode should be of type: " +
+ throw new QueryException("PredicateNode should be of type: " +
"URIReference, was: " + predicateNode.getClass().getName());
}
if (objectNode == null) {
- throw new GraphException("object is null");
+ throw new QueryException("object is null");
}
if (!(objectNode instanceof ObjectNode)) {
- throw new GraphException("ObjectNode should be of type: " +
+ throw new QueryException("ObjectNode should be of type: " +
"ObjectNode, was: " + objectNode.getClass().getName());
}
@@ -384,11 +387,10 @@
* @param subject SubjectNode
* @param predicate PredicateNode
* @param object ObjectNode
- * @throws GraphException
+ * @throws QueryException
*/
protected void writeStatement(NamespaceMap namespaces, PrintWriter writer,
- SubjectNode subject, URIReference predicate,
- ObjectNode object) throws GraphException {
+ SubjectNode subject, URIReference predicate, ObjectNode object) throws QueryException {
AbstractWritableStatement statement = null;
@@ -403,7 +405,7 @@
statement = new LiteralWritableStatement(subject, predicate, (Literal)object);
} else {
assert(object != null):"Object should not be null";
- throw new GraphException("Unknown ObjectNode type: " + object.getClass().getName());
+ throw new QueryException("Unknown ObjectNode type: " + object.getClass().getName());
}
assert statement != null : "WritableStatement should not be null";
@@ -417,7 +419,7 @@
* @param out PrintWriter
* @throws Exception
*/
- protected void writeOpeningSubjectTag(SubjectNode subject, PrintWriter out) throws Exception {
+ protected void writeOpeningSubjectTag(SubjectNode subject, PrintWriter out) {
assert out != null : "PrintWriter is null";
@@ -449,7 +451,7 @@
* @param out PrintWriter
* @throws Exception
*/
- protected void writeClosingSubjectTag(PrintWriter out) throws Exception {
+ protected void writeClosingSubjectTag(PrintWriter out) {
assert out != null:"PrintWriter is null";
//print as: </rdf:Description>
Modified: trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/URIReferenceWritableStatement.java
===================================================================
--- trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/URIReferenceWritableStatement.java 2008-09-05 20:56:49 UTC (rev 1247)
+++ trunk/src/jar/content-rdfxml/java/org/mulgara/content/rdfxml/writer/URIReferenceWritableStatement.java 2008-09-06 06:36:22 UTC (rev 1248)
@@ -29,13 +29,10 @@
// Java 2 standard packages
import java.io.PrintWriter;
-// Apache packages
import org.apache.log4j.Logger;
-
-// JRDF
-import org.jrdf.graph.GraphException;
import org.jrdf.graph.SubjectNode;
import org.jrdf.graph.URIReference;
+import org.mulgara.query.QueryException;
// Local packages
@@ -79,12 +76,8 @@
* @param subject SubjectNode
* @param predicate URIReference
* @param uriReference URIReference
- * @throws GraphException
*/
- public URIReferenceWritableStatement(SubjectNode subject,
- URIReference predicate,
- URIReference uriReference)
- throws GraphException {
+ public URIReferenceWritableStatement(SubjectNode subject, URIReference predicate, URIReference uriReference) {
super(subject, predicate);
@@ -102,10 +95,9 @@
*
* @param namespaces NamespaceMap
* @param writer PrintWriter
- * @throws GraphException
+ * @throws QueryException
*/
- public void write(NamespaceMap namespaces, PrintWriter writer) throws
- GraphException {
+ public void write(NamespaceMap namespaces, PrintWriter writer) throws QueryException {
//validate
if (namespaces == null) {
More information about the Mulgara-svn
mailing list