Example: Specify path parameters manually
The previous example of Comment service could be declared as such: @Path("/") @Consumes({"application/xml", "application/json"}) @Produces({"application/xml", "application/json"}) public interface BookStore { @AddLinks @LinkResources({ @LinkResource(value = Book.class, rel = "comments", pathParameters = "${title}"), @LinkResource(value = Comment.class, pathParameters = {"${book.title}", "${id}"}) }) @GET @Path("book/{id}/comments") public Collection getComments(@PathParam("id") String bookId); @AddLinks @LinkResource(pathParameters = {"${book.title}", "${id}"}) @GET @Path("book/{id}/comment/{cid}") public Comment getComment(@PathParam("id") String bookId, @PathParam("cid") String commentId); @LinkResource(pathParameters = {"${book.title}", "${id}"}) @POST @Path("book/{id}/comments") public void addComment(@PathParam("id") String bookId, Comment comment); @LinkResource(pathParameters = {"${book.title}", "${id}"}) @PUT @Path("book/{id}/comment/{cid}") public void updateComment(@PathParam("id") String bookId, @PathParam("cid") String commentId, Comment comment); @LinkResource(Comment.class, pathParameters = {"${book.title}", "${id}"}) @DELETE @Path("book/{id}/comment/{cid}") public void deleteComment(@PathParam("id") String bookId, @PathParam("cid") String commentId); }