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.jsonschema.annotation; 014 015import java.lang.annotation.*; 016 017import org.apache.juneau.*; 018 019/** 020 * A concrete implementation of the {@link ExternalDocs} annotation. 021 * 022 * <ul class='seealso'> 023 * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)} 024 * </ul> 025 */ 026public class ExternalDocsAnnotation implements ExternalDocs { 027 028 private String 029 url = ""; 030 private String[] 031 description = new String[0], 032 value = new String[0]; 033 034 @Override 035 public Class<? extends Annotation> annotationType() { 036 return ExternalDocs.class; 037 } 038 039 @Override 040 public String[] description() { 041 return description; 042 } 043 044 /** 045 * Sets the <c>description</c> property on this annotation. 046 * 047 * @param value The new value for this property. 048 * @return This object (for method chaining). 049 */ 050 public ExternalDocsAnnotation description(String...value) { 051 this.description = value; 052 return this; 053 } 054 055 @Override 056 public String url() { 057 return url; 058 } 059 060 /** 061 * Sets the <c>url</c> property on this annotation. 062 * 063 * @param value The new value for this property. 064 * @return This object (for method chaining). 065 */ 066 public ExternalDocsAnnotation url(String value) { 067 this.url = value; 068 return this; 069 } 070 071 @Override 072 public String[] value() { 073 return value; 074 } 075 076 /** 077 * Sets the <c>value</c> property on this annotation. 078 * 079 * @param value The new value for this property. 080 * @return This object (for method chaining). 081 */ 082 public ExternalDocsAnnotation value(String...value) { 083 this.value = value; 084 return this; 085 } 086}