Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Nilsson
OwlCompiler
Commits
4da4e90b
Commit
4da4e90b
authored
Feb 13, 2007
by
Anders Nilsson
Browse files
Generate a suitable .repository file to accompany the generated ontology
parent
1c885324
Changes
2
Hide whitespace changes
Inline
Side-by-side
.bzrignore
View file @
4da4e90b
...
...
@@ -15,3 +15,4 @@ testontologies/*.pprj
siaras/ontology.owl
siaras/javadoc
siaras/OntologyCompiler.jar
*.repository
siaras/GenOntology.java
View file @
4da4e90b
...
...
@@ -18,6 +18,9 @@ public class GenOntology extends Parser {
for
(
i
=
0
;
i
<
args
.
length
;
i
++)
{
if
(
args
[
i
].
equals
(
"-o"
))
{
outfile
=
args
[++
i
];
if
(
outfile
.
endsWith
(
".owl"
))
{
outfile
=
outfile
.
substring
(
0
,
outfile
.
indexOf
(
'.'
));
}
}
}
try
{
...
...
@@ -35,10 +38,14 @@ public class GenOntology extends Parser {
// Generate OWL ontology, possibly transformed from Owl
// Full to OWL DL
if
(
outfile
==
null
)
{
outfile
=
"ontology
.owl
"
;
outfile
=
"ontology"
;
}
PrintStream
pStream
=
new
PrintStream
(
new
File
(
outfile
));
PrintStream
pStream
=
new
PrintStream
(
new
File
(
outfile
+
".owl"
));
ast
.
genOntology
(
""
,
pStream
);
// have to create a matching repository file, otherwise
// Protege will complain severely.
pStream
=
new
PrintStream
(
new
File
(
outfile
+
".repository"
));
pStream
.
println
(
"[Dublin Core DL Redirect]"
);
}
catch
(
java
.
io
.
FileNotFoundException
e
)
{
System
.
out
.
println
(
"Could not create file: "
+
outfile
);
e
.
printStackTrace
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment