@@ -98,10 +98,12 @@ public void goToRawUrl(@PathVariable("commitid") String commitId,
98
98
@ GetMapping (value = "/git/{commitid}/**" ,
99
99
produces = "text/turtle" )
100
100
public byte [] getRdfAsTurtle (@ PathVariable ("commitid" ) String commitId ,
101
- HttpServletRequest request ) {
101
+ HttpServletRequest request ,
102
+ HttpServletResponse response ) {
102
103
Workflow workflow = getWorkflow (commitId , request );
103
104
String rdfUrl = workflow .getPermalink ();
104
105
if (rdfService .graphExists (rdfUrl )) {
106
+ response .setHeader ("Content-Disposition" , "inline; filename=\" workflow.ttl\" " );
105
107
return rdfService .getModel (rdfUrl , "TURTLE" );
106
108
} else {
107
109
throw new WorkflowNotFoundException ();
@@ -116,10 +118,12 @@ public byte[] getRdfAsTurtle(@PathVariable("commitid") String commitId,
116
118
@ GetMapping (value = "/git/{commitid}/**" ,
117
119
produces = "application/ld+json" )
118
120
public byte [] getRdfAsJsonLd (@ PathVariable ("commitid" ) String commitId ,
119
- HttpServletRequest request ) {
121
+ HttpServletRequest request ,
122
+ HttpServletResponse response ) {
120
123
Workflow workflow = getWorkflow (commitId , request );
121
124
String rdfUrl = workflow .getPermalink ();
122
125
if (rdfService .graphExists (rdfUrl )) {
126
+ response .setHeader ("Content-Disposition" , "inline; filename=\" workflow.jsonld\" " );
123
127
return rdfService .getModel (rdfUrl , "JSON-LD" );
124
128
} else {
125
129
throw new WorkflowNotFoundException ();
@@ -134,10 +138,12 @@ public byte[] getRdfAsJsonLd(@PathVariable("commitid") String commitId,
134
138
@ GetMapping (value = "/git/{commitid}/**" ,
135
139
produces = "application/rdf+xml" )
136
140
public byte [] getRdfAsRdfXml (@ PathVariable ("commitid" ) String commitId ,
137
- HttpServletRequest request ) {
141
+ HttpServletRequest request ,
142
+ HttpServletResponse response ) {
138
143
Workflow workflow = getWorkflow (commitId , request );
139
144
String rdfUrl = workflow .getPermalink ();
140
145
if (rdfService .graphExists (rdfUrl )) {
146
+ response .setHeader ("Content-Disposition" , "inline; filename=\" workflow.rdf\" " );
141
147
return rdfService .getModel (rdfUrl , "RDFXML" );
142
148
} else {
143
149
throw new WorkflowNotFoundException ();
0 commit comments