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
1c885324
Commit
1c885324
authored
Feb 12, 2007
by
Anders Nilsson
Browse files
Added option for naming generated ontology
parent
8375b52d
Changes
1
Hide whitespace changes
Inline
Side-by-side
siaras/GenOntology.java
View file @
1c885324
...
...
@@ -13,8 +13,15 @@ import java.io.*;
public
class
GenOntology
extends
Parser
{
public
static
void
main
(
String
args
[])
{
Start
ast
=
null
;
String
outfile
=
null
;
int
i
=
0
;
for
(
i
=
0
;
i
<
args
.
length
;
i
++)
{
if
(
args
[
i
].
equals
(
"-o"
))
{
outfile
=
args
[++
i
];
}
}
try
{
Reader
r
=
new
FileReader
(
args
[
0
]);
Reader
r
=
new
FileReader
(
args
[
args
.
length
-
1
]);
SiarasParser
parser
=
new
SiarasParser
(
r
);
ast
=
parser
.
Start
();
...
...
@@ -24,16 +31,16 @@ public class GenOntology extends Parser {
catch
(
FileNotFoundException
e
)
{
System
.
err
.
println
(
"file "
+
args
[
0
]
+
" not found"
);
}
String
fileName
=
null
;
try
{
// Generate OWL ontology, possibly transformed from Owl
// Full to OWL DL
fileName
=
"ontology.owl"
;
PrintStream
pStream
=
new
PrintStream
(
new
File
(
fileName
));
if
(
outfile
==
null
)
{
outfile
=
"ontology.owl"
;
}
PrintStream
pStream
=
new
PrintStream
(
new
File
(
outfile
));
ast
.
genOntology
(
""
,
pStream
);
}
catch
(
java
.
io
.
FileNotFoundException
e
)
{
System
.
out
.
println
(
"Could not create file: "
+
fil
eNam
e
);
System
.
out
.
println
(
"Could not create file: "
+
out
file
);
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