Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions io.opencaesar.oml/src-gen/io/opencaesar/oml/Ontology.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public interface PropertyValueAssertion extends Assertion {
* Gets the property referenced by this assertion
* <!-- end-model-doc -->
* @model kind="operation" unique="false"
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='property'"
* @generated
*/
SemanticProperty getProperty();
Expand All @@ -114,6 +115,7 @@ public interface PropertyValueAssertion extends Assertion {
* Gets the value specified by this assertion
* <!-- end-model-doc -->
* @model kind="operation" unique="false"
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='value'"
* @generated
*/
Element getValue();
Expand Down
1 change: 1 addition & 0 deletions io.opencaesar.oml/src-gen/io/opencaesar/oml/Relation.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public interface Relation extends Feature {
* Gets the relation entity of this relation
* <!-- end-model-doc -->
* @model kind="operation" unique="false"
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='relationEntity'"
* @generated
*/
RelationEntity getRelationEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public interface SemanticProperty extends Property {
* Determines if this property is functional (has a max of one value per instance)
* <!-- end-model-doc -->
* @model kind="operation" unique="false"
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='functional'"
* @generated
*/
boolean isFunctional();
Expand All @@ -54,6 +55,7 @@ public interface SemanticProperty extends Property {
* Gets the domain of this property
* <!-- end-model-doc -->
* @model kind="operation" unique="false"
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='domain'"
* @generated
*/
Classifier getDomain();
Expand All @@ -65,6 +67,7 @@ public interface SemanticProperty extends Property {
* Gets the range of the property
* <!-- end-model-doc -->
* @model kind="operation" unique="false"
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='range'"
* @generated
*/
Type getRange();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public interface TypeAssertion extends Assertion {
* Gets the type referenced by this assertion
* <!-- end-model-doc -->
* @model kind="operation" unique="false"
* annotation="https://www.eclipse.org/emf/2002/Ecore getterOf='type'"
* @generated
*/
Entity getType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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 <b>https://opencaesar.io/oml/Ecore</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @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 <b>https://www.eclipse.org/emf/2002/Ecore</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @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"
});
}

Expand Down
11 changes: 11 additions & 0 deletions io.opencaesar.oml/src/io/opencaesar/oml/Oml.xcore
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
}

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -1456,6 +1464,7 @@ abstract class TypeAssertion extends Assertion {
/*
* Gets the type referenced by this assertion
*/
@Ecore(getterOf="type")
op Entity getType()
}

Expand Down Expand Up @@ -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()
}

Expand Down