Skip to content

Commit f6c2244

Browse files
Proposed identifier annotations
1 parent 6965d2c commit f6c2244

File tree

8 files changed

+94
-2
lines changed

8 files changed

+94
-2
lines changed

io.opencaesar.oml/src-gen/io/opencaesar/oml/OmlPackage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* @model kind="package"
4747
* annotation="https://tabatkins.github.io/bikeshed/headings Elements='' Literals='' Ontologies='' Vocabularies='' Types='' Features='' Rules='' Axioms='' Descriptions='' Instances='' Assertions='' References=''"
4848
* annotation="https://tabatkins.github.io/bikeshed heading='Abstract-Syntax'"
49-
* annotation="http://www.eclipse.org/emf/2011/Xcore Bikeshed='https://tabatkins.github.io/bikeshed' BikeshedHeadings='https://tabatkins.github.io/bikeshed/headings'"
49+
* annotation="http://www.eclipse.org/emf/2011/Xcore Bikeshed='https://tabatkins.github.io/bikeshed' BikeshedHeadings='https://tabatkins.github.io/bikeshed/headings' Ecore='https://www.eclipse.org/emf/2002/Ecore' OmlEcore='https://opencaesar.io/oml/Ecore'"
5050
* @generated
5151
*/
5252
public interface OmlPackage extends EPackage {

io.opencaesar.oml/src-gen/io/opencaesar/oml/Ontology.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public interface Ontology extends IdentifiedElement {
5555
* @see #setNamespace(String)
5656
* @see io.opencaesar.oml.OmlPackage#getOntology_Namespace()
5757
* @model unique="false" dataType="io.opencaesar.oml.Namespace" required="true"
58+
* annotation="https://opencaesar.io/oml/Ecore identifier='true'"
5859
* @generated
5960
*/
6061
String getNamespace();
@@ -80,6 +81,7 @@ public interface Ontology extends IdentifiedElement {
8081
* @see #setPrefix(String)
8182
* @see io.opencaesar.oml.OmlPackage#getOntology_Prefix()
8283
* @model unique="false" dataType="io.opencaesar.oml.ID" required="true"
84+
* annotation="https://opencaesar.io/oml/Ecore identifier='true'"
8385
* @generated
8486
*/
8587
String getPrefix();

io.opencaesar.oml/src-gen/io/opencaesar/oml/PropertyValueAssertion.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public interface PropertyValueAssertion extends Assertion {
103103
* Gets the property referenced by this assertion
104104
* <!-- end-model-doc -->
105105
* @model kind="operation" unique="false"
106+
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='property'"
106107
* @generated
107108
*/
108109
SemanticProperty getProperty();
@@ -114,6 +115,7 @@ public interface PropertyValueAssertion extends Assertion {
114115
* Gets the value specified by this assertion
115116
* <!-- end-model-doc -->
116117
* @model kind="operation" unique="false"
118+
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='value'"
117119
* @generated
118120
*/
119121
Element getValue();

io.opencaesar.oml/src-gen/io/opencaesar/oml/Relation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public interface Relation extends Feature {
9494
* Gets the relation entity of this relation
9595
* <!-- end-model-doc -->
9696
* @model kind="operation" unique="false"
97+
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='relationEntity'"
9798
* @generated
9899
*/
99100
RelationEntity getRelationEntity();

io.opencaesar.oml/src-gen/io/opencaesar/oml/SemanticProperty.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public interface SemanticProperty extends Property {
4343
* Determines if this property is functional (has a max of one value per instance)
4444
* <!-- end-model-doc -->
4545
* @model kind="operation" unique="false"
46+
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='functional'"
4647
* @generated
4748
*/
4849
boolean isFunctional();
@@ -54,6 +55,7 @@ public interface SemanticProperty extends Property {
5455
* Gets the domain of this property
5556
* <!-- end-model-doc -->
5657
* @model kind="operation" unique="false"
58+
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='domain'"
5759
* @generated
5860
*/
5961
Classifier getDomain();
@@ -65,6 +67,7 @@ public interface SemanticProperty extends Property {
6567
* Gets the range of the property
6668
* <!-- end-model-doc -->
6769
* @model kind="operation" unique="false"
70+
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='range'"
6871
* @generated
6972
*/
7073
Type getRange();

io.opencaesar.oml/src-gen/io/opencaesar/oml/TypeAssertion.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public interface TypeAssertion extends Assertion {
4242
* Gets the type referenced by this assertion
4343
* <!-- end-model-doc -->
4444
* @model kind="operation" unique="false"
45+
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='type'"
4546
* @generated
4647
*/
4748
Entity getType();

io.opencaesar.oml/src-gen/io/opencaesar/oml/impl/OmlPackageImpl.java

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5200,6 +5200,10 @@ public void initializePackageContents() {
52005200
createBikeshedAnnotations();
52015201
// http://www.eclipse.org/emf/2011/Xcore
52025202
createXcoreAnnotations();
5203+
// https://opencaesar.io/oml/Ecore
5204+
createEcoreAnnotations();
5205+
// https://www.eclipse.org/emf/2002/Ecore
5206+
createEcore_1Annotations();
52035207
// http:///org/eclipse/emf/ecore/util/ExtendedMetaData
52045208
createExtendedMetaDataAnnotations();
52055209
}
@@ -5956,7 +5960,83 @@ protected void createXcoreAnnotations() {
59565960
source,
59575961
new String[] {
59585962
"Bikeshed", "https://tabatkins.github.io/bikeshed",
5959-
"BikeshedHeadings", "https://tabatkins.github.io/bikeshed/headings"
5963+
"BikeshedHeadings", "https://tabatkins.github.io/bikeshed/headings",
5964+
"Ecore", "https://www.eclipse.org/emf/2002/Ecore",
5965+
"OmlEcore", "https://opencaesar.io/oml/Ecore"
5966+
});
5967+
}
5968+
5969+
/**
5970+
* Initializes the annotations for <b>https://opencaesar.io/oml/Ecore</b>.
5971+
* <!-- begin-user-doc -->
5972+
* <!-- end-user-doc -->
5973+
* @generated
5974+
*/
5975+
protected void createEcoreAnnotations() {
5976+
String source = "https://opencaesar.io/oml/Ecore";
5977+
addAnnotation
5978+
(getOntology_Namespace(),
5979+
source,
5980+
new String[] {
5981+
"identifier", "true"
5982+
});
5983+
addAnnotation
5984+
(getOntology_Prefix(),
5985+
source,
5986+
new String[] {
5987+
"identifier", "true"
5988+
});
5989+
}
5990+
5991+
/**
5992+
* Initializes the annotations for <b>https://www.eclipse.org/emf/2002/Ecore</b>.
5993+
* <!-- begin-user-doc -->
5994+
* <!-- end-user-doc -->
5995+
* @generated
5996+
*/
5997+
protected void createEcore_1Annotations() {
5998+
String source = "https://www.eclipse.org/emf/2002/Ecore";
5999+
addAnnotation
6000+
(getSemanticProperty__IsFunctional(),
6001+
source,
6002+
new String[] {
6003+
"getterOf", "functional"
6004+
});
6005+
addAnnotation
6006+
(getSemanticProperty__GetDomain(),
6007+
source,
6008+
new String[] {
6009+
"getterOf", "domain"
6010+
});
6011+
addAnnotation
6012+
(getSemanticProperty__GetRange(),
6013+
source,
6014+
new String[] {
6015+
"getterOf", "range"
6016+
});
6017+
addAnnotation
6018+
(getRelation__GetRelationEntity(),
6019+
source,
6020+
new String[] {
6021+
"getterOf", "relationEntity"
6022+
});
6023+
addAnnotation
6024+
(getTypeAssertion__GetType(),
6025+
source,
6026+
new String[] {
6027+
"getterOf", "type"
6028+
});
6029+
addAnnotation
6030+
(getPropertyValueAssertion__GetProperty(),
6031+
source,
6032+
new String[] {
6033+
"getterOf", "property"
6034+
});
6035+
addAnnotation
6036+
(getPropertyValueAssertion__GetValue(),
6037+
source,
6038+
new String[] {
6039+
"getterOf", "value"
59606040
});
59616041
}
59626042

io.opencaesar.oml/src/io/opencaesar/oml/Oml.xcore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import org.eclipse.emf.ecore.EObject
4040
annotation "https://tabatkins.github.io/bikeshed" as Bikeshed
4141
annotation "https://tabatkins.github.io/bikeshed/headings" as BikeshedHeadings
4242
annotation "https://www.eclipse.org/emf/2002/Ecore" as Ecore
43+
annotation "https://opencaesar.io/oml/Ecore" as OmlEcore
4344

4445
/*
4546
* Element is the most general type in the OML metamodel. All objects in an OML model are elements.
@@ -128,10 +129,12 @@ abstract class Ontology extends IdentifiedElement {
128129
/*
129130
* The globally unique namespace of this ontology
130131
*/
132+
@OmlEcore(identifier="true")
131133
Namespace[1] namespace
132134
/*
133135
* The prefix of this ontology's namespace
134136
*/
137+
@OmlEcore(identifier="true")
135138
ID[1] prefix
136139
/*
137140
* Get the namespace's iri

0 commit comments

Comments
 (0)