vocabulary <http://ua.be/sdo2l/vocabulary/base/base#> as base {
	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
	extends <http://www.w3.org/2001/XMLSchema#> as xsd
	extends <http://ua.be/sdo2l/vocabulary/base/acyclic#> as acyclic

	aspect ImmutableThing [
		key hasGUID
		restricts scalar property hasGUID to exactly 1 
	]
	
	scalar property hasGUID [
		domain ImmutableThing
		range xsd:string
		functional
	]

	// Elements for Identified Things

	@rdfs:comment "The class of things having an id and a canonical name"
	aspect IdentifiedThing [
		restricts scalar property hasIdentifier to exactly 1
		//restricts scalar property hasCanonicalName to exactly 1
	]

	@rdfs:comment "The has canonical name property"
	scalar property hasCanonicalName [
		domain IdentifiedThing
		range xsd:string
	]

	@rdfs:comment "The has identifier property"
	scalar property hasIdentifier [
		domain IdentifiedThing
		range xsd:string
	]

	@rdfs:comment "The has description property"
	scalar property hasDescription [
		domain IdentifiedThing
		range xsd:string
	]
	
	enumerated scalar BasicType [
    	"Boolean","Double", "Integer","String", "Char"
    ]  
    
    // OBS: The specialization did not work for enumerated scalars, the only way to work is duplicating the values like this. 
    enumerated scalar NumericType :> BasicType [
    	"Double", "Integer"
    ]

	// Relationships aggreagation and containment

	// Joeri: These appear to be unused at the moment. Can we remove them?
 	@rdfs:comment "The class of things that can be aggregated"
	aspect AggregatedThing

	@rdfs:comment "The aggregates relation between aggregated things"
	relation entity Aggregates [
		from AggregatedThing
		to AggregatedThing
		forward aggregates
		reverse isAggregatedIn
		asymmetric
		irreflexive
	]

	@rdfs:comment "A ContainedElement is a thing that can participate in homomeric containment relationships."
	aspect ContainedElement

	@rdfs:comment "Contains is a many-to-many relation used to represent homomeric relations that form directed rooted trees."
	relation entity Contains :> acyclic:Acyclic [
		from ContainedElement
		to ContainedElement
		forward contains
		reverse isContainedIn
		inverse functional
		asymmetric
		irreflexive
	]

	// Definitions and Usages

	@rdfs:comment "The class of things that specify definitions of elements"
	aspect DefinitionThing

	@rdfs:comment "The has name property"
	scalar property hasName [
		domain DefinitionThing
		range xsd:string
	]


	@rdfs:comment "The class of things that are used and are defined by DefinitionThings"
	aspect UsageThing

	@rdfs:comment "The has usage name property"
	scalar property hasUsageName [
		domain UsageThing
		range xsd:string
	]

	@rdfs:comment "relationship between definitions and concrete elements"
	relation entity Defines [
		from DefinitionThing
		to UsageThing
		forward defines
		reverse isDefinedBy
		asymmetric
		irreflexive
	]

	// Version

	aspect Versionable :> ImmutableThing

	@rdfs:comment "The has canonical name property"
	scalar property hasTag [
		domain Versionable
		range xsd:string
	]

	relation entity Versions :> acyclic:Acyclic [
		from Versionable
		to Versionable
		forward previousVersionOf
		reverse nextVersionOf
		asymmetric
		irreflexive
	]
}
