org.apache.jena.rdf.model.Model.supportsTransactions()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(96)

本文整理了Java中org.apache.jena.rdf.model.Model.supportsTransactions()方法的一些代码示例,展示了Model.supportsTransactions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.supportsTransactions()方法的具体详情如下:
包路径:org.apache.jena.rdf.model.Model
类名称:Model
方法名:supportsTransactions

Model.supportsTransactions介绍

[英]Determine whether this model supports transactions.
[中]确定此模型是否支持事务。

代码示例

代码示例来源:origin: vivo-project/Vitro

@Override
public boolean supportsTransactions() {
  return inner.supportsTransactions();
}

代码示例来源:origin: apache/jena

@Override
public boolean supportsTransactions() {
  return holder.getBaseItem().supportsTransactions();
}

代码示例来源:origin: org.apache.jena/jena-core

/**
 * Commit the transaction on the model if transactions are supported.
 * 
 * @param m
 */
public static Model txnCommit(Model m) {
  if (m.supportsTransactions()) {
    return m.commit();
  }
  return m;
}

代码示例来源:origin: apache/jena

/**
 * Commit the transaction on the model if transactions are supported.
 * 
 * @param m
 */
public static Model txnCommit(Model m) {
  if (m.supportsTransactions()) {
    return m.commit();
  }
  return m;
}

代码示例来源:origin: apache/jena

public void testTransactions() {
  if ( model.supportsTransactions() )
    model.executeInTxn(() -> {}) ;
}

代码示例来源:origin: apache/jena

/**
 * Begin a transaction on the model if transactions are supported.
 * 
 * @param m
 */
public static Model txnBegin(Model m) {
  if (m.supportsTransactions()) {
    return m.begin();
  }
  return m;
}

代码示例来源:origin: apache/jena

/**
   * Rollback (abort) the transaction on the model if transactions are
   * supported.
   * 
   * @param m
   */
  public static Model txnRollback(Model m) {
    if (m.supportsTransactions()) {
      return m.abort();
    }
    return m;
  }
}

代码示例来源:origin: org.apache.jena/jena-core

/**
   * Rollback (abort) the transaction on the model if transactions are
   * supported.
   * 
   * @param m
   */
  public static Model txnRollback(Model m) {
    if (m.supportsTransactions()) {
      return m.abort();
    }
    return m;
  }
}

代码示例来源:origin: org.apache.jena/jena-core

/**
 * Begin a transaction on the model if transactions are supported.
 * 
 * @param m
 */
public static Model txnBegin(Model m) {
  if (m.supportsTransactions()) {
    return m.begin();
  }
  return m;
}

代码示例来源:origin: apache/jena

public void testTransactions() {
  if ( model.supportsTransactions() )
    model.executeInTxn(() -> {}) ;
}

代码示例来源:origin: org.apache.jena/jena-core

public void testTransactions() {
  if ( model.supportsTransactions() )
    model.executeInTxn(() -> {}) ;
}

代码示例来源:origin: org.apache.jena/jena-core

public void testTransactions() {
  if ( model.supportsTransactions() )
    model.executeInTxn(() -> {}) ;
}

代码示例来源:origin: org.apache.jena/jena-core

protected void addContent( Resource root, Model m, Content c )
  {
  if (m.supportsTransactions())
    {
    m.begin();
    try { c.fill( m ); m.commit(); }
    catch (Throwable t) { m.abort(); throw new TransactionAbortedException( root, t ); }
    }
  else
    c.fill( m );
  }

代码示例来源:origin: apache/jena

protected void addContent( Resource root, Model m, Content c )
  {
  if (m.supportsTransactions())
    {
    m.begin();
    try { c.fill( m ); m.commit(); }
    catch (Throwable t) { m.abort(); throw new TransactionAbortedException( root, t ); }
    }
  else
    c.fill( m );
  }

代码示例来源:origin: apache/jena

return new SPARQLResult(model);
};
if ( model.supportsTransactions() )
  return model.calculateInTxn(r);
else

相关文章

Model类方法