예제 #1
0
  public static void main(String[] args) throws IOException {
    ResourceSet r = new ResourceSet();
    r.setName("test name");
    r.setIconUri("http://icon.com");

    final ObjectMapper mapper = ServerUtil.createJsonMapper();
    mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
    final String json = mapper.writeValueAsString(r);
    System.out.println(json);

    final String j =
        "{\"resourceSetStatus\":{\"_id\":1364301527462,\"_rev\":1,\"status\":\"created\"}}";
    //        final String j = "{\"_id\":1364301527462,\"_rev\":1,\"status\":\"created\"}";
    final ResourceSetStatus newR = TUma.readJsonValue(j, ResourceSetStatus.class);
    System.out.println();
  }
예제 #2
0
 public static ScopeService instance() {
   return ServerUtil.instance(ScopeService.class);
 }