supportingnon-DS parser/serializer as discussed on list
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphNodeWriter.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphNodeWriter.java
index 27f5f7b..61f82fa 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphNodeWriter.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphNodeWriter.java
@@ -66,9 +66,10 @@
public static final String OBJ_EXP_PARAM = "xPropObj";
public static final String SUBJ_EXP_PARAM = "xPropSubj";
- private Serializer serializer;
private UriInfo uriInfo;
+ private Serializer serializer = Serializer.getInstance();
+
@Reference
public synchronized void setSerializer(Serializer serializer) {
this.serializer = serializer;
@@ -76,7 +77,7 @@
public synchronized void unsetSerializer(Serializer serializer) {
if (Objects.equals(this.serializer, serializer)) {
- this.serializer = null;
+ this.serializer = Serializer.getInstance();
}
}
diff --git a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphReader.java b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphReader.java
index dcf58bc..fb00f6e 100644
--- a/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphReader.java
+++ b/jaxrs.rdf.providers/src/main/java/org/apache/clerezza/jaxrs/rdf/providers/GraphReader.java
@@ -43,7 +43,7 @@
SupportedFormat.X_TURTLE, SupportedFormat.RDF_JSON})
public class GraphReader implements MessageBodyReader<Graph> {
- private Parser parser;
+ private Parser parser = Parser.getInstance();
@Reference
public synchronized void setParser(Parser parser) {
@@ -52,7 +52,7 @@
public synchronized void unsetParser(Parser parser) {
if (Objects.equals(this.parser, parser)) {
- this.parser = null;
+ this.parser = Parser.getInstance();
}
}