有没有人知道SuiteScript 2.0的等价物?
nlapiRequestURL(url, postdata, headers, httpMethod)
Run Code Online (Sandbox Code Playgroud) 我试图直接从Oracle数据库的SPARQL查询输出RDF/XML文件.由于我在ResultSet对象中验证了结果,因此查询工作正常.
但是,我不确定如何从那里开始.我想我想为每个QuerySolution创建一个Statement,然后将它添加到Model中.但是我无法想出办法,因为我无法找到获取谓词值的方法.
任何帮助将不胜感激,并暗示我是否走正确的道路.
QueryExecution qe = QueryExecutionFactory.create(query, oracleSemModel) ;       
ResultSet results = qe.execSelect();
Model model = ModelFactory.createDefaultModel();
while (results.hasNext())
{
    QuerySolution result = results.next();
    Resource  subject   =  result.getResource("s");   // get the subject
    Property  predicate =  result.getProperty("p");   // <-- THIS FUNCTION DOESN'T EXIST
    RDFNode   object    =  result.get("o");           // get the object
    Statement stmt = ResourceFactory.createStatement(subject, predicate, object);
    model.add(stmt);
}
model.write(System.out, "RDF/XML-ABBREV");
Run Code Online (Sandbox Code Playgroud)