ontomde-core 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +2 -2
- data/lib/ontomde-core/context.rb +2 -0
- data/lib/ontomde-core/demoInstaller.rb +26 -0
- data/lib/ontomde-core/version.rb +1 -1
- metadata +2 -11
data/Rakefile
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
|
-
require 'hoe'
|
4
|
+
require 'ontomde-hoe'
|
5
5
|
require './lib/ontomde-core/version.rb'
|
6
6
|
|
7
|
-
|
7
|
+
OntomdeHoe.new('ontomde-core', Ontomde::Core::VERSION) do |p|
|
8
8
|
p.rubyforge_name = 'ontomde'
|
9
9
|
p.author = 'Stephane (Pierre) Carrie'
|
10
10
|
p.email = 'stephanepierre.carrie@orange-ftgroup.com'
|
data/lib/ontomde-core/context.rb
CHANGED
@@ -11,11 +11,13 @@ class WarningHash < Hash
|
|
11
11
|
#Returns context value associated to key.
|
12
12
|
#Raises an error if key is not found.
|
13
13
|
# Returns default, when context is undefined for key, and a default value is provided.
|
14
|
+
#if value is missing, key is return when context[:contextReturnKeyIfEmpty] is true. (feature used by web inspector)
|
14
15
|
def [](key,default=Object.class)
|
15
16
|
val=super(key)
|
16
17
|
return val unless val.nil?
|
17
18
|
#Note: Object.class is used as a magic number.
|
18
19
|
return default unless default==Object.class
|
20
|
+
return "#{key}" if context[:contextReturnKeyIfEmpty,false]
|
19
21
|
raise Warning.new(), <<FINCODE
|
20
22
|
Evaluation interrompue:
|
21
23
|
La session ne contient pas la variable :#{key}.
|
@@ -1,3 +1,7 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'optparse'
|
3
|
+
require 'fileutils'
|
4
|
+
|
1
5
|
module DemoInstaller
|
2
6
|
def proceed(target,source,banner)
|
3
7
|
options = { }
|
@@ -29,4 +33,26 @@ END
|
|
29
33
|
puts "INFO: Project created in #{options[:target]}"
|
30
34
|
end
|
31
35
|
end
|
36
|
+
|
37
|
+
# install demonstration
|
38
|
+
#
|
39
|
+
# infers demo location and demo name from scriptName and and call proceed.
|
40
|
+
# scriptFullPath is expected to have the following structure:
|
41
|
+
# <path>/<demoName>/bin/<thisscript>
|
42
|
+
# and demo is expected to be in <path>/<demoName>/demo
|
43
|
+
def installDefaultDemo(scriptFullPath)
|
44
|
+
scriptFullPath=File.expand_path(scriptFullPath)
|
45
|
+
dn=File.dirname(scriptFullPath)
|
46
|
+
bn=File.basename(scriptFullPath)
|
47
|
+
|
48
|
+
target=File.basename(File.dirname(dn))
|
49
|
+
source="#{dn}/../demo"
|
50
|
+
banner=%{#{bn} installs a demo project in target directory.}
|
51
|
+
|
52
|
+
#puts "target=>#{target}<"
|
53
|
+
#puts "source=>#{source}<"
|
54
|
+
#puts "banner=>#{banner}<"
|
55
|
+
|
56
|
+
proceed(target,source,banner)
|
57
|
+
end
|
32
58
|
end
|
data/lib/ontomde-core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ontomde-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephane (Pierre) Carrie
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-03-
|
12
|
+
date: 2008-03-25 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -21,15 +21,6 @@ dependencies:
|
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.0.3
|
23
23
|
version:
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: hoe
|
26
|
-
version_requirement:
|
27
|
-
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
requirements:
|
29
|
-
- - ">="
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version: 1.5.0
|
32
|
-
version:
|
33
24
|
description: "ontoMDE-core is basically a library for loading a RDFS model in ruby memory and process it to do something usefull such as generating Java or C++ code. ontoMDE-core is used by ontoMDE-uml2 which adds UML2 meta-model definitions and some helper methods. ontoMDE-uml2 is in turn used by ontoMDE-uml2-java which adds methods and rules to generate java5 code. But ontoMDE-core is *not* *UML* *specific* and can be used with *any* RDF[http://en.wikipedia.org/wiki/Resource_Description_Framework] / RDFS[http://en.wikipedia.org/wiki/RDF_Schema] model such as those created with Protege_2000[http://protege.stanford.edu]. This opens to ontoMDE-core users the ability to generate code from custom DSL[http://en.wikipedia.org/wiki/Domain_Specific_Language] models, or join different models. == FEATURES/PROBLEMS: RDF handling library * RDF/ntriples native ruby file reader * RDFS to Ruby class file converter * RDF data reader Code generator helper library * file write library helper with protected zone handling * tag based code reverse library"
|
34
25
|
email: stephanepierre.carrie@orange-ftgroup.com
|
35
26
|
executables: []
|