001// ***************************************************************************************************************************
002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
003// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
005// * with the License.  You may obtain a copy of the License at                                                              *
006// *                                                                                                                         *
007// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
008// *                                                                                                                         *
009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
011// * specific language governing permissions and limitations under the License.                                              *
012// ***************************************************************************************************************************
013package org.apache.juneau.examples.rest.dto;
014
015import org.apache.juneau.html.annotation.*;
016import org.apache.juneau.rest.*;
017import org.apache.juneau.rest.annotation.*;
018import org.apache.juneau.rest.widget.*;
019import org.apache.juneau.serializer.annotation.*;
020
021/**
022 * Sample REST resource showing how to implement a nested "router" resource page.
023 *
024 * <ul class='seealso'>
025 *    <li class='extlink'>{@source}
026 * </ul>
027 */
028@Rest(
029   path="/dto",
030   title="DTO examples",
031   description="Example serialization of predefined Data Transfer Objects.",
032   children={
033      AtomFeedResource.class,
034      JsonSchemaResource.class
035   }
036)
037@HtmlDocConfig(
038   widgets={
039      ContentTypeMenuItem.class,
040      ThemeMenuItem.class
041   },
042   navlinks={
043      "up: request:/..",
044      "options: servlet:/?method=OPTIONS",
045      "stats: servlet:/stats",
046      "$W{ContentTypeMenuItem}",
047      "$W{ThemeMenuItem}",
048      "source: $C{Source/gitHub}/org/apache/juneau/examples/rest/dto/$R{servletClassSimple}.java"
049   },
050   aside={
051      "<div style='max-width:400px' class='text'>",
052      "  <p>This is an example of a nested 'router' page that serves as a jumping-off point to other child resources.</p>",
053      "</div>"
054   }
055)
056@SerializerConfig(
057   // For testing purposes, we want to use single quotes in all the serializers so it's easier to do simple
058   // String comparisons.
059   // You can apply any of the Serializer/Parser/BeanContext settings this way.
060   quoteChar="'"
061)
062public class DtoExamples extends BasicRestServletJenaGroup {
063   private static final long serialVersionUID = 1L;
064}