1
|
package eu.dnetlib.data.search.web.api;
|
2
|
|
3
|
/**
|
4
|
* Created by kiatrop on 16/11/2016.
|
5
|
*/
|
6
|
public class XMLResponseFormat {
|
7
|
|
8
|
public static final String error404Message = "<response><status>error</status><code>404</code><message>%s</message></response>";
|
9
|
public static final String error400Message = "<response><status>error</status><code>400</code><message>%s</message></response>";
|
10
|
public static final String error500Message = "<response><status>fail</status><code>500</code><message>%s</message><description>%s</description></response>";
|
11
|
|
12
|
public static final String countSearch = "<response><status>success</status><code>200</code><query>%s</query><total>%s</total><links>%s</links></response>";
|
13
|
|
14
|
public static final String singleValueResponse = "<response><meta>%s</meta>%s</response>";
|
15
|
public static final String response = "<response><meta>%s</meta><results>%s</results>%s</response>";
|
16
|
|
17
|
public static final String metaSearch = "<status>success</status><code>200</code><query>%s</query><filters>%s</filters><total>%s</total><page>%s</page><size>%s</size><links>%s</links>";
|
18
|
public static final String metaBasic = "<status>success</status><code>200</code><links>%s</links>";
|
19
|
|
20
|
public static final String _links = "<first>%s</first>" +
|
21
|
"<last>%s</last>" +
|
22
|
"<previous>%s</previous>" +
|
23
|
"<next>%s</next>" +
|
24
|
"<self>%s</self>";
|
25
|
|
26
|
public static final String _selflink = "<self>%s</self>";
|
27
|
|
28
|
|
29
|
}
|
30
|
|