package OAM { class AnnotationModel extends WModel { -- @subsets ownedElement reference contents[*] ordered container : Annotation; -- @subsets wovenModel reference referencedModel container : AnnotatedModel; } -- @welementRefType AnnotatedModelElementRef class AnnotatedModel extends WModelRef { } -- @wmodelRefType AnnotatedModel class AnnotatedModelElementRef extends WElementRef{ } --@begin ANNOTATIONS abstract class Annotation extends WLink { -- @subsets end reference annotatedModelElement[0-1] container : AnnotatedModelElement; } class AnnotatedModelElement extends WLinkEnd { } --@end ANNOTATIONS --@begin ONTOLOGY ANNOTATIONS abstract class OntologyAnnotation extends Annotation { attribute namespace : String; attribute localName[0-1] : String; } class Ontology extends OntologyAnnotation { attribute nsPrefix : String; attribute importsOntology[*] : String; } class OWLClass extends OntologyAnnotation { -- @subsets end reference subClassOf[*] container : AnnotatedModelElement; reference equivalentClass[*] : OWLClass; } class UnionClass extends OWLClass { reference unionOf [*] : OntologyAnnotation; } class IntersectionClass extends OWLClass { reference intersectionOf [*] : OntologyAnnotation; } class ComplementClass extends OWLClass { reference complementOf : OntologyAnnotation; } abstract class Property extends OntologyAnnotation { attribute isFunctional[0-1] : Boolean; -- @subsets end reference subPropertyOf[*] container : AnnotatedModelElement; -- @subsets end reference domain[*] container : AnnotatedModelElement; -- @subsets end reference range[*] container : AnnotatedModelElement; } class DatatypeProperty extends Property { } class ObjectProperty extends Property { attribute isTransitive : Boolean; attribute isSymmetric : Boolean; attribute isInverseFunctional[0-1] : Boolean; } abstract class Restriction extends OntologyAnnotation { reference onProperty : Property; reference subClass : OWLClass; } class SomeValuesFrom extends Restriction { reference someValueFromClass[0-1] : OWLClass; reference someValueFromDataRange[0-1] : DataType; } class AllValuesFrom extends Restriction { reference allValueFromClass[0-1] : OWLClass; reference allValueFromDataRange[0-1] : DataType; } class HasValueFrom extends Restriction { reference hasIndividualValue[0-1] : Individual; reference hasLiteralValue[0-1] : String; } class DataType extends OntologyAnnotation { attribute xsdType : XsdType; } enumeration XsdType { literal "http://www.w3.org/2001/XMLSchema#string"; literal "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"; literal "http://www.w3.org/2001/XMLSchema#boolean"; literal "http://www.w3.org/2001/XMLSchema#integer"; } class EnumeratedClass extends OWLClass { reference oneOf [*]: Individual; } class Individual extends OntologyAnnotation { } --@end ONTOLOGY ANNOTATIONS --@end ANNOTATIONS } package PrimitiveTypes { datatype Boolean; datatype Integer; datatype String; }