001/* 002 * Copyright 2012 Atteo. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.atteo.evo.config.doclet; 017 018import com.sun.javadoc.Type; 019 020public class ElementDescription { 021 private String name; 022 private String comment; 023 private boolean required; 024 private ElementType type; 025 private String defaultValue; 026 private boolean collection; 027 private String wrapperName; 028 private Type elementType; 029 private boolean idref = false; 030 031 public String getComment() { 032 return comment; 033 } 034 035 public void setComment(String comment) { 036 if (comment != null) { 037 comment = comment.trim(); 038 if (comment.isEmpty()) { 039 comment = null; 040 } 041 } 042 this.comment = comment; 043 } 044 045 public String getName() { 046 return name; 047 } 048 049 public void setName(String name) { 050 this.name = name; 051 } 052 053 public boolean isRequired() { 054 return required; 055 } 056 057 public void setRequired(boolean required) { 058 this.required = required; 059 } 060 061 public ElementType getType() { 062 return type; 063 } 064 065 public void setType(ElementType type) { 066 this.type = type; 067 } 068 069 public String getDefaultValue() { 070 return defaultValue; 071 } 072 073 public void setDefaultValue(String defaultValue) { 074 this.defaultValue = defaultValue; 075 } 076 077 public boolean isCollection() { 078 return collection; 079 } 080 081 public void setCollection(boolean collection) { 082 this.collection = collection; 083 } 084 085 public String getWrapperName() { 086 return wrapperName; 087 } 088 089 public void setWrapperName(String wrapperName) { 090 this.wrapperName = wrapperName; 091 } 092 093 public Type getElementType() { 094 return elementType; 095 } 096 097 public void setElementType(Type elementType) { 098 this.elementType = elementType; 099 } 100 101 public boolean isIdref() { 102 return idref; 103 } 104 105 public void setIdref(boolean idref) { 106 this.idref = idref; 107 } 108}