org.apache.clerezza.rdf.core.serializedform.Parser.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(109)

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

Parser.<init>介绍

[英]the constructor sets the singleton instance to allow instantiation by OSGi-DS. This constructor should not be called except by OSGi-DS, otherwise the static getInstance method should be used.
[中]构造函数将单例实例设置为允许OSGi DS实例化。除非OSGi DS调用此构造函数,否则应使用静态getInstance方法。

代码示例

代码示例来源:origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.ontonet

/**
 * Constructor to be invoked by non-OSGi environments.
 * 
 * @deprecated tcm and wctp are no longer to be supplied directly to the ONManager object. Use
 *             {@link #ONManagerImpl(OntologyProvider, OfflineConfiguration, Dictionary)} instead.
 * 
 * @param tcm
 *            the triple collection manager to be used for storing ontologies.
 * @param wtcp
 *            the triple collection provider to be used for storing ontologies.
 * @param onmconfig
 *            the configuration of this ontology network manager.
 * @param configuration
 *            additional parameters for the ONManager not included in {@link OfflineConfiguration}.
 */
@Deprecated
public ONManagerImpl(TcManager tcm,
           WeightedTcProvider wtcp,
           OfflineConfiguration offline,
           Dictionary<String,Object> configuration) {
  /*
   * Assume this.tcm this.wtcp and this.wtcp were not filled in by OSGi-DS. As a matter of fact,
   * WeightedTcProvider is now ignored as we assume to use those bound with the TcManager.
   */
  this(new ClerezzaOntologyProvider(tcm, offline, new Parser()), offline, configuration);
}

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

/**
 * This returns the singleton instance, if an instance has been previously
 * created (e.g. by OSGi declarative services) this instance is returned,
 * otherwise a new instance is created and providers are injected using 
 * the service provider interface (META-INF/services/)
 *
 * @return the singleton Parser instance
 */
public static Parser getInstance() {
  if (instance == null) {
    synchronized (Parser.class) {
      if (instance == null) {
        new Parser();
        Iterator<ParsingProvider> parsingProviders =
            ServiceLoader.load(ParsingProvider.class).iterator();
        while (parsingProviders.hasNext()) {
          ParsingProvider parsingProvider = parsingProviders.next();
          instance.bindParsingProvider(parsingProvider);
        }
        instance.active = true;
        instance.refreshProviderMap();
      }
    }
  }
  return instance;
}

代码示例来源:origin: org.apache.clerezza/rdf.core

/**
 * This returns the singleton instance, if an instance has been previously
 * created (e.g. by OSGi declarative services) this instance is returned,
 * otherwise a new instance is created and providers are injected using 
 * the service provider interface (META-INF/services/)
 *
 * @return the singleton Parser instance
 */
public static Parser getInstance() {
  if (instance == null) {
    synchronized (Parser.class) {
      if (instance == null) {
        new Parser();
        Iterator<ParsingProvider> parsingProviders =
            ServiceLoader.load(ParsingProvider.class).iterator();
        while (parsingProviders.hasNext()) {
          ParsingProvider parsingProvider = parsingProviders.next();
          instance.bindParsingProvider(parsingProvider);
        }
        instance.active = true;
        instance.refreshProviderMap();
      }
    }
  }
  return instance;
}

相关文章