edu.isi.karma.rep.model.Model inputModel = s.getInputModel();
edu.isi.karma.rep.model.Model outputModel = s.getOutputModel();
String sparql;
WebServicePublisher servicePublisher = new WebServicePublisher(s);
if (getResourceType() == ResourceType.Input) {
if (getFormat().equalsIgnoreCase(SerializationLang.SPARQL)) {
sparql = inputModel.getSparqlConstructQuery(null);
getResponse().setContentType(MimeType.TEXT_PLAIN);
pw.write(sparql);
return;
} else
m = servicePublisher.generateInputPart();
}
if (getResourceType() == ResourceType.Output) {
if (getFormat().equalsIgnoreCase(SerializationLang.SPARQL)) {
sparql = outputModel.getSparqlConstructQuery(null);
getResponse().setContentType(MimeType.TEXT_PLAIN);
pw.write(sparql);
return;
} else
m = servicePublisher.generateOutputPart();;
}
}
if (getFormat().equalsIgnoreCase(SerializationLang.XML))
getResponse().setContentType(MimeType.APPLICATION_XML);