1 /* 2 * #%L 3 * EUGene :: EUGene 4 * %% 5 * Copyright (C) 2004 - 2010 CodeLutin 6 * %% 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU Lesser General Public License as 9 * published by the Free Software Foundation, either version 3 of the 10 * License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Lesser Public License for more details. 16 * 17 * You should have received a copy of the GNU General Lesser Public 18 * License along with this program. If not, see 19 * <http://www.gnu.org/licenses/lgpl-3.0.html>. 20 * #L% 21 */ 22 23 package org.nuiton.eugene.models.object; 24 25 /** 26 * Abstraction for the attribute node of object model trees. 27 * This object presents all information concerning the given attribute. 28 * 29 * Created: 14 janv. 2004 30 * 31 * @author Cédric Pineau - pineau@codelutin.com 32 */ 33 public interface ObjectModelAttribute extends ObjectModelParameter { 34 35 /** 36 * Returns the type of this attribute. 37 * 38 * @return the type of this attribute. 39 */ 40 String getType(); 41 42 /** 43 * Returns whether this attribute is an aggregate or not. 44 * 45 * @return {@code true} if this attribute is an aggregate or not. 46 */ 47 boolean isAggregate(); 48 49 /** 50 * Returns whether this attribute is a composite or not. 51 * 52 * @return {@code true} if this attribute is a composite or not. 53 */ 54 boolean isComposite(); 55 56 /** 57 * Returns the visibility of this attribute. 58 * 59 * Possible values includes {@code public}, {@code protected} 60 * and {@code private}. 61 * 62 * @return the visibility of this attribute. 63 */ 64 String getVisibility(); 65 66 /** 67 * Returns whether this attribute reference a model classifier or not. 68 * 69 * @return a boolean indicating whether this attribute reference a model 70 * classifier or not. 71 */ 72 boolean referenceClassifier(); 73 74 /** 75 * Returns the classifier referenced by this attribute or null if it does 76 * not reference a model classifier. 77 * 78 * @return the ObjectModelClassfifier referenced by this attribute or null 79 * if it does not reference a model classifier. 80 */ 81 ObjectModelClassifier getClassifier(); 82 83 /** 84 * Returns the attribute used to reference this class at the other end of 85 * the association or null if this is not an association, or if it is not 86 * bi-directionnal. 87 * 88 * @return the ObjectModelAttribute used to reference this class at the 89 * other end of the association or null if this is not an 90 * association, or if it is not bi-directionnal. 91 * @see #getClassifier() 92 */ 93 ObjectModelAttribute getReverseAttribute(); 94 95 /** 96 * Return attribute reserver attribute name. 97 * 98 * @return reverse attribute name or null 99 */ 100 String getReverseAttributeName(); 101 102 /** 103 * max multiplicity of the reverse attribute 104 * 105 * @return max multiplicity of the reverse attribute 106 */ 107 int getReverseMaxMultiplicity(); 108 109 /** 110 * @return a ObjectModelClass corresponding to the association class 111 * associated with this association, or null if there is none. 112 */ 113 ObjectModelClass getAssociationClass(); 114 115 /** 116 * @return {@code true} if this association has an associated association 117 * class, ot not. 118 */ 119 boolean hasAssociationClass(); 120 121 /** 122 * @return {@code true} if this attribute is static or not. 123 */ 124 boolean isStatic(); 125 126 /** 127 * @return {@code true} if this attribute is final or not. 128 */ 129 boolean isFinal(); 130 131 /** 132 * @return {@code true} if this attribute is transient. 133 */ 134 boolean isTransient(); 135 136 /** 137 * @return {@code true} if this attribute is navigable. 138 */ 139 boolean isNavigable(); 140 } //ObjectModelAttribute