Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Alignment API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
moex
Alignment API
Commits
d49ffb5d
Commit
d49ffb5d
authored
12 years ago
by
Jérôme Euzenat
Browse files
Options
Downloads
Patches
Plain Diff
- set better version numbers
parent
661e78c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fr/inrialpes/exmo/align/service/CacheImpl.java
+14
-14
14 additions, 14 deletions
src/fr/inrialpes/exmo/align/service/CacheImpl.java
with
14 additions
and
14 deletions
src/fr/inrialpes/exmo/align/service/CacheImpl.java
+
14
−
14
View file @
d49ffb5d
...
@@ -75,7 +75,7 @@ public class CacheImpl {
...
@@ -75,7 +75,7 @@ public class CacheImpl {
// Only Date/random should be stored.
// Only Date/random should be stored.
String
idprefix
=
null
;
String
idprefix
=
null
;
final
int
VERSION
=
42
0
;
// Version of the API to be stored in the database
final
int
VERSION
=
4
4
2
;
// Version of the API to be stored in the database
/* 300: initial database format
/* 300: initial database format
301: ADDED alignment id as primary key
301: ADDED alignment id as primary key
302: ALTERd cached/stored/ouri tag forms
302: ALTERd cached/stored/ouri tag forms
...
@@ -1076,7 +1076,7 @@ public class CacheImpl {
...
@@ -1076,7 +1076,7 @@ public class CacheImpl {
renameColumn
(
st
,
"alignment"
,
"owlontology1"
,
"ontology1"
,
"VARCHAR(255)"
);
renameColumn
(
st
,
"alignment"
,
"owlontology1"
,
"ontology1"
,
"VARCHAR(255)"
);
renameColumn
(
st
,
"alignment"
,
"owlontology2"
,
"ontology2"
,
"VARCHAR(255)"
);
renameColumn
(
st
,
"alignment"
,
"owlontology2"
,
"ontology2"
,
"VARCHAR(255)"
);
}
}
if
(
version
<
41
0
)
{
if
(
version
<
4
4
1
)
{
System
.
err
.
println
(
"Upgrading to version 4.1"
);
System
.
err
.
println
(
"Upgrading to version 4.1"
);
// [JE2012:ONTO]
// [JE2012:ONTO]
st
.
executeUpdate
(
"CREATE TABLE ontology (id VARCHAR(255), uri VARCHAR(255), source BOOLEAN, file VARCHAR(255), formname VARCHAR(50), formuri VARCHAR(255), primary key (id, source))"
);
st
.
executeUpdate
(
"CREATE TABLE ontology (id VARCHAR(255), uri VARCHAR(255), source BOOLEAN, file VARCHAR(255), formname VARCHAR(50), formuri VARCHAR(255), primary key (id, source))"
);
...
@@ -1089,7 +1089,17 @@ public class CacheImpl {
...
@@ -1089,7 +1089,17 @@ public class CacheImpl {
st2
.
executeUpdate
(
"INSERT INTO ontology (id, uri, source, file) VALUES ('"
+
rse
.
getString
(
"id"
)+
"','"
+
rse
.
getString
(
"uri2"
)+
"','0','"
+
rse
.
getString
(
"file2"
)+
"')"
);
st2
.
executeUpdate
(
"INSERT INTO ontology (id, uri, source, file) VALUES ('"
+
rse
.
getString
(
"id"
)+
"','"
+
rse
.
getString
(
"uri2"
)+
"','0','"
+
rse
.
getString
(
"file2"
)+
"')"
);
}
}
}
}
if
(
version
<
430
)
{
if
(
version
<
442
)
{
System
.
err
.
println
(
"Upgrading to version 4.4"
);
// [JE2012:ONTO]
st
.
executeUpdate
(
"ALTER TABLE alignment DROP ontology1"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP ontology2"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP uri1"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP uri2"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP file1"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP file2"
);
}
if
(
version
<
443
)
{
System
.
err
.
println
(
"Upgrading to version 4.2"
);
System
.
err
.
println
(
"Upgrading to version 4.2"
);
// [JE2012:ID][JE2013:this works]
// [JE2012:ID][JE2013:this works]
// Add new column in server table
// Add new column in server table
...
@@ -1098,21 +1108,11 @@ public class CacheImpl {
...
@@ -1098,21 +1108,11 @@ public class CacheImpl {
// Reset id in Alignment to suffix
// Reset id in Alignment to suffix
// TODO...
// TODO...
}
}
if
(
version
<
44
0
)
{
if
(
version
<
44
4
)
{
System
.
err
.
println
(
"Upgrading to version 4.3"
);
System
.
err
.
println
(
"Upgrading to version 4.3"
);
// [JE2012:DEPEND][JE2013:this works]
// [JE2012:DEPEND][JE2013:this works]
//st.executeUpdate("CREATE TABLE dependencies (id VARCHAR(255), dependsOn VARCHAR(255))");
//st.executeUpdate("CREATE TABLE dependencies (id VARCHAR(255), dependsOn VARCHAR(255))");
}
}
if
(
version
<
420
)
{
System
.
err
.
println
(
"Upgrading to version 4.4"
);
// [JE2012:ONTO]
st
.
executeUpdate
(
"ALTER TABLE alignment DROP ontology1"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP ontology2"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP uri1"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP uri2"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP file1"
);
st
.
executeUpdate
(
"ALTER TABLE alignment DROP file2"
);
}
// ALTER version
// ALTER version
// [JE2013: better alter it everywere]
// [JE2013: better alter it everywere]
st
.
executeUpdate
(
"UPDATE server SET version='"
+
VERSION
+
"' WHERE port='port'"
);
st
.
executeUpdate
(
"UPDATE server SET version='"
+
VERSION
+
"' WHERE port='port'"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment