001/** 002 */ 003package org.nasdanika.html.model.bootstrap; 004 005import org.eclipse.emf.common.util.EList; 006 007import org.eclipse.emf.common.util.EMap; 008import org.eclipse.emf.ecore.EObject; 009import org.nasdanika.html.bootstrap.Color; 010 011/** 012 * <!-- begin-user-doc --> 013 * A representation of the model object '<em><b>Appearance</b></em>'. 014 * <!-- end-user-doc --> 015 * 016 * <!-- begin-model-doc --> 017 * This class is used for configuring common aspects of HTML and Bootstrap elements such as background, spacing, text, etc. 018 * <!-- end-model-doc --> 019 * 020 * <p> 021 * The following features are supported: 022 * </p> 023 * <ul> 024 * <li>{@link org.nasdanika.html.model.bootstrap.Appearance#getBackground <em>Background</em>}</li> 025 * <li>{@link org.nasdanika.html.model.bootstrap.Appearance#getAttributes <em>Attributes</em>}</li> 026 * <li>{@link org.nasdanika.html.model.bootstrap.Appearance#getBorder <em>Border</em>}</li> 027 * <li>{@link org.nasdanika.html.model.bootstrap.Appearance#getMargin <em>Margin</em>}</li> 028 * <li>{@link org.nasdanika.html.model.bootstrap.Appearance#getPadding <em>Padding</em>}</li> 029 * <li>{@link org.nasdanika.html.model.bootstrap.Appearance#getText <em>Text</em>}</li> 030 * <li>{@link org.nasdanika.html.model.bootstrap.Appearance#getFloat <em>Float</em>}</li> 031 * <li>{@link org.nasdanika.html.model.bootstrap.Appearance#getChildren <em>Children</em>}</li> 032 * </ul> 033 * 034 * @see org.nasdanika.html.model.bootstrap.BootstrapPackage#getAppearance() 035 * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='border_overlap background attributes'" 036 * @generated 037 */ 038public interface Appearance extends EObject { 039 /** 040 * Returns the value of the '<em><b>Background</b></em>' attribute. 041 * <!-- begin-user-doc --> 042 * <!-- end-user-doc --> 043 * <!-- begin-model-doc --> 044 * Bootstrap color for background. 045 * <!-- end-model-doc --> 046 * @return the value of the '<em>Background</em>' attribute. 047 * @see #setBackground(Color) 048 * @see org.nasdanika.html.model.bootstrap.BootstrapPackage#getAppearance_Background() 049 * @model dataType="org.nasdanika.html.model.bootstrap.Color" 050 * @generated 051 */ 052 Color getBackground(); 053 054 /** 055 * Sets the value of the '{@link org.nasdanika.html.model.bootstrap.Appearance#getBackground <em>Background</em>}' attribute. 056 * <!-- begin-user-doc --> 057 * <!-- end-user-doc --> 058 * @param value the new value of the '<em>Background</em>' attribute. 059 * @see #getBackground() 060 * @generated 061 */ 062 void setBackground(Color value); 063 064 /** 065 * Returns the value of the '<em><b>Attributes</b></em>' map. 066 * The key is of type {@link java.lang.String}, 067 * and the value is of type {@link org.eclipse.emf.ecore.EObject}, 068 * <!-- begin-user-doc --> 069 * <!-- end-user-doc --> 070 * <!-- begin-model-doc --> 071 * HTML element (tag) attributes. Attributes defined at the appearance level overwrite attributes defined at the HTML element level. 072 * It is recommended to use one of the other. 073 * 074 * ## Interpolation 075 * 076 * Attribute values are interpolated, i.e. tokens in the form of ``${token name[|default value]}`` are replaced with the contextual values or default values, if any. Examples: 077 * 078 * * ``${my-style}`` - Token without a default value. 079 * * ``${font-weight|bold}`` - Token with a default value. 080 * 081 * ## Regular attributes 082 * 083 * For all top-level entries except ``class``, ``style``, and ``data`` attribute value is produced by converting the value to string for scalars and to JSON string for lists and maps. 084 * For attributes which do not start with ``data-`` a warning is issued if the value is not a scalar, i.e. a list or a map. 085 * 086 * ## Class 087 * 088 * For class attribute its value is formed by concantenating elements using space as a separator. If elements are hierarchical then class name is formed by concatenation with a dash (``-``) as a separator. 089 * 090 * ## Data 091 * 092 * If value of ``data`` attbibute is a map then keys of that map get concatenated with ``data`` using dash (``-``) as a separator, them same applies to nested maps. Non-map values become attribute values - scalars are converted to string, lists are converted to JSON string. 093 * 094 * ## Style 095 * 096 * Style can be defined as a string, list or map. If style is defined as a list, all list values are concatenated with a space as a separator - it is a convent way for long unstructured definitions. 097 * 098 * If style value is a map then the value and its contained map values are processed in the following fashion: 099 * 100 * * Keys are concatenated with dash as a separator. 101 * * List values are contcatenated wtih space as a separator. 102 * 103 * <!-- end-model-doc --> 104 * @return the value of the '<em>Attributes</em>' map. 105 * @see org.nasdanika.html.model.bootstrap.BootstrapPackage#getAppearance_Attributes() 106 * @model mapType="org.nasdanika.exec.Property<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EObject>" 107 * @generated 108 */ 109 EMap<String, EObject> getAttributes(); 110 111 /** 112 * Returns the value of the '<em><b>Border</b></em>' containment reference list. 113 * The list contents are of type {@link org.nasdanika.html.model.bootstrap.Border}. 114 * <!-- begin-user-doc --> 115 * <!-- end-user-doc --> 116 * <!-- begin-model-doc --> 117 * Border configuration. 118 * <!-- end-model-doc --> 119 * @return the value of the '<em>Border</em>' containment reference list. 120 * @see org.nasdanika.html.model.bootstrap.BootstrapPackage#getAppearance_Border() 121 * @model containment="true" upper="4" 122 * annotation="urn:org.nasdanika homogenous='true' strict-containment='true'" 123 * @generated 124 */ 125 EList<Border> getBorder(); 126 127 /** 128 * Returns the value of the '<em><b>Margin</b></em>' containment reference list. 129 * The list contents are of type {@link org.nasdanika.html.model.bootstrap.Spacing}. 130 * <!-- begin-user-doc --> 131 * <!-- end-user-doc --> 132 * <!-- begin-model-doc --> 133 * Margin configuration. 134 * <!-- end-model-doc --> 135 * @return the value of the '<em>Margin</em>' containment reference list. 136 * @see org.nasdanika.html.model.bootstrap.BootstrapPackage#getAppearance_Margin() 137 * @model containment="true" 138 * annotation="urn:org.nasdanika homogenous='true' strict-containment='true'" 139 * @generated 140 */ 141 EList<Spacing> getMargin(); 142 143 /** 144 * Returns the value of the '<em><b>Padding</b></em>' containment reference list. 145 * The list contents are of type {@link org.nasdanika.html.model.bootstrap.Spacing}. 146 * <!-- begin-user-doc --> 147 * <!-- end-user-doc --> 148 * <!-- begin-model-doc --> 149 * Padding configuration. 150 * <!-- end-model-doc --> 151 * @return the value of the '<em>Padding</em>' containment reference list. 152 * @see org.nasdanika.html.model.bootstrap.BootstrapPackage#getAppearance_Padding() 153 * @model containment="true" 154 * annotation="urn:org.nasdanika homogenous='true' strict-containment='true'" 155 * @generated 156 */ 157 EList<Spacing> getPadding(); 158 159 /** 160 * Returns the value of the '<em><b>Text</b></em>' containment reference. 161 * <!-- begin-user-doc --> 162 * <!-- end-user-doc --> 163 * <!-- begin-model-doc --> 164 * Text style 165 * <!-- end-model-doc --> 166 * @return the value of the '<em>Text</em>' containment reference. 167 * @see #setText(Text) 168 * @see org.nasdanika.html.model.bootstrap.BootstrapPackage#getAppearance_Text() 169 * @model containment="true" 170 * annotation="urn:org.nasdanika homogenous='true' strict-containment='true'" 171 * @generated 172 */ 173 Text getText(); 174 175 /** 176 * Sets the value of the '{@link org.nasdanika.html.model.bootstrap.Appearance#getText <em>Text</em>}' containment reference. 177 * <!-- begin-user-doc --> 178 * <!-- end-user-doc --> 179 * @param value the new value of the '<em>Text</em>' containment reference. 180 * @see #getText() 181 * @generated 182 */ 183 void setText(Text value); 184 185 /** 186 * Returns the value of the '<em><b>Float</b></em>' containment reference list. 187 * The list contents are of type {@link org.nasdanika.html.model.bootstrap.Float}. 188 * <!-- begin-user-doc --> 189 * <!-- end-user-doc --> 190 * <!-- begin-model-doc --> 191 * Float configuration. 192 * <!-- end-model-doc --> 193 * @return the value of the '<em>Float</em>' containment reference list. 194 * @see org.nasdanika.html.model.bootstrap.BootstrapPackage#getAppearance_Float() 195 * @model containment="true" 196 * annotation="urn:org.nasdanika homogenous='true' strict-containment='true' feature-key='float'" 197 * @generated 198 */ 199 EList<org.nasdanika.html.model.bootstrap.Float> getFloat(); 200 201 /** 202 * Returns the value of the '<em><b>Children</b></em>' map. 203 * The key is of type {@link java.lang.String}, 204 * and the value is of type {@link org.nasdanika.html.model.bootstrap.Appearance}, 205 * <!-- begin-user-doc --> 206 * <!-- end-user-doc --> 207 * @return the value of the '<em>Children</em>' map. 208 * @see org.nasdanika.html.model.bootstrap.BootstrapPackage#getAppearance_Children() 209 * @model mapType="org.nasdanika.html.model.bootstrap.AppearanceEntry<org.eclipse.emf.ecore.EString, org.nasdanika.html.model.bootstrap.Appearance>" 210 * @generated 211 */ 212 EMap<String, Appearance> getChildren(); 213 214 /** 215 * <!-- begin-user-doc --> 216 * <!-- end-user-doc --> 217 * @model 218 * @generated 219 */ 220 Appearance effectiveAppearance(String path); 221 222} // Appearance