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.html;
014
015/**
016 * Identifies possible values for the {@link HtmlSerializer.Builder#uriAnchorText(AnchorText)} setting.
017 *
018 * <h5 class='section'>See Also:</h5><ul>
019 *    <li class='link'><a class="doclink" href="../../../../index.html#jm.HtmlDetails">HTML Details</a>
020 * </ul>
021 */
022public enum AnchorText {
023
024   /**
025    * Set to whatever is returned by {@link #toString()} on the object.
026    */
027   TO_STRING,
028
029   /**
030    * Set to the bean property name.
031    */
032   PROPERTY_NAME,
033
034   /**
035    * Set to the URI value.
036    *
037    * <p>
038    * This is the same as {@link #TO_STRING} but strips off the anchor tag if present.
039    */
040   URI,
041
042   /**
043    * Set to the last token of the URI value.
044    */
045   LAST_TOKEN,
046
047   /**
048    * Set to the anchor of the URL.
049    *
050    * <p>
051    * (e.g. <js>"http://localhost:9080/foobar#anchorTextHere"</js>)
052    */
053   URI_ANCHOR,
054
055   /**
056    * Same as {@link #TO_STRING} but assumes it's a context-relative path.
057    */
058   CONTEXT_RELATIVE,
059
060   /**
061    * Same as {@link #TO_STRING} but assumes it's a servlet-relative path.
062    */
063   SERVLET_RELATIVE,
064
065   /**
066    * Same as {@link #TO_STRING} but assumes it's a path-relative path.
067    */
068   PATH_RELATIVE
069}