From 4bab8c07b04629a8c16d3c06ae90f55792b19682 Mon Sep 17 00:00:00 2001 From: Stian Soiland-Reyes Date: Fri, 24 May 2013 16:46:43 +0100 Subject: [PATCH] Media Type done correctly --- .../org/orcid/api/common/writer/rdf/RDFMessageBodyWriter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/orcid-api-common/src/main/java/org/orcid/api/common/writer/rdf/RDFMessageBodyWriter.java b/orcid-api-common/src/main/java/org/orcid/api/common/writer/rdf/RDFMessageBodyWriter.java index b238f6498a1..dffa7c41ebf 100644 --- a/orcid-api-common/src/main/java/org/orcid/api/common/writer/rdf/RDFMessageBodyWriter.java +++ b/orcid-api-common/src/main/java/org/orcid/api/common/writer/rdf/RDFMessageBodyWriter.java @@ -173,7 +173,8 @@ public void writeTo(OrcidMessage xml, Class type, Type genericType, Annotatio person.addProperty(familyName, personalDetails.getFamilyName().getContent()); } - if (mediaType.toString().contains(APPLICATION_RDFXML)) { + MediaType rdfXml = new MediaType("application", "rdf+xml"); + if (mediaType.isCompatible(rdfXml)) { m.write(entityStream); } else { // Must be Turtle or N3 then?