diff --git a/io.opencaesar.oml/src-gen/io/opencaesar/oml/OmlPackage.java b/io.opencaesar.oml/src-gen/io/opencaesar/oml/OmlPackage.java index a16c9cd5..1bce985d 100644 --- a/io.opencaesar.oml/src-gen/io/opencaesar/oml/OmlPackage.java +++ b/io.opencaesar.oml/src-gen/io/opencaesar/oml/OmlPackage.java @@ -46,7 +46,7 @@ * @model kind="package" * annotation="https://tabatkins.github.io/bikeshed/headings Elements='' Literals='' Ontologies='' Vocabularies='' Types='' Features='' Rules='' Axioms='' Descriptions='' Instances='' Assertions='' References=''" * annotation="https://tabatkins.github.io/bikeshed heading='Abstract-Syntax'" - * annotation="http://www.eclipse.org/emf/2011/Xcore Bikeshed='https://tabatkins.github.io/bikeshed' BikeshedHeadings='https://tabatkins.github.io/bikeshed/headings'" + * 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'" * @generated */ public interface OmlPackage extends EPackage { diff --git a/io.opencaesar.oml/src-gen/io/opencaesar/oml/Ontology.java b/io.opencaesar.oml/src-gen/io/opencaesar/oml/Ontology.java index 70be6dd3..36d2c06b 100644 --- a/io.opencaesar.oml/src-gen/io/opencaesar/oml/Ontology.java +++ b/io.opencaesar.oml/src-gen/io/opencaesar/oml/Ontology.java @@ -55,6 +55,7 @@ public interface Ontology extends IdentifiedElement { * @see #setNamespace(String) * @see io.opencaesar.oml.OmlPackage#getOntology_Namespace() * @model unique="false" dataType="io.opencaesar.oml.Namespace" required="true" + * annotation="https://opencaesar.io/oml/Ecore identifier='true'" * @generated */ String getNamespace(); @@ -80,6 +81,7 @@ public interface Ontology extends IdentifiedElement { * @see #setPrefix(String) * @see io.opencaesar.oml.OmlPackage#getOntology_Prefix() * @model unique="false" dataType="io.opencaesar.oml.ID" required="true" + * annotation="https://opencaesar.io/oml/Ecore identifier='true'" * @generated */ String getPrefix(); diff --git a/io.opencaesar.oml/src-gen/io/opencaesar/oml/PropertyValueAssertion.java b/io.opencaesar.oml/src-gen/io/opencaesar/oml/PropertyValueAssertion.java index 8f1d2908..cd5b08c2 100644 --- a/io.opencaesar.oml/src-gen/io/opencaesar/oml/PropertyValueAssertion.java +++ b/io.opencaesar.oml/src-gen/io/opencaesar/oml/PropertyValueAssertion.java @@ -103,6 +103,7 @@ public interface PropertyValueAssertion extends Assertion { * Gets the property referenced by this assertion * * @model kind="operation" unique="false" + * annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='property'" * @generated */ SemanticProperty getProperty(); @@ -114,6 +115,7 @@ public interface PropertyValueAssertion extends Assertion { * Gets the value specified by this assertion * * @model kind="operation" unique="false" + * annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='value'" * @generated */ Element getValue(); diff --git a/io.opencaesar.oml/src-gen/io/opencaesar/oml/Relation.java b/io.opencaesar.oml/src-gen/io/opencaesar/oml/Relation.java index 1effed25..1beed34b 100644 --- a/io.opencaesar.oml/src-gen/io/opencaesar/oml/Relation.java +++ b/io.opencaesar.oml/src-gen/io/opencaesar/oml/Relation.java @@ -94,6 +94,7 @@ public interface Relation extends Feature { * Gets the relation entity of this relation * * @model kind="operation" unique="false" + * annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='relationEntity'" * @generated */ RelationEntity getRelationEntity(); diff --git a/io.opencaesar.oml/src-gen/io/opencaesar/oml/SemanticProperty.java b/io.opencaesar.oml/src-gen/io/opencaesar/oml/SemanticProperty.java index f6628978..49f1333f 100644 --- a/io.opencaesar.oml/src-gen/io/opencaesar/oml/SemanticProperty.java +++ b/io.opencaesar.oml/src-gen/io/opencaesar/oml/SemanticProperty.java @@ -43,6 +43,7 @@ public interface SemanticProperty extends Property { * Determines if this property is functional (has a max of one value per instance) * * @model kind="operation" unique="false" + * annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='functional'" * @generated */ boolean isFunctional(); @@ -54,6 +55,7 @@ public interface SemanticProperty extends Property { * Gets the domain of this property * * @model kind="operation" unique="false" + * annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='domain'" * @generated */ Classifier getDomain(); @@ -65,6 +67,7 @@ public interface SemanticProperty extends Property { * Gets the range of the property * * @model kind="operation" unique="false" + * annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='range'" * @generated */ Type getRange(); diff --git a/io.opencaesar.oml/src-gen/io/opencaesar/oml/TypeAssertion.java b/io.opencaesar.oml/src-gen/io/opencaesar/oml/TypeAssertion.java index 71ad2517..db183ba3 100644 --- a/io.opencaesar.oml/src-gen/io/opencaesar/oml/TypeAssertion.java +++ b/io.opencaesar.oml/src-gen/io/opencaesar/oml/TypeAssertion.java @@ -42,6 +42,7 @@ public interface TypeAssertion extends Assertion { * Gets the type referenced by this assertion * * @model kind="operation" unique="false" + * annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='type'" * @generated */ Entity getType(); diff --git a/io.opencaesar.oml/src-gen/io/opencaesar/oml/impl/OmlPackageImpl.java b/io.opencaesar.oml/src-gen/io/opencaesar/oml/impl/OmlPackageImpl.java index bd522c72..49a2d677 100644 --- a/io.opencaesar.oml/src-gen/io/opencaesar/oml/impl/OmlPackageImpl.java +++ b/io.opencaesar.oml/src-gen/io/opencaesar/oml/impl/OmlPackageImpl.java @@ -5200,6 +5200,10 @@ public void initializePackageContents() { createBikeshedAnnotations(); // http://www.eclipse.org/emf/2011/Xcore createXcoreAnnotations(); + // https://opencaesar.io/oml/Ecore + createEcoreAnnotations(); + // https://www.eclipse.org/emf/2002/Ecore + createEcore_1Annotations(); // http:///org/eclipse/emf/ecore/util/ExtendedMetaData createExtendedMetaDataAnnotations(); } @@ -5956,7 +5960,83 @@ protected void createXcoreAnnotations() { source, new String[] { "Bikeshed", "https://tabatkins.github.io/bikeshed", - "BikeshedHeadings", "https://tabatkins.github.io/bikeshed/headings" + "BikeshedHeadings", "https://tabatkins.github.io/bikeshed/headings", + "Ecore", "https://www.eclipse.org/emf/2002/Ecore", + "OmlEcore", "https://opencaesar.io/oml/Ecore" + }); + } + + /** + * Initializes the annotations for https://opencaesar.io/oml/Ecore. + * + * + * @generated + */ + protected void createEcoreAnnotations() { + String source = "https://opencaesar.io/oml/Ecore"; + addAnnotation + (getOntology_Namespace(), + source, + new String[] { + "identifier", "true" + }); + addAnnotation + (getOntology_Prefix(), + source, + new String[] { + "identifier", "true" + }); + } + + /** + * Initializes the annotations for https://www.eclipse.org/emf/2002/Ecore. + * + * + * @generated + */ + protected void createEcore_1Annotations() { + String source = "https://www.eclipse.org/emf/2002/Ecore"; + addAnnotation + (getSemanticProperty__IsFunctional(), + source, + new String[] { + "getterOf", "functional" + }); + addAnnotation + (getSemanticProperty__GetDomain(), + source, + new String[] { + "getterOf", "domain" + }); + addAnnotation + (getSemanticProperty__GetRange(), + source, + new String[] { + "getterOf", "range" + }); + addAnnotation + (getRelation__GetRelationEntity(), + source, + new String[] { + "getterOf", "relationEntity" + }); + addAnnotation + (getTypeAssertion__GetType(), + source, + new String[] { + "getterOf", "type" + }); + addAnnotation + (getPropertyValueAssertion__GetProperty(), + source, + new String[] { + "getterOf", "property" + }); + addAnnotation + (getPropertyValueAssertion__GetValue(), + source, + new String[] { + "getterOf", "value" }); } diff --git a/io.opencaesar.oml/src/io/opencaesar/oml/Oml.xcore b/io.opencaesar.oml/src/io/opencaesar/oml/Oml.xcore index 1e0086ea..d8cce296 100644 --- a/io.opencaesar.oml/src/io/opencaesar/oml/Oml.xcore +++ b/io.opencaesar.oml/src/io/opencaesar/oml/Oml.xcore @@ -39,6 +39,8 @@ import org.eclipse.emf.ecore.EObject annotation "https://tabatkins.github.io/bikeshed" as Bikeshed annotation "https://tabatkins.github.io/bikeshed/headings" as BikeshedHeadings +annotation "https://www.eclipse.org/emf/2002/Ecore" as Ecore +annotation "https://opencaesar.io/oml/Ecore" as OmlEcore /* * Element is the most general type in the OML metamodel. All objects in an OML model are elements. @@ -127,10 +129,12 @@ abstract class Ontology extends IdentifiedElement { /* * The globally unique namespace of this ontology */ + @OmlEcore(identifier="true") Namespace[1] namespace /* * The prefix of this ontology's namespace */ + @OmlEcore(identifier="true") ID[1] prefix /* * Get the namespace's iri @@ -432,14 +436,17 @@ abstract class SemanticProperty extends Property { /* * Determines if this property is functional (has a max of one value per instance) */ + @Ecore(getterOf="functional") op boolean isFunctional() /* * Gets the domain of this property */ + @Ecore(getterOf="domain") op Classifier getDomain() /* * Gets the range of the property */ + @Ecore(getterOf="range") op Type getRange() } @@ -625,6 +632,7 @@ abstract class Relation extends Feature { /* * Gets the relation entity of this relation */ + @Ecore(getterOf="relationEntity") op RelationEntity getRelationEntity() op Entity deriveDomain() @@ -1456,6 +1464,7 @@ abstract class TypeAssertion extends Assertion { /* * Gets the type referenced by this assertion */ + @Ecore(getterOf="type") op Entity getType() } @@ -1515,10 +1524,12 @@ abstract class PropertyValueAssertion extends Assertion { /* * Gets the property referenced by this assertion */ + @Ecore(getterOf="property") op SemanticProperty getProperty() /* * Gets the value specified by this assertion */ + @Ecore(getterOf="value") op Element getValue() }