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
5473887c
Commit
5473887c
authored
12 years ago
by
Thinh Dong
Browse files
Options
Downloads
Patches
Plain Diff
EDOAL to SPARQL renderer
parent
04af20ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fr/inrialpes/exmo/align/cli/ParserPrinter.java
+19
-4
19 additions, 4 deletions
src/fr/inrialpes/exmo/align/cli/ParserPrinter.java
with
19 additions
and
4 deletions
src/fr/inrialpes/exmo/align/cli/ParserPrinter.java
+
19
−
4
View file @
5473887c
...
@@ -35,6 +35,9 @@ import fr.inrialpes.exmo.align.impl.renderer.RDFRendererVisitor;
...
@@ -35,6 +35,9 @@ import fr.inrialpes.exmo.align.impl.renderer.RDFRendererVisitor;
import
fr.inrialpes.exmo.align.impl.ObjectAlignment
;
import
fr.inrialpes.exmo.align.impl.ObjectAlignment
;
import
fr.inrialpes.exmo.align.impl.URIAlignment
;
import
fr.inrialpes.exmo.align.impl.URIAlignment
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.FileWriter
;
import
java.io.OutputStream
;
import
java.io.OutputStream
;
import
java.io.FileOutputStream
;
import
java.io.FileOutputStream
;
import
java.io.PrintWriter
;
import
java.io.PrintWriter
;
...
@@ -76,7 +79,7 @@ import fr.inrialpes.exmo.align.parser.AlignmentParser;
...
@@ -76,7 +79,7 @@ import fr.inrialpes.exmo.align.parser.AlignmentParser;
$Id$
$Id$
</pre>
</pre>
@author J
r
me Euzenat
@author J
�r�
me Euzenat
*/
*/
public
class
ParserPrinter
{
public
class
ParserPrinter
{
...
@@ -90,6 +93,7 @@ public class ParserPrinter {
...
@@ -90,6 +93,7 @@ public class ParserPrinter {
Alignment
result
=
null
;
Alignment
result
=
null
;
String
initName
=
null
;
String
initName
=
null
;
String
filename
=
null
;
String
filename
=
null
;
String
dirName
=
null
;
PrintWriter
writer
=
null
;
PrintWriter
writer
=
null
;
AlignmentVisitor
renderer
=
null
;
AlignmentVisitor
renderer
=
null
;
LongOpt
[]
longopts
=
new
LongOpt
[
10
];
LongOpt
[]
longopts
=
new
LongOpt
[
10
];
...
@@ -110,8 +114,9 @@ public class ParserPrinter {
...
@@ -110,8 +114,9 @@ public class ParserPrinter {
longopts
[
6
]
=
new
LongOpt
(
"threshold"
,
LongOpt
.
REQUIRED_ARGUMENT
,
null
,
't'
);
longopts
[
6
]
=
new
LongOpt
(
"threshold"
,
LongOpt
.
REQUIRED_ARGUMENT
,
null
,
't'
);
longopts
[
7
]
=
new
LongOpt
(
"cutmethod"
,
LongOpt
.
REQUIRED_ARGUMENT
,
null
,
'T'
);
longopts
[
7
]
=
new
LongOpt
(
"cutmethod"
,
LongOpt
.
REQUIRED_ARGUMENT
,
null
,
'T'
);
longopts
[
8
]
=
new
LongOpt
(
"embedded"
,
LongOpt
.
NO_ARGUMENT
,
null
,
'e'
);
longopts
[
8
]
=
new
LongOpt
(
"embedded"
,
LongOpt
.
NO_ARGUMENT
,
null
,
'e'
);
longopts
[
9
]
=
new
LongOpt
(
"dirName"
,
LongOpt
.
REQUIRED_ARGUMENT
,
null
,
'c'
);
Getopt
g
=
new
Getopt
(
""
,
args
,
"ehio:t:T:d::r:p:"
,
longopts
);
Getopt
g
=
new
Getopt
(
""
,
args
,
"ehio:t:T:d::r:p:
c:
"
,
longopts
);
int
c
;
int
c
;
String
arg
;
String
arg
;
...
@@ -130,6 +135,9 @@ public class ParserPrinter {
...
@@ -130,6 +135,9 @@ public class ParserPrinter {
/* Write warnings to stdout rather than stderr */
/* Write warnings to stdout rather than stderr */
filename
=
g
.
getOptarg
();
filename
=
g
.
getOptarg
();
break
;
break
;
case
'c'
:
dirName
=
g
.
getOptarg
();
break
;
case
'r'
:
case
'r'
:
/* Use the given class for rendernig */
/* Use the given class for rendernig */
rendererClass
=
g
.
getOptarg
();
rendererClass
=
g
.
getOptarg
();
...
@@ -194,10 +202,16 @@ public class ParserPrinter {
...
@@ -194,10 +202,16 @@ public class ParserPrinter {
if
(
filename
==
null
)
{
if
(
filename
==
null
)
{
//writer = (PrintStream) System.out;
//writer = (PrintStream) System.out;
stream
=
System
.
out
;
stream
=
System
.
out
;
}
else
{
}
else
{
//writer = new PrintStream(new FileOutputStream(filename));
//writer = new PrintStream(new FileOutputStream(filename));
stream
=
new
FileOutputStream
(
filename
);
stream
=
new
FileOutputStream
(
filename
);
}
}
if
(
dirName
!=
null
)
{
File
f
=
new
File
(
dirName
);
f
.
mkdir
();
System
.
setProperty
(
"user.dir"
,
dirName
);
}
writer
=
new
PrintWriter
(
writer
=
new
PrintWriter
(
new
BufferedWriter
(
new
BufferedWriter
(
new
OutputStreamWriter
(
stream
,
"UTF-8"
)),
true
);
new
OutputStreamWriter
(
stream
,
"UTF-8"
)),
true
);
...
@@ -237,7 +251,7 @@ public class ParserPrinter {
...
@@ -237,7 +251,7 @@ public class ParserPrinter {
}
finally
{
}
finally
{
writer
.
flush
();
writer
.
flush
();
writer
.
close
();
writer
.
close
();
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
ex
.
printStackTrace
();
...
@@ -256,6 +270,7 @@ public class ParserPrinter {
...
@@ -256,6 +270,7 @@ public class ParserPrinter {
System
.
out
.
println
(
"\t--threshold=threshold -t threshold\t\tTrim the alugnment with regard to threshold"
);
System
.
out
.
println
(
"\t--threshold=threshold -t threshold\t\tTrim the alugnment with regard to threshold"
);
System
.
out
.
println
(
"\t--cutmethod=hard|perc|prop|best|span -T hard|perc|prop|best|span\t\tMethod to use for triming"
);
System
.
out
.
println
(
"\t--cutmethod=hard|perc|prop|best|span -T hard|perc|prop|best|span\t\tMethod to use for triming"
);
System
.
out
.
println
(
"\t--output=filename -o filename\tOutput the alignment in filename"
);
System
.
out
.
println
(
"\t--output=filename -o filename\tOutput the alignment in filename"
);
System
.
out
.
println
(
"\t--outputDir=dirName -c dirName\tOutput the queris in directory"
);
System
.
out
.
println
(
"\t--help -h\t\t\tPrint this message"
);
System
.
out
.
println
(
"\t--help -h\t\t\tPrint this message"
);
System
.
err
.
print
(
"\n"
+
ParserPrinter
.
class
.
getPackage
().
getImplementationTitle
()+
" "
+
ParserPrinter
.
class
.
getPackage
().
getImplementationVersion
());
System
.
err
.
print
(
"\n"
+
ParserPrinter
.
class
.
getPackage
().
getImplementationTitle
()+
" "
+
ParserPrinter
.
class
.
getPackage
().
getImplementationVersion
());
System
.
err
.
println
(
" ($Id$)\n"
);
System
.
err
.
println
(
" ($Id$)\n"
);
...
...
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