mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-06-10 04:02:26 +00:00
28 lines
530 B
Java
28 lines
530 B
Java
|
package net.sourceforge.plantuml.servlet;
|
||
|
|
||
|
import net.sourceforge.plantuml.FileFormat;
|
||
|
|
||
|
/*
|
||
|
* SVG servlet of the webapp.
|
||
|
* TODO.
|
||
|
*/
|
||
|
@SuppressWarnings("serial")
|
||
|
public class ImgServlet extends UmlDiagramService {
|
||
|
|
||
|
@Override
|
||
|
public String getSource( String uri) {
|
||
|
String[] result = uri.split("/img/", 2);
|
||
|
if (result.length != 2) {
|
||
|
return "";
|
||
|
} else {
|
||
|
return result[1];
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
FileFormat getOutputFormat() {
|
||
|
return FileFormat.PNG;
|
||
|
}
|
||
|
|
||
|
}
|