如何从Oracle Data Modeler Rhino脚本获取一些输出?

时间:2015-04-15 23:33:19

标签: oracle rhino

我正在研究Rhino脚本以运行Oracle Data Modeler工具,有时我需要从这些脚本中获取简单的输出,例如对象列表(实体,表格等)以及有关它们的一些数据。

我该怎么做?

1 个答案:

答案 0 :(得分:0)

可以使用的一种技术是创建一个Note对象,并使用此函数用一些任意文本更新音符内容。

var print = (function() {
    var notes = model.getNoteSet().toArray();
    var note = null;
    if (notes.length > 0) {
        note = notes[0];
        note.comment = "";
    }
    return function() {
        if (note != null) {
            var s = String(note.comment);
            for (var i = 0; i < arguments.length; i++) {
                s += arguments[i];
            }
            note.comment = s;
        }
    }
})();

你可以这样使用它:

print("This ", "is ", "a test", "\n");

我知道我可以使用java API来打开文本文件或类似内容,但更新注释内容对我来说似乎更简单。