@Override public Response resolveTerm(String termId) { VocabularyTerm term = this.vm.resolveTerm(termId); if (term == null) { return Response.status(Response.Status.NOT_FOUND).build(); } JSONObject rep = term.toJSON(); rep.put("links", this.autolinker.get().forResource(getClass(), this.uriInfo) .withExtraParameters("vocabulary-id", term.getVocabulary().getIdentifier()).build()); return Response.ok(rep, MediaType.APPLICATION_JSON_TYPE).build(); } }
@Override public Response resolveTerm(String termId) { VocabularyTerm term = this.vm.resolveTerm(termId); if (term == null) { return Response.status(Response.Status.NOT_FOUND).build(); } JSONObject rep = term.toJSON(); rep.put("links", this.autolinker.get().forResource(getClass(), this.uriInfo) .withExtraParameters("vocabulary-id", term.getVocabulary().getIdentifier()).build()); return Response.ok(rep, MediaType.APPLICATION_JSON_TYPE).build(); } }