User options

15 views
Skip to first unread message

Ludovic Roy

unread,
Aug 16, 2017, 10:04:53 AM8/16/17
to sbfc-forum
Hello everyone,

I'm extending sbfc for some graphml conversion to sbgnml.
Is there a way for a user to provide some options to sbfc at runtime? from the command line or another way?
I browsed the doc and it doesn't seem so, but I'd like to be sure. Can it only be done through some wrapper script and environment variable?
Also, how is setOptions from the GeneralConverter class intended to be used?

Thanks for your time,
Ludovic Roy

Nicolas Rodriguez

unread,
Aug 23, 2017, 8:07:18 AM8/23/17
to sbfc-forum
Hi Ludovic,

In theory, you should be able to set the options from the command line or when you call one of the methods from the org.sbfc.Converter class. We thought that options will be needed for some converters but because the current converter do not really allow for them, we did not develop thinks enough for them to be usable from the command line (or the GUI).

Now that I am thinking about it a bit more, having a hash map for the options can be problematic as sometimes you want to have a single option on it's own without additional value.

One way to overcome that would be to add a method GeneralConverter.parseOptions(String[]). We can pass all the remaining arguments to it and converters that support options can deal with it as they like. We can even provide a default implementation in GeneralConverter that try to associate the arguments two by two and populate the HashMap this way.

What do you think ?
The general intention was that the class org.sbfc.Converter will populate the options but you can as well modify them by hand this way if needed. We did not put a getOptions method but that could be good to add if you want to check or modify the options from outside of a GeneralConverter.

cheers,
Nico

Reply all
Reply to author
Forward
0 new messages