RelationshipTuple[] tuples = m_management.getRelationships(context, subject, predicate);
TripleIterator it = new TupleArrayTripleIterator(new ArrayList<RelationshipTuple>(Arrays.asList(tuples)));
ByteArrayOutputStream out = new ByteArrayOutputStream();
format = format.toLowerCase();
RDFFormat outputFormat;
MediaType mediaType;
if (format.equalsIgnoreCase("xml") || format.equals("rdf/xml")) {
outputFormat = RDFFormat.RDF_XML;
mediaType = new MediaType("application", "rdf+xml");
} else if (format.equals("n-triples") || format.equals("ntriples")) {