001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.html; 018 019/** 020 * Identifies possible values for the {@link HtmlSerializer.Builder#uriAnchorText(AnchorText)} setting. 021 * 022 * <h5 class='section'>See Also:</h5><ul> 023 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/HtmlBasics">HTML Basics</a> 024 * </ul> 025 */ 026public enum AnchorText { 027 028 /** 029 * Set to whatever is returned by {@link #toString()} on the object. 030 */ 031 TO_STRING, 032 033 /** 034 * Set to the bean property name. 035 */ 036 PROPERTY_NAME, 037 038 /** 039 * Set to the URI value. 040 * 041 * <p> 042 * This is the same as {@link #TO_STRING} but strips off the anchor tag if present. 043 */ 044 URI, 045 046 /** 047 * Set to the last token of the URI value. 048 */ 049 LAST_TOKEN, 050 051 /** 052 * Set to the anchor of the URL. 053 * 054 * <p> 055 * (e.g. <js>"http://localhost:9080/foobar#anchorTextHere"</js>) 056 */ 057 URI_ANCHOR, 058 059 /** 060 * Same as {@link #TO_STRING} but assumes it's a context-relative path. 061 */ 062 CONTEXT_RELATIVE, 063 064 /** 065 * Same as {@link #TO_STRING} but assumes it's a servlet-relative path. 066 */ 067 SERVLET_RELATIVE, 068 069 /** 070 * Same as {@link #TO_STRING} but assumes it's a path-relative path. 071 */ 072 PATH_RELATIVE 073}