Sha256: f1282ec7990b62f25b1b3aeea061233cc4f95ab4d21ea9afc698758264fe2a0a

Contents?: true

Size: 1.36 KB

Versions: 3

Compression:

Stored size: 1.36 KB

Contents

require "ontomde-core"

#module Mmtk_Profil::FT2006_GesCli
module Mrdf_Resource
	def disp
		return ""
	end
end
module Mkb_Client
	def disp
		return <<FIN
***************************************************
** Bonjour    civ:#{kb_civilite}
**            nom:#{kb_nom}
**         prenom:#{kb_prenom}#{%{
**   sponsored by:#{kb_sponsoredBy_one.kb_nom}} unless kb_sponsoredBy.empty? }
FIN
	end
end
module Mkb_ClientFidelise
	def disp
		super+<<FIN
**      Vous avez:#{kb_nombrePointDeFidelite} points !
FIN
	end
end
module Mkb_ClientNonFidelise
	def disp
		super+<<FIN
**      Vous ne beneficiez pas ENCORE de notre programme de fidelisation.
FIN
	end
end
#end

DATADIR=File.dirname(__FILE__)

# load meta-model from file
model=Crdf_Repository.new
model.loadMetaModelFromFile("#{DATADIR}/etatCivil.rdfs",true)

# load model from file
model.loadModelFromFile("#{DATADIR}/etatCivil.rdf",true)

# create additional model element from file
dubois=Ckb_ClientNonFidelise.new(model,"1233")
dubois.kb_nom="Dubois"

martin=Ckb_ClientFidelise.new(model,"1234")
#martin.kb_civilite=
martin.kb_nom="Martin"
martin.kb_prenom="Jean"
martin.kb_nombrePointDeFidelite="1000"
martin.kb_sponsoredBy=martin

begin
	martin.kb_sponsoredBy=dubois
rescue Exception => e
	#dubois does not have correct type
end


puts "+++++++++++++++++++++++++++++++++"
model.each { |k,c|
	print c.disp
}
puts "++++++++++++++++++++"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ontomde-core-2.0.0 test/protege/test_demo.rb
ontomde-core-2.0.4 test/protege/test_demo.rb
ontomde-core-2.0.5 test/protege/test_demo.rb