Skip to content
This repository
  • 1 commit
  • 17 files changed
  • 0 comments
  • 1 contributor
54 data/src/main/java/org/soluvas/data/AttributeType.java
@@ -46,6 +46,8 @@
46 46 * <li>{@link org.soluvas.data.AttributeType#getMinValues <em>Min Values</em>}</li>
47 47 * <li>{@link org.soluvas.data.AttributeType#getMaxValues <em>Max Values</em>}</li>
48 48 * <li>{@link org.soluvas.data.AttributeType#getDataTypeName <em>Data Type Name</em>}</li>
  49 + * <li>{@link org.soluvas.data.AttributeType#getKindNsPrefix <em>Kind Ns Prefix</em>}</li>
  50 + * <li>{@link org.soluvas.data.AttributeType#getKindName <em>Kind Name</em>}</li>
49 51 * </ul>
50 52 * </p>
51 53 *
@@ -156,6 +158,58 @@
156 158 void setDataTypeName(String value);
157 159
158 160 /**
  161 + * Returns the value of the '<em><b>Kind Ns Prefix</b></em>' attribute.
  162 + * <!-- begin-user-doc -->
  163 + * <p>
  164 + * If the meaning of the '<em>Kind Ns Prefix</em>' attribute isn't clear,
  165 + * there really should be more of a description here...
  166 + * </p>
  167 + * <!-- end-user-doc -->
  168 + * @return the value of the '<em>Kind Ns Prefix</em>' attribute.
  169 + * @see #setKindNsPrefix(String)
  170 + * @see org.soluvas.data.DataPackage#getAttributeType_KindNsPrefix()
  171 + * @model
  172 + * @generated
  173 + */
  174 + String getKindNsPrefix();
  175 +
  176 + /**
  177 + * Sets the value of the '{@link org.soluvas.data.AttributeType#getKindNsPrefix <em>Kind Ns Prefix</em>}' attribute.
  178 + * <!-- begin-user-doc -->
  179 + * <!-- end-user-doc -->
  180 + * @param value the new value of the '<em>Kind Ns Prefix</em>' attribute.
  181 + * @see #getKindNsPrefix()
  182 + * @generated
  183 + */
  184 + void setKindNsPrefix(String value);
  185 +
  186 + /**
  187 + * Returns the value of the '<em><b>Kind Name</b></em>' attribute.
  188 + * <!-- begin-user-doc -->
  189 + * <p>
  190 + * If the meaning of the '<em>Kind Name</em>' attribute isn't clear,
  191 + * there really should be more of a description here...
  192 + * </p>
  193 + * <!-- end-user-doc -->
  194 + * @return the value of the '<em>Kind Name</em>' attribute.
  195 + * @see #setKindName(String)
  196 + * @see org.soluvas.data.DataPackage#getAttributeType_KindName()
  197 + * @model
  198 + * @generated
  199 + */
  200 + String getKindName();
  201 +
  202 + /**
  203 + * Sets the value of the '{@link org.soluvas.data.AttributeType#getKindName <em>Kind Name</em>}' attribute.
  204 + * <!-- begin-user-doc -->
  205 + * <!-- end-user-doc -->
  206 + * @param value the new value of the '<em>Kind Name</em>' attribute.
  207 + * @see #getKindName()
  208 + * @generated
  209 + */
  210 + void setKindName(String value);
  211 +
  212 + /**
159 213 * <!-- begin-user-doc -->
160 214 * <!-- end-user-doc -->
161 215 * <!-- begin-model-doc -->
20 data/src/main/java/org/soluvas/data/DataCatalog.java
@@ -19,6 +19,7 @@
19 19 * <li>{@link org.soluvas.data.DataCatalog#getVocabs <em>Vocabs</em>}</li>
20 20 * <li>{@link org.soluvas.data.DataCatalog#getMixins <em>Mixins</em>}</li>
21 21 * <li>{@link org.soluvas.data.DataCatalog#getTerms <em>Terms</em>}</li>
  22 + * <li>{@link org.soluvas.data.DataCatalog#getKinds <em>Kinds</em>}</li>
22 23 * <li>{@link org.soluvas.data.DataCatalog#getAttributeTypes <em>Attribute Types</em>}</li>
23 24 * </ul>
24 25 * </p>
@@ -77,6 +78,22 @@
77 78 EList<Term> getTerms();
78 79
79 80 /**
  81 + * Returns the value of the '<em><b>Kinds</b></em>' containment reference list.
  82 + * The list contents are of type {@link org.soluvas.data.Kind}.
  83 + * <!-- begin-user-doc -->
  84 + * <p>
  85 + * If the meaning of the '<em>Kinds</em>' containment reference list isn't clear,
  86 + * there really should be more of a description here...
  87 + * </p>
  88 + * <!-- end-user-doc -->
  89 + * @return the value of the '<em>Kinds</em>' containment reference list.
  90 + * @see org.soluvas.data.DataPackage#getDataCatalog_Kinds()
  91 + * @model containment="true"
  92 + * @generated
  93 + */
  94 + EList<Kind> getKinds();
  95 +
  96 + /**
80 97 * Returns the value of the '<em><b>Attribute Types</b></em>' containment reference list.
81 98 * The list contents are of type {@link org.soluvas.data.AttributeType}.
82 99 * <!-- begin-user-doc -->
@@ -85,6 +102,9 @@
85 102 * there really should be more of a description here...
86 103 * </p>
87 104 * <!-- end-user-doc -->
  105 + * <!-- begin-model-doc -->
  106 + * TEMPORARY : WILL BE REPLACED BY kinds
  107 + * <!-- end-model-doc -->
88 108 * @return the value of the '<em>Attribute Types</em>' containment reference list.
89 109 * @see org.soluvas.data.DataPackage#getDataCatalog_AttributeTypes()
90 110 * @model containment="true"
9 data/src/main/java/org/soluvas/data/DataFactory.java
@@ -130,6 +130,15 @@
130 130 TermManager createTermManager();
131 131
132 132 /**
  133 + * Returns a new object of class '<em>Kind</em>'.
  134 + * <!-- begin-user-doc -->
  135 + * <!-- end-user-doc -->
  136 + * @return a new object of class '<em>Kind</em>'.
  137 + * @generated
  138 + */
  139 + Kind createKind();
  140 +
  141 + /**
133 142 * Returns the package supported by this factory.
134 143 * <!-- begin-user-doc -->
135 144 * <!-- end-user-doc -->
225 data/src/main/java/org/soluvas/data/DataPackage.java
@@ -159,13 +159,31 @@
159 159 int ATTRIBUTE_TYPE__DATA_TYPE_NAME = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 8;
160 160
161 161 /**
  162 + * The feature id for the '<em><b>Kind Ns Prefix</b></em>' attribute.
  163 + * <!-- begin-user-doc -->
  164 + * <!-- end-user-doc -->
  165 + * @generated
  166 + * @ordered
  167 + */
  168 + int ATTRIBUTE_TYPE__KIND_NS_PREFIX = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 9;
  169 +
  170 + /**
  171 + * The feature id for the '<em><b>Kind Name</b></em>' attribute.
  172 + * <!-- begin-user-doc -->
  173 + * <!-- end-user-doc -->
  174 + * @generated
  175 + * @ordered
  176 + */
  177 + int ATTRIBUTE_TYPE__KIND_NAME = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 10;
  178 +
  179 + /**
162 180 * The number of structural features of the '<em>Attribute Type</em>' class.
163 181 * <!-- begin-user-doc -->
164 182 * <!-- end-user-doc -->
165 183 * @generated
166 184 * @ordered
167 185 */
168   - int ATTRIBUTE_TYPE_FEATURE_COUNT = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 9;
  186 + int ATTRIBUTE_TYPE_FEATURE_COUNT = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 11;
169 187
170 188 /**
171 189 * The meta object id for the '{@link org.soluvas.data.impl.ValueImpl <em>Value</em>}' class.
@@ -434,13 +452,22 @@
434 452 int MIXIN__ATTRIBUTE_TYPES = CommonsPackage.NAME_CONTAINER_FEATURE_COUNT + 6;
435 453
436 454 /**
  455 + * The feature id for the '<em><b>Display Name</b></em>' attribute.
  456 + * <!-- begin-user-doc -->
  457 + * <!-- end-user-doc -->
  458 + * @generated
  459 + * @ordered
  460 + */
  461 + int MIXIN__DISPLAY_NAME = CommonsPackage.NAME_CONTAINER_FEATURE_COUNT + 7;
  462 +
  463 + /**
437 464 * The number of structural features of the '<em>Mixin</em>' class.
438 465 * <!-- begin-user-doc -->
439 466 * <!-- end-user-doc -->
440 467 * @generated
441 468 * @ordered
442 469 */
443   - int MIXIN_FEATURE_COUNT = CommonsPackage.NAME_CONTAINER_FEATURE_COUNT + 7;
  470 + int MIXIN_FEATURE_COUNT = CommonsPackage.NAME_CONTAINER_FEATURE_COUNT + 8;
444 471
445 472 /**
446 473 * The meta object id for the '{@link org.soluvas.data.impl.RangeValueImpl <em>Range Value</em>}' class.
@@ -1163,13 +1190,22 @@
1163 1190 int DATA_CATALOG__TERMS = CommonsPackage.BUNDLE_AWARE_FEATURE_COUNT + 6;
1164 1191
1165 1192 /**
  1193 + * The feature id for the '<em><b>Kinds</b></em>' containment reference list.
  1194 + * <!-- begin-user-doc -->
  1195 + * <!-- end-user-doc -->
  1196 + * @generated
  1197 + * @ordered
  1198 + */
  1199 + int DATA_CATALOG__KINDS = CommonsPackage.BUNDLE_AWARE_FEATURE_COUNT + 7;
  1200 +
  1201 + /**
1166 1202 * The feature id for the '<em><b>Attribute Types</b></em>' containment reference list.
1167 1203 * <!-- begin-user-doc -->
1168 1204 * <!-- end-user-doc -->
1169 1205 * @generated
1170 1206 * @ordered
1171 1207 */
1172   - int DATA_CATALOG__ATTRIBUTE_TYPES = CommonsPackage.BUNDLE_AWARE_FEATURE_COUNT + 7;
  1208 + int DATA_CATALOG__ATTRIBUTE_TYPES = CommonsPackage.BUNDLE_AWARE_FEATURE_COUNT + 8;
1173 1209
1174 1210 /**
1175 1211 * The number of structural features of the '<em>Catalog</em>' class.
@@ -1178,7 +1214,7 @@
1178 1214 * @generated
1179 1215 * @ordered
1180 1216 */
1181   - int DATA_CATALOG_FEATURE_COUNT = CommonsPackage.BUNDLE_AWARE_FEATURE_COUNT + 8;
  1217 + int DATA_CATALOG_FEATURE_COUNT = CommonsPackage.BUNDLE_AWARE_FEATURE_COUNT + 9;
1182 1218
1183 1219 /**
1184 1220 * The meta object id for the '{@link org.soluvas.data.impl.TermManagerImpl <em>Term Manager</em>}' class.
@@ -1209,6 +1245,79 @@
1209 1245 int TERM_MANAGER_FEATURE_COUNT = 1;
1210 1246
1211 1247 /**
  1248 + * The meta object id for the '{@link org.soluvas.data.impl.KindImpl <em>Kind</em>}' class.
  1249 + * <!-- begin-user-doc -->
  1250 + * <!-- end-user-doc -->
  1251 + * @see org.soluvas.data.impl.KindImpl
  1252 + * @see org.soluvas.data.impl.DataPackageImpl#getKind()
  1253 + * @generated
  1254 + */
  1255 + int KIND = 16;
  1256 +
  1257 + /**
  1258 + * The feature id for the '<em><b>Ns Prefix</b></em>' attribute.
  1259 + * <!-- begin-user-doc -->
  1260 + * <!-- end-user-doc -->
  1261 + * @generated
  1262 + * @ordered
  1263 + */
  1264 + int KIND__NS_PREFIX = CommonsPackage.NS_PREFIXABLE__NS_PREFIX;
  1265 +
  1266 + /**
  1267 + * The feature id for the '<em><b>Bundle</b></em>' attribute.
  1268 + * <!-- begin-user-doc -->
  1269 + * <!-- end-user-doc -->
  1270 + * @generated
  1271 + * @ordered
  1272 + */
  1273 + int KIND__BUNDLE = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 0;
  1274 +
  1275 + /**
  1276 + * The feature id for the '<em><b>Name</b></em>' attribute.
  1277 + * <!-- begin-user-doc -->
  1278 + * <!-- end-user-doc -->
  1279 + * @generated
  1280 + * @ordered
  1281 + */
  1282 + int KIND__NAME = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 1;
  1283 +
  1284 + /**
  1285 + * The feature id for the '<em><b>Resource Type</b></em>' attribute.
  1286 + * <!-- begin-user-doc -->
  1287 + * <!-- end-user-doc -->
  1288 + * @generated
  1289 + * @ordered
  1290 + */
  1291 + int KIND__RESOURCE_TYPE = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 2;
  1292 +
  1293 + /**
  1294 + * The feature id for the '<em><b>Resource Uri</b></em>' attribute.
  1295 + * <!-- begin-user-doc -->
  1296 + * <!-- end-user-doc -->
  1297 + * @generated
  1298 + * @ordered
  1299 + */
  1300 + int KIND__RESOURCE_URI = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 3;
  1301 +
  1302 + /**
  1303 + * The feature id for the '<em><b>Resource Name</b></em>' attribute.
  1304 + * <!-- begin-user-doc -->
  1305 + * <!-- end-user-doc -->
  1306 + * @generated
  1307 + * @ordered
  1308 + */
  1309 + int KIND__RESOURCE_NAME = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 4;
  1310 +
  1311 + /**
  1312 + * The number of structural features of the '<em>Kind</em>' class.
  1313 + * <!-- begin-user-doc -->
  1314 + * <!-- end-user-doc -->
  1315 + * @generated
  1316 + * @ordered
  1317 + */
  1318 + int KIND_FEATURE_COUNT = CommonsPackage.NS_PREFIXABLE_FEATURE_COUNT + 5;
  1319 +
  1320 + /**
1212 1321 * The meta object id for the '{@link org.soluvas.data.AttributeSemantic <em>Attribute Semantic</em>}' enum.
1213 1322 * <!-- begin-user-doc -->
1214 1323 * <!-- end-user-doc -->
@@ -1216,7 +1325,7 @@
1216 1325 * @see org.soluvas.data.impl.DataPackageImpl#getAttributeSemantic()
1217 1326 * @generated
1218 1327 */
1219   - int ATTRIBUTE_SEMANTIC = 16;
  1328 + int ATTRIBUTE_SEMANTIC = 17;
1220 1329
1221 1330 /**
1222 1331 * The meta object id for the '<em>Crud Repository</em>' data type.
@@ -1226,7 +1335,7 @@
1226 1335 * @see org.soluvas.data.impl.DataPackageImpl#getCrudRepository()
1227 1336 * @generated
1228 1337 */
1229   - int CRUD_REPOSITORY = 17;
  1338 + int CRUD_REPOSITORY = 18;
1230 1339
1231 1340 /**
1232 1341 * The meta object id for the '<em>Paging And Sorting Repository</em>' data type.
@@ -1236,7 +1345,7 @@
1236 1345 * @see org.soluvas.data.impl.DataPackageImpl#getPagingAndSortingRepository()
1237 1346 * @generated
1238 1347 */
1239   - int PAGING_AND_SORTING_REPOSITORY = 18;
  1348 + int PAGING_AND_SORTING_REPOSITORY = 19;
1240 1349
1241 1350 /**
1242 1351 * The meta object id for the '<em>Crud Repository Base</em>' data type.
@@ -1246,7 +1355,7 @@
1246 1355 * @see org.soluvas.data.impl.DataPackageImpl#getCrudRepositoryBase()
1247 1356 * @generated
1248 1357 */
1249   - int CRUD_REPOSITORY_BASE = 19;
  1358 + int CRUD_REPOSITORY_BASE = 20;
1250 1359
1251 1360
1252 1361 /**
@@ -1257,7 +1366,7 @@
1257 1366 * @see org.soluvas.data.impl.DataPackageImpl#getMeasure()
1258 1367 * @generated
1259 1368 */
1260   - int MEASURE = 20;
  1369 + int MEASURE = 21;
1261 1370
1262 1371 /**
1263 1372 * The meta object id for the '<em>Decimal Measure</em>' data type.
@@ -1267,7 +1376,7 @@
1267 1376 * @see org.soluvas.data.impl.DataPackageImpl#getDecimalMeasure()
1268 1377 * @generated
1269 1378 */
1270   - int DECIMAL_MEASURE = 21;
  1379 + int DECIMAL_MEASURE = 22;
1271 1380
1272 1381
1273 1382 /**
@@ -1325,6 +1434,28 @@
1325 1434 EAttribute getAttributeType_DataTypeName();
1326 1435
1327 1436 /**
  1437 + * Returns the meta object for the attribute '{@link org.soluvas.data.AttributeType#getKindNsPrefix <em>Kind Ns Prefix</em>}'.
  1438 + * <!-- begin-user-doc -->
  1439 + * <!-- end-user-doc -->
  1440 + * @return the meta object for the attribute '<em>Kind Ns Prefix</em>'.
  1441 + * @see org.soluvas.data.AttributeType#getKindNsPrefix()
  1442 + * @see #getAttributeType()
  1443 + * @generated
  1444 + */
  1445 + EAttribute getAttributeType_KindNsPrefix();
  1446 +
  1447 + /**
  1448 + * Returns the meta object for the attribute '{@link org.soluvas.data.AttributeType#getKindName <em>Kind Name</em>}'.
  1449 + * <!-- begin-user-doc -->
  1450 + * <!-- end-user-doc -->
  1451 + * @return the meta object for the attribute '<em>Kind Name</em>'.
  1452 + * @see org.soluvas.data.AttributeType#getKindName()
  1453 + * @see #getAttributeType()
  1454 + * @generated
  1455 + */
  1456 + EAttribute getAttributeType_KindName();
  1457 +
  1458 + /**
1328 1459 * Returns the meta object for class '{@link org.soluvas.data.Value <em>Value</em>}'.
1329 1460 * <!-- begin-user-doc -->
1330 1461 * <!-- end-user-doc -->
@@ -1452,6 +1583,17 @@
1452 1583 EReference getMixin_AttributeTypes();
1453 1584
1454 1585 /**
  1586 + * Returns the meta object for the attribute '{@link org.soluvas.data.Mixin#getDisplayName <em>Display Name</em>}'.
  1587 + * <!-- begin-user-doc -->
  1588 + * <!-- end-user-doc -->
  1589 + * @return the meta object for the attribute '<em>Display Name</em>'.
  1590 + * @see org.soluvas.data.Mixin#getDisplayName()
  1591 + * @see #getMixin()
  1592 + * @generated
  1593 + */
  1594 + EAttribute getMixin_DisplayName();
  1595 +
  1596 + /**
1455 1597 * Returns the meta object for class '{@link org.soluvas.data.RangeValue <em>Range Value</em>}'.
1456 1598 * <!-- begin-user-doc -->
1457 1599 * <!-- end-user-doc -->
@@ -1696,6 +1838,17 @@
1696 1838 EReference getDataCatalog_Terms();
1697 1839
1698 1840 /**
  1841 + * Returns the meta object for the containment reference list '{@link org.soluvas.data.DataCatalog#getKinds <em>Kinds</em>}'.
  1842 + * <!-- begin-user-doc -->
  1843 + * <!-- end-user-doc -->
  1844 + * @return the meta object for the containment reference list '<em>Kinds</em>'.
  1845 + * @see org.soluvas.data.DataCatalog#getKinds()
  1846 + * @see #getDataCatalog()
  1847 + * @generated
  1848 + */
  1849 + EReference getDataCatalog_Kinds();
  1850 +
  1851 + /**
1699 1852 * Returns the meta object for the containment reference list '{@link org.soluvas.data.DataCatalog#getAttributeTypes <em>Attribute Types</em>}'.
1700 1853 * <!-- begin-user-doc -->
1701 1854 * <!-- end-user-doc -->
@@ -1728,6 +1881,16 @@
1728 1881 EReference getTermManager_DataCatalog();
1729 1882
1730 1883 /**
  1884 + * Returns the meta object for class '{@link org.soluvas.data.Kind <em>Kind</em>}'.
  1885 + * <!-- begin-user-doc -->
  1886 + * <!-- end-user-doc -->
  1887 + * @return the meta object for class '<em>Kind</em>'.
  1888 + * @see org.soluvas.data.Kind
  1889 + * @generated
  1890 + */
  1891 + EClass getKind();
  1892 +
  1893 + /**
1731 1894 * Returns the meta object for enum '{@link org.soluvas.data.AttributeSemantic <em>Attribute Semantic</em>}'.
1732 1895 * <!-- begin-user-doc -->
1733 1896 * <!-- end-user-doc -->
@@ -1857,6 +2020,22 @@
1857 2020 EAttribute ATTRIBUTE_TYPE__DATA_TYPE_NAME = eINSTANCE.getAttributeType_DataTypeName();
1858 2021
1859 2022 /**
  2023 + * The meta object literal for the '<em><b>Kind Ns Prefix</b></em>' attribute feature.
  2024 + * <!-- begin-user-doc -->
  2025 + * <!-- end-user-doc -->
  2026 + * @generated
  2027 + */
  2028 + EAttribute ATTRIBUTE_TYPE__KIND_NS_PREFIX = eINSTANCE.getAttributeType_KindNsPrefix();
  2029 +
  2030 + /**
  2031 + * The meta object literal for the '<em><b>Kind Name</b></em>' attribute feature.
  2032 + * <!-- begin-user-doc -->
  2033 + * <!-- end-user-doc -->
  2034 + * @generated
  2035 + */
  2036 + EAttribute ATTRIBUTE_TYPE__KIND_NAME = eINSTANCE.getAttributeType_KindName();
  2037 +
  2038 + /**
1860 2039 * The meta object literal for the '{@link org.soluvas.data.impl.ValueImpl <em>Value</em>}' class.
1861 2040 * <!-- begin-user-doc -->
1862 2041 * <!-- end-user-doc -->
@@ -1963,6 +2142,14 @@
1963 2142 EReference MIXIN__ATTRIBUTE_TYPES = eINSTANCE.getMixin_AttributeTypes();
1964 2143
1965 2144 /**
  2145 + * The meta object literal for the '<em><b>Display Name</b></em>' attribute feature.
  2146 + * <!-- begin-user-doc -->
  2147 + * <!-- end-user-doc -->
  2148 + * @generated
  2149 + */
  2150 + EAttribute MIXIN__DISPLAY_NAME = eINSTANCE.getMixin_DisplayName();
  2151 +
  2152 + /**
1966 2153 * The meta object literal for the '{@link org.soluvas.data.impl.RangeValueImpl <em>Range Value</em>}' class.
1967 2154 * <!-- begin-user-doc -->
1968 2155 * <!-- end-user-doc -->
@@ -2165,6 +2352,14 @@
2165 2352 EReference DATA_CATALOG__TERMS = eINSTANCE.getDataCatalog_Terms();
2166 2353
2167 2354 /**
  2355 + * The meta object literal for the '<em><b>Kinds</b></em>' containment reference list feature.
  2356 + * <!-- begin-user-doc -->
  2357 + * <!-- end-user-doc -->
  2358 + * @generated
  2359 + */
  2360 + EReference DATA_CATALOG__KINDS = eINSTANCE.getDataCatalog_Kinds();
  2361 +
  2362 + /**
2168 2363 * The meta object literal for the '<em><b>Attribute Types</b></em>' containment reference list feature.
2169 2364 * <!-- begin-user-doc -->
2170 2365 * <!-- end-user-doc -->
@@ -2191,6 +2386,16 @@
2191 2386 EReference TERM_MANAGER__DATA_CATALOG = eINSTANCE.getTermManager_DataCatalog();
2192 2387
2193 2388 /**
  2389 + * The meta object literal for the '{@link org.soluvas.data.impl.KindImpl <em>Kind</em>}' class.
  2390 + * <!-- begin-user-doc -->
  2391 + * <!-- end-user-doc -->
  2392 + * @see org.soluvas.data.impl.KindImpl
  2393 + * @see org.soluvas.data.impl.DataPackageImpl#getKind()
  2394 + * @generated
  2395 + */
  2396 + EClass KIND = eINSTANCE.getKind();
  2397 +
  2398 + /**
2194 2399 * The meta object literal for the '{@link org.soluvas.data.AttributeSemantic <em>Attribute Semantic</em>}' enum.
2195 2400 * <!-- begin-user-doc -->
2196 2401 * <!-- end-user-doc -->
36 data/src/main/java/org/soluvas/data/Kind.java
... ... @@ -0,0 +1,36 @@
  1 +/**
  2 + */
  3 +package org.soluvas.data;
  4 +
  5 +import org.soluvas.commons.BundleAware;
  6 +import org.soluvas.commons.NameContainer;
  7 +import org.soluvas.commons.NsPrefixable;
  8 +import org.soluvas.commons.ResourceAware;
  9 +
  10 +/**
  11 + * <!-- begin-user-doc -->
  12 + * A representation of the model object '<em><b>Kind</b></em>'.
  13 + * <!-- end-user-doc -->
  14 + *
  15 + * <!-- begin-model-doc -->
  16 + * 1. Kind (Attribute Type / Vocab) is like an EMF DataType or Enum.
  17 + * A Kind is always type-agnostic, but a default input method & unit can be hinted by the attribute (see below).
  18 + * A Kind is always cardinality agnostic.
  19 + * For example, Length kind is hinted as "measure" with "cm" unit, however all the attribute values below are valid:
  20 + * 1. 9 cm (just like the hint)
  21 + * 2. 10 km (different unit)
  22 + * 3. 9-12 cm (use unit like the hint, but RangeValue instead)
  23 + * 4. 5-6 kg (different unit and use RangeValue)
  24 + * 5. "cukup panjang untuk orang dewasa" (StringValue)
  25 + * 6. base_very_long (TermValue from base nsPrefix)
  26 + * 7. tuneeca_half_a_mile (TermValue from tuneeca nsPrefix)
  27 + * In addition, all of the above can have multiple cardinality or no value.
  28 + * <!-- end-model-doc -->
  29 + *
  30 + *
  31 + * @see org.soluvas.data.DataPackage#getKind()
  32 + * @model
  33 + * @generated
  34 + */
  35 +public interface Kind extends NsPrefixable, BundleAware, NameContainer, ResourceAware {
  36 +} // Kind
27 data/src/main/java/org/soluvas/data/Mixin.java
@@ -21,6 +21,7 @@
21 21 * The following features are supported:
22 22 * <ul>
23 23 * <li>{@link org.soluvas.data.Mixin#getAttributeTypes <em>Attribute Types</em>}</li>
  24 + * <li>{@link org.soluvas.data.Mixin#getDisplayName <em>Display Name</em>}</li>
24 25 * </ul>
25 26 * </p>
26 27 *
@@ -46,4 +47,30 @@
46 47 */
47 48 EList<AttributeType> getAttributeTypes();
48 49
  50 + /**
  51 + * Returns the value of the '<em><b>Display Name</b></em>' attribute.
  52 + * <!-- begin-user-doc -->
  53 + * <p>
  54 + * If the meaning of the '<em>Display Name</em>' attribute isn't clear,
  55 + * there really should be more of a description here...
  56 + * </p>
  57 + * <!-- end-user-doc -->
  58 + * @return the value of the '<em>Display Name</em>' attribute.
  59 + * @see #setDisplayName(String)
  60 + * @see org.soluvas.data.DataPackage#getMixin_DisplayName()
  61 + * @model
  62 + * @generated
  63 + */
  64 + String getDisplayName();
  65 +
  66 + /**
  67 + * Sets the value of the '{@link org.soluvas.data.Mixin#getDisplayName <em>Display Name</em>}' attribute.
  68 + * <!-- begin-user-doc -->
  69 + * <!-- end-user-doc -->
  70 + * @param value the new value of the '<em>Display Name</em>' attribute.
  71 + * @see #getDisplayName()
  72 + * @generated
  73 + */
  74 + void setDisplayName(String value);
  75 +
49 76 } // Mixin
37 data/src/main/java/org/soluvas/data/impl/DataCatalogImpl.java
@@ -29,6 +29,7 @@
29 29 import org.soluvas.data.AttributeType;
30 30 import org.soluvas.data.DataCatalog;
31 31 import org.soluvas.data.DataPackage;
  32 +import org.soluvas.data.Kind;
32 33 import org.soluvas.data.Mixin;
33 34 import org.soluvas.data.Term;
34 35 import org.soluvas.data.Vocab;
@@ -48,6 +49,7 @@
48 49 * <li>{@link org.soluvas.data.impl.DataCatalogImpl#getVocabs <em>Vocabs</em>}</li>
49 50 * <li>{@link org.soluvas.data.impl.DataCatalogImpl#getMixins <em>Mixins</em>}</li>
50 51 * <li>{@link org.soluvas.data.impl.DataCatalogImpl#getTerms <em>Terms</em>}</li>
  52 + * <li>{@link org.soluvas.data.impl.DataCatalogImpl#getKinds <em>Kinds</em>}</li>
51 53 * <li>{@link org.soluvas.data.impl.DataCatalogImpl#getAttributeTypes <em>Attribute Types</em>}</li>
52 54 * </ul>
53 55 * </p>
@@ -186,6 +188,16 @@
186 188 protected EList<Term> terms;
187 189
188 190 /**
  191 + * The cached value of the '{@link #getKinds() <em>Kinds</em>}' containment reference list.
  192 + * <!-- begin-user-doc -->
  193 + * <!-- end-user-doc -->
  194 + * @see #getKinds()
  195 + * @generated
  196 + * @ordered
  197 + */
  198 + protected EList<Kind> kinds;
  199 +
  200 + /**
189 201 * The cached value of the '{@link #getAttributeTypes() <em>Attribute Types</em>}' containment reference list.
190 202 * <!-- begin-user-doc -->
191 203 * <!-- end-user-doc -->
@@ -360,6 +372,18 @@ public void setName(String newName) {
360 372 * <!-- end-user-doc -->
361 373 * @generated
362 374 */
  375 + public EList<Kind> getKinds() {
  376 + if (kinds == null) {
  377 + kinds = new EObjectContainmentEList<Kind>(Kind.class, this, DataPackage.DATA_CATALOG__KINDS);
  378 + }
  379 + return kinds;
  380 + }
  381 +
  382 + /**
  383 + * <!-- begin-user-doc -->
  384 + * <!-- end-user-doc -->
  385 + * @generated
  386 + */
363 387 public EList<AttributeType> getAttributeTypes() {
364 388 if (attributeTypes == null) {
365 389 attributeTypes = new EObjectContainmentEList<AttributeType>(AttributeType.class, this, DataPackage.DATA_CATALOG__ATTRIBUTE_TYPES);
@@ -381,6 +405,8 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID,
381 405 return ((InternalEList<?>)getMixins()).basicRemove(otherEnd, msgs);
382 406 case DataPackage.DATA_CATALOG__TERMS:
383 407 return ((InternalEList<?>)getTerms()).basicRemove(otherEnd, msgs);
  408 + case DataPackage.DATA_CATALOG__KINDS:
  409 + return ((InternalEList<?>)getKinds()).basicRemove(otherEnd, msgs);
384 410 case DataPackage.DATA_CATALOG__ATTRIBUTE_TYPES:
385 411 return ((InternalEList<?>)getAttributeTypes()).basicRemove(otherEnd, msgs);
386 412 }
@@ -411,6 +437,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) {
411 437 return getMixins();
412 438 case DataPackage.DATA_CATALOG__TERMS:
413 439 return getTerms();
  440 + case DataPackage.DATA_CATALOG__KINDS:
  441 + return getKinds();
414 442 case DataPackage.DATA_CATALOG__ATTRIBUTE_TYPES:
415 443 return getAttributeTypes();
416 444 }
@@ -453,6 +481,10 @@ public void eSet(int featureID, Object newValue) {
453 481 getTerms().clear();
454 482 getTerms().addAll((Collection<? extends Term>)newValue);
455 483 return;
  484 + case DataPackage.DATA_CATALOG__KINDS:
  485 + getKinds().clear();
  486 + getKinds().addAll((Collection<? extends Kind>)newValue);
  487 + return;
456 488 case DataPackage.DATA_CATALOG__ATTRIBUTE_TYPES:
457 489 getAttributeTypes().clear();
458 490 getAttributeTypes().addAll((Collection<? extends AttributeType>)newValue);
@@ -493,6 +525,9 @@ public void eUnset(int featureID) {
493 525 case DataPackage.DATA_CATALOG__TERMS:
494 526 getTerms().clear();
495 527 return;
  528 + case DataPackage.DATA_CATALOG__KINDS:
  529 + getKinds().clear();
  530 + return;
496 531 case DataPackage.DATA_CATALOG__ATTRIBUTE_TYPES:
497 532 getAttributeTypes().clear();
498 533 return;
@@ -524,6 +559,8 @@ public boolean eIsSet(int featureID) {
524 559 return mixins != null && !mixins.isEmpty();
525 560 case DataPackage.DATA_CATALOG__TERMS:
526 561 return terms != null && !terms.isEmpty();
  562 + case DataPackage.DATA_CATALOG__KINDS:
  563 + return kinds != null && !kinds.isEmpty();
527 564 case DataPackage.DATA_CATALOG__ATTRIBUTE_TYPES:
528 565 return attributeTypes != null && !attributeTypes.isEmpty();
529 566 }
11 data/src/main/java/org/soluvas/data/impl/DataFactoryImpl.java
@@ -86,6 +86,7 @@ public EObject create(EClass eClass) {
86 86 case DataPackage.FREE_VOCAB: return (EObject)createFreeVocab();
87 87 case DataPackage.DATA_CATALOG: return (EObject)createDataCatalog();
88 88 case DataPackage.TERM_MANAGER: return (EObject)createTermManager();
  89 + case DataPackage.KIND: return (EObject)createKind();
89 90 default:
90 91 throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
91 92 }
@@ -294,6 +295,16 @@ public TermManager createTermManager() {
294 295 * <!-- end-user-doc -->
295 296 * @generated
296 297 */
  298 + public Kind createKind() {
  299 + KindImpl kind = new KindImpl();
  300 + return kind;
  301 + }
  302 +
  303 + /**
  304 + * <!-- begin-user-doc -->
  305 + * <!-- end-user-doc -->
  306 + * @generated
  307 + */
297 308 public AttributeSemantic createAttributeSemanticFromString(EDataType eDataType, String initialValue) {
298 309 AttributeSemantic result = AttributeSemantic.get(initialValue);
299 310 if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
85 data/src/main/java/org/soluvas/data/impl/DataPackageImpl.java
@@ -24,6 +24,7 @@
24 24 import org.soluvas.data.DataFactory;
25 25 import org.soluvas.data.DataPackage;
26 26 import org.soluvas.data.FreeVocab;
  27 +import org.soluvas.data.Kind;
27 28 import org.soluvas.data.ListVocab;
28 29 import org.soluvas.data.MeasureValue;
29 30 import org.soluvas.data.Mixin;
@@ -164,6 +165,13 @@
164 165 * <!-- end-user-doc -->
165 166 * @generated
166 167 */
  168 + private EClass kindEClass = null;
  169 +
  170 + /**
  171 + * <!-- begin-user-doc -->
  172 + * <!-- end-user-doc -->
  173 + * @generated
  174 + */
167 175 private EEnum attributeSemanticEEnum = null;
168 176
169 177 /**
@@ -320,6 +328,24 @@ public EAttribute getAttributeType_DataTypeName() {
320 328 * <!-- end-user-doc -->
321 329 * @generated
322 330 */
  331 + public EAttribute getAttributeType_KindNsPrefix() {
  332 + return (EAttribute)attributeTypeEClass.getEStructuralFeatures().get(4);
  333 + }
  334 +
  335 + /**
  336 + * <!-- begin-user-doc -->
  337 + * <!-- end-user-doc -->
  338 + * @generated
  339 + */
  340 + public EAttribute getAttributeType_KindName() {
  341 + return (EAttribute)attributeTypeEClass.getEStructuralFeatures().get(5);
  342 + }
  343 +
  344 + /**
  345 + * <!-- begin-user-doc -->
  346 + * <!-- end-user-doc -->
  347 + * @generated
  348 + */
323 349 @Override
324 350 public EClass getValue() {
325 351 return valueEClass;
@@ -440,6 +466,15 @@ public EReference getMixin_AttributeTypes() {
440 466 * <!-- end-user-doc -->
441 467 * @generated
442 468 */
  469 + public EAttribute getMixin_DisplayName() {
  470 + return (EAttribute)mixinEClass.getEStructuralFeatures().get(1);
  471 + }
  472 +
  473 + /**
  474 + * <!-- begin-user-doc -->
  475 + * <!-- end-user-doc -->
  476 + * @generated
  477 + */
443 478 @Override
444 479 public EClass getRangeValue() {
445 480 return rangeValueEClass;
@@ -670,9 +705,18 @@ public EReference getDataCatalog_Terms() {
670 705 * <!-- end-user-doc -->
671 706 * @generated
672 707 */
  708 + public EReference getDataCatalog_Kinds() {
  709 + return (EReference)dataCatalogEClass.getEStructuralFeatures().get(3);
  710 + }
  711 +
  712 + /**
  713 + * <!-- begin-user-doc -->
  714 + * <!-- end-user-doc -->
  715 + * @generated
  716 + */
673 717 @Override
674 718 public EReference getDataCatalog_AttributeTypes() {
675   - return (EReference)dataCatalogEClass.getEStructuralFeatures().get(3);
  719 + return (EReference)dataCatalogEClass.getEStructuralFeatures().get(4);
676 720 }
677 721
678 722 /**
@@ -700,6 +744,15 @@ public EReference getTermManager_DataCatalog() {
700 744 * <!-- end-user-doc -->
701 745 * @generated
702 746 */
  747 + public EClass getKind() {
  748 + return kindEClass;
  749 + }
  750 +
  751 + /**
  752 + * <!-- begin-user-doc -->
  753 + * <!-- end-user-doc -->
  754 + * @generated
  755 + */
703 756 @Override
704 757 public EEnum getAttributeSemantic() {
705 758 return attributeSemanticEEnum;
@@ -789,6 +842,8 @@ public void createPackageContents() {
789 842 createEAttribute(attributeTypeEClass, ATTRIBUTE_TYPE__MIN_VALUES);
790 843 createEAttribute(attributeTypeEClass, ATTRIBUTE_TYPE__MAX_VALUES);
791 844 createEAttribute(attributeTypeEClass, ATTRIBUTE_TYPE__DATA_TYPE_NAME);
  845 + createEAttribute(attributeTypeEClass, ATTRIBUTE_TYPE__KIND_NS_PREFIX);
  846 + createEAttribute(attributeTypeEClass, ATTRIBUTE_TYPE__KIND_NAME);
792 847
793 848 valueEClass = createEClass(VALUE);
794 849 createEAttribute(valueEClass, VALUE__SEMANTIC);
@@ -806,6 +861,7 @@ public void createPackageContents() {
806 861
807 862 mixinEClass = createEClass(MIXIN);
808 863 createEReference(mixinEClass, MIXIN__ATTRIBUTE_TYPES);
  864 + createEAttribute(mixinEClass, MIXIN__DISPLAY_NAME);
809 865
810 866 rangeValueEClass = createEClass(RANGE_VALUE);
811 867 createEAttribute(rangeValueEClass, RANGE_VALUE__START_VALUE);
@@ -838,11 +894,14 @@ public void createPackageContents() {
838 894 createEReference(dataCatalogEClass, DATA_CATALOG__VOCABS);
839 895 createEReference(dataCatalogEClass, DATA_CATALOG__MIXINS);
840 896 createEReference(dataCatalogEClass, DATA_CATALOG__TERMS);
  897 + createEReference(dataCatalogEClass, DATA_CATALOG__KINDS);
841 898 createEReference(dataCatalogEClass, DATA_CATALOG__ATTRIBUTE_TYPES);
842 899
843 900 termManagerEClass = createEClass(TERM_MANAGER);
844 901 createEReference(termManagerEClass, TERM_MANAGER__DATA_CATALOG);
845 902
  903 + kindEClass = createEClass(KIND);
  904 +
846 905 // Create enums
847 906 attributeSemanticEEnum = createEEnum(ATTRIBUTE_SEMANTIC);
848 907
@@ -959,6 +1018,10 @@ public void initializePackageContents() {
959 1018 dataCatalogEClass.getESuperTypes().add(theCommonsPackage.getBundleAware());
960 1019 dataCatalogEClass.getESuperTypes().add(theCommonsPackage.getResourceAware());
961 1020 dataCatalogEClass.getESuperTypes().add(theCommonsPackage.getNameContainer());
  1021 + kindEClass.getESuperTypes().add(theCommonsPackage.getNsPrefixable());
  1022 + kindEClass.getESuperTypes().add(theCommonsPackage.getBundleAware());
  1023 + kindEClass.getESuperTypes().add(theCommonsPackage.getNameContainer());
  1024 + kindEClass.getESuperTypes().add(theCommonsPackage.getResourceAware());
962 1025
963 1026 // Initialize classes and features; add operations and parameters
964 1027 initEClass(attributeTypeEClass, AttributeType.class, "AttributeType", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -966,6 +1029,8 @@ public void initializePackageContents() {
966 1029 initEAttribute(getAttributeType_MinValues(), theEcorePackage.getELong(), "minValues", null, 0, 1, AttributeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
967 1030 initEAttribute(getAttributeType_MaxValues(), theEcorePackage.getELong(), "maxValues", null, 0, 1, AttributeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
968 1031 initEAttribute(getAttributeType_DataTypeName(), ecorePackage.getEString(), "dataTypeName", null, 0, 1, AttributeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
  1032 + initEAttribute(getAttributeType_KindNsPrefix(), theEcorePackage.getEString(), "kindNsPrefix", null, 0, 1, AttributeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
  1033 + initEAttribute(getAttributeType_KindName(), theEcorePackage.getEString(), "kindName", null, 0, 1, AttributeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
969 1034
970 1035 EOperation op = addEOperation(attributeTypeEClass, this.getValue(), "valueOf", 0, 1, IS_UNIQUE, IS_ORDERED);
971 1036 addEParameter(op, theEcorePackage.getEString(), "stringValue", 0, 1, IS_UNIQUE, IS_ORDERED);
@@ -1007,6 +1072,7 @@ public void initializePackageContents() {
1007 1072
1008 1073 initEClass(mixinEClass, Mixin.class, "Mixin", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
1009 1074 initEReference(getMixin_AttributeTypes(), this.getAttributeType(), null, "attributeTypes", null, 0, -1, Mixin.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
  1075 + initEAttribute(getMixin_DisplayName(), theEcorePackage.getEString(), "displayName", null, 0, 1, Mixin.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1010 1076
1011 1077 initEClass(rangeValueEClass, RangeValue.class, "RangeValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
1012 1078 g1 = createEGenericType(rangeValueEClass_T);
@@ -1041,6 +1107,7 @@ public void initializePackageContents() {
1041 1107 initEReference(getDataCatalog_Vocabs(), this.getVocab(), null, "vocabs", null, 0, -1, DataCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1042 1108 initEReference(getDataCatalog_Mixins(), this.getMixin(), null, "mixins", null, 0, -1, DataCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1043 1109 initEReference(getDataCatalog_Terms(), this.getTerm(), null, "terms", null, 0, -1, DataCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
  1110 + initEReference(getDataCatalog_Kinds(), this.getKind(), null, "kinds", null, 0, -1, DataCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1044 1111 initEReference(getDataCatalog_AttributeTypes(), this.getAttributeType(), null, "attributeTypes", null, 0, -1, DataCatalog.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1045 1112
1046 1113 initEClass(termManagerEClass, TermManager.class, "TermManager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -1062,6 +1129,8 @@ public void initializePackageContents() {
1062 1129 g1.getETypeArguments().add(g2);
1063 1130 initEOperation(op, g1);
1064 1131
  1132 + initEClass(kindEClass, Kind.class, "Kind", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
  1133 +
1065 1134 // Initialize enums and add enum literals
1066 1135 initEEnum(attributeSemanticEEnum, AttributeSemantic.class, "AttributeSemantic");
1067 1136 addEEnumLiteral(attributeSemanticEEnum, AttributeSemantic.EQUAL);
@@ -1228,10 +1297,22 @@ protected void createGenModelAnnotations() {
1228 1297 "documentation", "List of terms in a Vocabulary or if the Term is nested (tree vocabulary)."
1229 1298 });
1230 1299 addAnnotation
  1300 + (getDataCatalog_AttributeTypes(),
  1301 + source,
  1302 + new String[] {
  1303 + "documentation", "TEMPORARY : WILL BE REPLACED BY kinds"
  1304 + });
  1305 + addAnnotation
1231 1306 (termManagerEClass.getEOperations().get(1),
1232 1307 source,
1233 1308 new String[] {
1234 1309 "documentation", "List all terms partitioned by attribute type ({nsPrefix}_{name})."
  1310 + });
  1311 + addAnnotation
  1312 + (kindEClass,
  1313 + source,
  1314 + new String[] {
  1315 + "documentation", "1. Kind (Attribute Type / Vocab) is like an EMF DataType or Enum.\nA Kind is always type-agnostic, but a default input method & unit can be hinted by the attribute (see below).\nA Kind is always cardinality agnostic.\nFor example, Length kind is hinted as \"measure\" with \"cm\" unit, however all the attribute values below are valid:\n1. 9 cm (just like the hint)\n2. 10 km (different unit)\n3. 9-12 cm (use unit like the hint, but RangeValue instead)\n4. 5-6 kg (different unit and use RangeValue)\n5. \"cukup panjang untuk orang dewasa\" (StringValue)\n6. base_very_long (TermValue from base nsPrefix)\n7. tuneeca_half_a_mile (TermValue from tuneeca nsPrefix)\nIn addition, all of the above can have multiple cardinality or no value."
1235 1316 });
1236 1317 }
1237 1318
@@ -1272,7 +1353,7 @@ protected void createExtendedMetaDataAnnotations() {
1272 1353 source,
1273 1354 new String[] {
1274 1355 "name", "DataCatalog"
1275   - });
  1356 + });
1276 1357 }
1277 1358
1278 1359 public static DataPackage getInstance() {
512 data/src/main/java/org/soluvas/data/impl/KindImpl.java
... ... @@ -0,0 +1,512 @@
  1 +/**
  2 + */
  3 +package org.soluvas.data.impl;
  4 +
  5 +import org.eclipse.emf.common.notify.Notification;
  6 +
  7 +import org.eclipse.emf.ecore.EClass;
  8 +
  9 +import org.eclipse.emf.ecore.impl.ENotificationImpl;
  10 +import org.eclipse.emf.ecore.impl.EObjectImpl;
  11 +
  12 +import org.osgi.framework.Bundle;
  13 +
  14 +import org.soluvas.commons.BundleAware;
  15 +import org.soluvas.commons.CommonsPackage;
  16 +import org.soluvas.commons.NameContainer;
  17 +import org.soluvas.commons.Nameable;
  18 +import org.soluvas.commons.ResourceAware;
  19 +import org.soluvas.commons.ResourceType;
  20 +
  21 +import org.soluvas.data.DataPackage;
  22 +import org.soluvas.data.Kind;
  23 +
  24 +/**
  25 + * <!-- begin-user-doc -->
  26 + * An implementation of the model object '<em><b>Kind</b></em>'.
  27 + * <!-- end-user-doc -->
  28 + * <p>
  29 + * The following features are implemented:
  30 + * <ul>
  31 + * <li>{@link org.soluvas.data.impl.KindImpl#getNsPrefix <em>Ns Prefix</em>}</li>
  32 + * <li>{@link org.soluvas.data.impl.KindImpl#getBundle <em>Bundle</em>}</li>
  33 + * <li>{@link org.soluvas.data.impl.KindImpl#getName <em>Name</em>}</li>
  34 + * <li>{@link org.soluvas.data.impl.KindImpl#getResourceType <em>Resource Type</em>}</li>
  35 + * <li>{@link org.soluvas.data.impl.KindImpl#getResourceUri <em>Resource Uri</em>}</li>
  36 + * <li>{@link org.soluvas.data.impl.KindImpl#getResourceName <em>Resource Name</em>}</li>
  37 + * </ul>
  38 + * </p>
  39 + *
  40 + * @generated
  41 + */
  42 +public class KindImpl extends EObjectImpl implements Kind {
  43 + /**
  44 + * The default value of the '{@link #getNsPrefix() <em>Ns Prefix</em>}' attribute.
  45 + * <!-- begin-user-doc -->
  46 + * <!-- end-user-doc -->
  47 + * @see #getNsPrefix()
  48 + * @generated
  49 + * @ordered
  50 + */
  51 + protected static final String NS_PREFIX_EDEFAULT = null;
  52 +
  53 + /**
  54 + * The cached value of the '{@link #getNsPrefix() <em>Ns Prefix</em>}' attribute.
  55 + * <!-- begin-user-doc -->
  56 + * <!-- end-user-doc -->
  57 + * @see #getNsPrefix()
  58 + * @generated
  59 + * @ordered
  60 + */
  61 + protected String nsPrefix = NS_PREFIX_EDEFAULT;
  62 +
  63 + /**
  64 + * The default value of the '{@link #getBundle() <em>Bundle</em>}' attribute.
  65 + * <!-- begin-user-doc -->
  66 + * <!-- end-user-doc -->
  67 + * @see #getBundle()
  68 + * @generated
  69 + * @ordered
  70 + */
  71 + protected static final Bundle BUNDLE_EDEFAULT = null;
  72 +
  73 + /**
  74 + * The cached value of the '{@link #getBundle() <em>Bundle</em>}' attribute.
  75 + * <!-- begin-user-doc -->
  76 + * <!-- end-user-doc -->
  77 + * @see #getBundle()
  78 + * @generated
  79 + * @ordered
  80 + */
  81 + protected Bundle bundle = BUNDLE_EDEFAULT;
  82 +
  83 + /**
  84 + * The default value of the '{@link #getName() <em>Name</em>}' attribute.
  85 + * <!-- begin-user-doc -->
  86 + * <!-- end-user-doc -->
  87 + * @see #getName()
  88 + * @generated
  89 + * @ordered
  90 + */
  91 + protected static final String NAME_EDEFAULT = null;
  92 +
  93 + /**
  94 + * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
  95 + * <!-- begin-user-doc -->
  96 + * <!-- end-user-doc -->
  97 + * @see #getName()
  98 + * @generated
  99 + * @ordered
  100 + */
  101 + protected String name = NAME_EDEFAULT;
  102 +
  103 + /**
  104 + * The default value of the '{@link #getResourceType() <em>Resource Type</em>}' attribute.
  105 + * <!-- begin-user-doc -->
  106 + * <!-- end-user-doc -->
  107 + * @see #getResourceType()
  108 + * @generated
  109 + * @ordered
  110 + */
  111 + protected static final ResourceType RESOURCE_TYPE_EDEFAULT = ResourceType.BUNDLE;
  112 +
  113 + /**
  114 + * The cached value of the '{@link #getResourceType() <em>Resource Type</em>}' attribute.
  115 + * <!-- begin-user-doc -->
  116 + * <!-- end-user-doc -->
  117 + * @see #getResourceType()
  118 + * @generated
  119 + * @ordered
  120 + */
  121 + protected ResourceType resourceType = RESOURCE_TYPE_EDEFAULT;
  122 +
  123 + /**
  124 + * The default value of the '{@link #getResourceUri() <em>Resource Uri</em>}' attribute.
  125 + * <!-- begin-user-doc -->
  126 + * <!-- end-user-doc -->
  127 + * @see #getResourceUri()
  128 + * @generated
  129 + * @ordered
  130 + */
  131 + protected static final String RESOURCE_URI_EDEFAULT = null;
  132 +
  133 + /**
  134 + * The cached value of the '{@link #getResourceUri() <em>Resource Uri</em>}' attribute.
  135 + * <!-- begin-user-doc -->
  136 + * <!-- end-user-doc -->
  137 + * @see #getResourceUri()
  138 + * @generated
  139 + * @ordered
  140 + */
  141 + protected String resourceUri = RESOURCE_URI_EDEFAULT;
  142 +
  143 + /**
  144 + * The default value of the '{@link #getResourceName() <em>Resource Name</em>}' attribute.
  145 + * <!-- begin-user-doc -->
  146 + * <!-- end-user-doc -->
  147 + * @see #getResourceName()
  148 + * @generated
  149 + * @ordered
  150 + */
  151 + protected static final String RESOURCE_NAME_EDEFAULT = null;
  152 +
  153 + /**
  154 + * The cached value of the '{@link #getResourceName() <em>Resource Name</em>}' attribute.
  155 + * <!-- begin-user-doc -->
  156 + * <!-- end-user-doc -->
  157 + * @see #getResourceName()
  158 + * @generated
  159 + * @ordered
  160 + */
  161 + protected String resourceName = RESOURCE_NAME_EDEFAULT;
  162 +
  163 + /**
  164 + * <!-- begin-user-doc -->
  165 + * <!-- end-user-doc -->
  166 + * @generated
  167 + */
  168 + public KindImpl() {
  169 + super();
  170 + }
  171 +
  172 + /**
  173 + * <!-- begin-user-doc -->
  174 + * <!-- end-user-doc -->
  175 + * @generated
  176 + */
  177 + @Override
  178 + protected EClass eStaticClass() {
  179 + return DataPackage.Literals.KIND;
  180 + }
  181 +
  182 + /**
  183 + * <!-- begin-user-doc -->
  184 + * <!-- end-user-doc -->
  185 + * @generated
  186 + */
  187 + public String getNsPrefix() {
  188 + return nsPrefix;
  189 + }
  190 +
  191 + /**
  192 + * <!-- begin-user-doc -->
  193 + * <!-- end-user-doc -->
  194 + * @generated
  195 + */
  196 + public void setNsPrefix(String newNsPrefix) {
  197 + String oldNsPrefix = nsPrefix;
  198 + nsPrefix = newNsPrefix;
  199 + if (eNotificationRequired())
  200 + eNotify(new ENotificationImpl(this, Notification.SET, DataPackage.KIND__NS_PREFIX, oldNsPrefix, nsPrefix));
  201 + }
  202 +
  203 + /**
  204 + * <!-- begin-user-doc -->
  205 + * <!-- end-user-doc -->
  206 + * @generated
  207 + */
  208 + public Bundle getBundle() {
  209 + return bundle;
  210 + }
  211 +
  212 + /**
  213 + * <!-- begin-user-doc -->
  214 + * <!-- end-user-doc -->
  215 + * @generated
  216 + */
  217 + public void setBundle(Bundle newBundle) {
  218 + Bundle oldBundle = bundle;
  219 + bundle = newBundle;
  220 + if (eNotificationRequired())
  221 + eNotify(new ENotificationImpl(this, Notification.SET, DataPackage.KIND__BUNDLE, oldBundle, bundle));
  222 + }
  223 +
  224 + /**
  225 + * <!-- begin-user-doc -->
  226 + * <!-- end-user-doc -->
  227 + * @generated
  228 + */
  229 + public String getName() {
  230 + return name;
  231 + }
  232 +
  233 + /**
  234 + * <!-- begin-user-doc -->
  235 + * <!-- end-user-doc -->
  236 + * @generated
  237 + */
  238 + public void setName(String newName) {
  239 + String oldName = name;
  240 + name = newName;
  241 + if (eNotificationRequired())
  242 + eNotify(new ENotificationImpl(this, Notification.SET, DataPackage.KIND__NAME, oldName, name));
  243 + }
  244 +
  245 + /**
  246 + * <!-- begin-user-doc -->
  247 + * <!-- end-user-doc -->
  248 + * @generated
  249 + */
  250 + public ResourceType getResourceType() {
  251 + return resourceType;
  252 + }
  253 +
  254 + /**
  255 + * <!-- begin-user-doc -->
  256 + * <!-- end-user-doc -->
  257 + * @generated
  258 + */
  259 + public void setResourceType(ResourceType newResourceType) {
  260 + ResourceType oldResourceType = resourceType;
  261 + resourceType = newResourceType == null ? RESOURCE_TYPE_EDEFAULT : newResourceType;
  262 + if (eNotificationRequired())
  263 + eNotify(new ENotificationImpl(this, Notification.SET, DataPackage.KIND__RESOURCE_TYPE, oldResourceType, resourceType));
  264 + }
  265 +
  266 + /**
  267 + * <!-- begin-user-doc -->
  268 + * <!-- end-user-doc -->
  269 + * @generated
  270 + */
  271 + public String getResourceUri() {
  272 + return resourceUri;
  273 + }
  274 +
  275 + /**
  276 + * <!-- begin-user-doc -->
  277 + * <!-- end-user-doc -->
  278 + * @generated
  279 + */
  280 + public void setResourceUri(String newResourceUri) {
  281 + String oldResourceUri = resourceUri;
  282 + resourceUri = newResourceUri;
  283 + if (eNotificationRequired())
  284 + eNotify(new ENotificationImpl(this, Notification.SET, DataPackage.KIND__RESOURCE_URI, oldResourceUri, resourceUri));
  285 + }
  286 +
  287 + /**
  288 + * <!-- begin-user-doc -->
  289 + * <!-- end-user-doc -->
  290 + * @generated
  291 + */
  292 + public String getResourceName() {
  293 + return resourceName;
  294 + }
  295 +
  296 + /**
  297 + * <!-- begin-user-doc -->
  298 + * <!-- end-user-doc -->
  299 + * @generated
  300 + */
  301 + public void setResourceName(String newResourceName) {
  302 + String oldResourceName = resourceName;
  303 + resourceName = newResourceName;
  304 + if (eNotificationRequired())
  305 + eNotify(new ENotificationImpl(this, Notification.SET, DataPackage.KIND__RESOURCE_NAME, oldResourceName, resourceName));
  306 + }
  307 +
  308 + /**
  309 + * <!-- begin-user-doc -->
  310 + * <!-- end-user-doc -->
  311 + * @generated
  312 + */
  313 + @Override
  314 + public Object eGet(int featureID, boolean resolve, boolean coreType) {
  315 + switch (featureID) {
  316 + case DataPackage.KIND__NS_PREFIX:
  317 + return getNsPrefix();
  318 + case DataPackage.KIND__BUNDLE:
  319 + return getBundle();
  320 + case DataPackage.KIND__NAME:
  321 + return getName();
  322 + case DataPackage.KIND__RESOURCE_TYPE:
  323 + return getResourceType();
  324 + case DataPackage.KIND__RESOURCE_URI:
  325 + return getResourceUri();
  326 + case DataPackage.KIND__RESOURCE_NAME:
  327 + return getResourceName();
  328 + }
  329 + return super.eGet(featureID, resolve, coreType);
  330 + }
  331 +
  332 + /**
  333 + * <!-- begin-user-doc -->
  334 + * <!-- end-user-doc -->
  335 + * @generated
  336 + */
  337 + @Override
  338 + public void eSet(int featureID, Object newValue) {
  339 + switch (featureID) {
  340 + case DataPackage.KIND__NS_PREFIX:
  341 + setNsPrefix((String)newValue);
  342 + return;
  343 + case DataPackage.KIND__BUNDLE:
  344 + setBundle((Bundle)newValue);
  345 + return;
  346 + case DataPackage.KIND__NAME:
  347 + setName((String)newValue);
  348 + return;
  349 + case DataPackage.KIND__RESOURCE_TYPE:
  350 + setResourceType((ResourceType)newValue);
  351 + return;
  352 + case DataPackage.KIND__RESOURCE_URI:
  353 + setResourceUri((String)newValue);
  354 + return;
  355 + case DataPackage.KIND__RESOURCE_NAME:
  356 + setResourceName((String)newValue);
  357 + return;
  358 + }
  359 + super.eSet(featureID, newValue);
  360 + }
  361 +
  362 + /**
  363 + * <!-- begin-user-doc -->
  364 + * <!-- end-user-doc -->
  365 + * @generated
  366 + */
  367 + @Override
  368 + public void eUnset(int featureID) {
  369 + switch (featureID) {
  370 + case DataPackage.KIND__NS_PREFIX:
  371 + setNsPrefix(NS_PREFIX_EDEFAULT);
  372 + return;
  373 + case DataPackage.KIND__BUNDLE:
  374 + setBundle(BUNDLE_EDEFAULT);
  375 + return;
  376 + case DataPackage.KIND__NAME:
  377 + setName(NAME_EDEFAULT);
  378 + return;
  379 + case DataPackage.KIND__RESOURCE_TYPE:
  380 + setResourceType(RESOURCE_TYPE_EDEFAULT);
  381 + return;
  382 + case DataPackage.KIND__RESOURCE_URI:
  383 + setResourceUri(RESOURCE_URI_EDEFAULT);
  384 + return;
  385 + case DataPackage.KIND__RESOURCE_NAME:
  386 + setResourceName(RESOURCE_NAME_EDEFAULT);
  387 + return;
  388 + }
  389 + super.eUnset(featureID);
  390 + }
  391 +
  392 + /**
  393 + * <!-- begin-user-doc -->
  394 + * <!-- end-user-doc -->
  395 + * @generated
  396 + */
  397 + @Override
  398 + public boolean eIsSet(int featureID) {
  399 + switch (featureID) {
  400 + case DataPackage.KIND__NS_PREFIX:
  401 + return NS_PREFIX_EDEFAULT == null ? nsPrefix != null : !NS_PREFIX_EDEFAULT.equals(nsPrefix);
  402 + case DataPackage.KIND__BUNDLE:
  403 + return BUNDLE_EDEFAULT == null ? bundle != null : !BUNDLE_EDEFAULT.equals(bundle);
  404 + case DataPackage.KIND__NAME:
  405 + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
  406 + case DataPackage.KIND__RESOURCE_TYPE:
  407 + return resourceType != RESOURCE_TYPE_EDEFAULT;
  408 + case DataPackage.KIND__RESOURCE_URI:
  409 + return RESOURCE_URI_EDEFAULT == null ? resourceUri != null : !RESOURCE_URI_EDEFAULT.equals(resourceUri);
  410 + case DataPackage.KIND__RESOURCE_NAME:
  411 + return RESOURCE_NAME_EDEFAULT == null ? resourceName != null : !RESOURCE_NAME_EDEFAULT.equals(resourceName);
  412 + }
  413 + return super.eIsSet(featureID);
  414 + }
  415 +
  416 + /**
  417 + * <!-- begin-user-doc -->
  418 + * <!-- end-user-doc -->
  419 + * @generated
  420 + */
  421 + @Override
  422 + public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
  423 + if (baseClass == BundleAware.class) {
  424 + switch (derivedFeatureID) {
  425 + case DataPackage.KIND__BUNDLE: return CommonsPackage.BUNDLE_AWARE__BUNDLE;
  426 + default: return -1;
  427 + }
  428 + }
  429 + if (baseClass == Nameable.class) {
  430 + switch (derivedFeatureID) {
  431 + default: return -1;
  432 + }
  433 + }
  434 + if (baseClass == NameContainer.class) {
  435 + switch (derivedFeatureID) {
  436 + case DataPackage.KIND__NAME: return CommonsPackage.NAME_CONTAINER__NAME;
  437 + default: return -1;
  438 + }
  439 + }
  440 + if (baseClass == ResourceAware.class) {
  441 + switch (derivedFeatureID) {
  442 + case DataPackage.KIND__RESOURCE_TYPE: return CommonsPackage.RESOURCE_AWARE__RESOURCE_TYPE;
  443 + case DataPackage.KIND__RESOURCE_URI: return CommonsPackage.RESOURCE_AWARE__RESOURCE_URI;
  444 + case DataPackage.KIND__RESOURCE_NAME: return CommonsPackage.RESOURCE_AWARE__RESOURCE_NAME;
  445 + default: return -1;
  446 + }
  447 + }
  448 + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
  449 + }
  450 +
  451 + /**
  452 + * <!-- begin-user-doc -->
  453 + * <!-- end-user-doc -->
  454 + * @generated
  455 + */
  456 + @Override
  457 + public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
  458 + if (baseClass == BundleAware.class) {
  459 + switch (baseFeatureID) {
  460 + case CommonsPackage.BUNDLE_AWARE__BUNDLE: return DataPackage.KIND__BUNDLE;
  461 + default: return -1;
  462 + }
  463 + }
  464 + if (baseClass == Nameable.class) {
  465 + switch (baseFeatureID) {
  466 + default: return -1;
  467 + }
  468 + }
  469 + if (baseClass == NameContainer.class) {
  470 + switch (baseFeatureID) {
  471 + case CommonsPackage.NAME_CONTAINER__NAME: return DataPackage.KIND__NAME;
  472 + default: return -1;
  473 + }
  474 + }
  475 + if (baseClass == ResourceAware.class) {
  476 + switch (baseFeatureID) {
  477 + case CommonsPackage.RESOURCE_AWARE__RESOURCE_TYPE: return DataPackage.KIND__RESOURCE_TYPE;
  478 + case CommonsPackage.RESOURCE_AWARE__RESOURCE_URI: return DataPackage.KIND__RESOURCE_URI;
  479 + case CommonsPackage.RESOURCE_AWARE__RESOURCE_NAME: return DataPackage.KIND__RESOURCE_NAME;
  480 + default: return -1;
  481 + }
  482 + }
  483 + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
  484 + }
  485 +
  486 + /**
  487 + * <!-- begin-user-doc -->
  488 + * <!-- end-user-doc -->
  489 + * @generated
  490 + */
  491 + @Override
  492 + public String toString() {
  493 + if (eIsProxy()) return super.toString();
  494 +
  495 + StringBuffer result = new StringBuffer(super.toString());
  496 + result.append(" (nsPrefix: ");
  497 + result.append(nsPrefix);
  498 + result.append(", bundle: ");
  499 + result.append(bundle);
  500 + result.append(", name: ");
  501 + result.append(name);
  502 + result.append(", resourceType: ");
  503 + result.append(resourceType);
  504 + result.append(", resourceUri: ");
  505 + result.append(resourceUri);
  506 + result.append(", resourceName: ");
  507 + result.append(resourceName);
  508 + result.append(')');
  509 + return result.toString();
  510 + }
  511 +
  512 +} //KindImpl
54 data/src/main/java/org/soluvas/data/impl/MixinImpl.java
@@ -38,6 +38,7 @@
38 38 * <li>{@link org.soluvas.data.impl.MixinImpl#getNsPrefix <em>Ns Prefix</em>}</li>
39 39 * <li>{@link org.soluvas.data.impl.MixinImpl#getDescription <em>Description</em>}</li>
40