com.hp.hpl.jena.rdf.model.Model.isClosed()方法的使用及代码示例

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

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

Model.isClosed介绍

[英]Answer true iff .close() has been called on this Model.
[中]回答正确。已在此模型上调用close()。

代码示例

代码示例来源:origin: fr.inria.eventcloud/eventcloud-api

/**
 * {@inheritDoc}
 */
@Override
public boolean isClosed() {
  return super.object.isClosed();
}

代码示例来源:origin: bio2rdf/bio2rdf-scripts

public boolean isClosed() {
  return model.isClosed();
}

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

/**
 * <p>
 * Answer the cached model corresponding to the given document, if known.
 * </p>
 *
 * @param uri The ontology document to lookup
 * @return The model for the document, or null if the model is not known.
 * @see #getOntology
 */
public Model getModel( String uri ) {
  Model m = getFileManager().getFromCache( uri );
  // if a previously cached model has been closed, we ignore it
  if (m != null && m.isClosed()) {
    getFileManager().removeCacheModel( uri );
    m = null;
  }
  return m;
}

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

/**
 * @param spec
 * @param importURI
 * @return Model
 */
private Model fetchLoadedImportModel( OntModelSpec spec, String importURI ) {
  // workaround - default model maker can apparently create models that are closed
  // TODO: this really suggests a bug in ModelMaker, kers to investigate
  ModelMaker maker = spec.getImportModelMaker();
  if (maker.hasModel( importURI )) {
    Model m = maker.getModel( importURI );
    if (!m.isClosed()) {
      return m;
    }
    else {
      // we don't want to hang on to closed models
      maker.removeModel( importURI );
    }
  }
  // otherwise, we use the model maker to get the model anew
  Model m = spec.getImportModelGetter()
        .getModel( importURI, new ModelReader() {
                    @Override
                    public Model readModel( Model toRead, String URL ) {
                      read( toRead, URL, true );
                      return toRead;
                    }
                   } );
  return m;
}

相关文章

Model类方法