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

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

本文整理了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

  1. /**
  2. * Constructor to be invoked by non-OSGi environments.
  3. *
  4. * @deprecated tcm and wctp are no longer to be supplied directly to the ONManager object. Use
  5. * {@link #ONManagerImpl(OntologyProvider, OfflineConfiguration, Dictionary)} instead.
  6. *
  7. * @param tcm
  8. * the triple collection manager to be used for storing ontologies.
  9. * @param wtcp
  10. * the triple collection provider to be used for storing ontologies.
  11. * @param onmconfig
  12. * the configuration of this ontology network manager.
  13. * @param configuration
  14. * additional parameters for the ONManager not included in {@link OfflineConfiguration}.
  15. */
  16. @Deprecated
  17. public ONManagerImpl(TcManager tcm,
  18. WeightedTcProvider wtcp,
  19. OfflineConfiguration offline,
  20. Dictionary<String,Object> configuration) {
  21. /*
  22. * Assume this.tcm this.wtcp and this.wtcp were not filled in by OSGi-DS. As a matter of fact,
  23. * WeightedTcProvider is now ignored as we assume to use those bound with the TcManager.
  24. */
  25. this(new ClerezzaOntologyProvider(tcm, offline, new Parser()), offline, configuration);
  26. }

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

  1. /**
  2. * This returns the singleton instance, if an instance has been previously
  3. * created (e.g. by OSGi declarative services) this instance is returned,
  4. * otherwise a new instance is created and providers are injected using
  5. * the service provider interface (META-INF/services/)
  6. *
  7. * @return the singleton Parser instance
  8. */
  9. public static Parser getInstance() {
  10. if (instance == null) {
  11. synchronized (Parser.class) {
  12. if (instance == null) {
  13. new Parser();
  14. Iterator<ParsingProvider> parsingProviders =
  15. ServiceLoader.load(ParsingProvider.class).iterator();
  16. while (parsingProviders.hasNext()) {
  17. ParsingProvider parsingProvider = parsingProviders.next();
  18. instance.bindParsingProvider(parsingProvider);
  19. }
  20. instance.active = true;
  21. instance.refreshProviderMap();
  22. }
  23. }
  24. }
  25. return instance;
  26. }

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

  1. /**
  2. * This returns the singleton instance, if an instance has been previously
  3. * created (e.g. by OSGi declarative services) this instance is returned,
  4. * otherwise a new instance is created and providers are injected using
  5. * the service provider interface (META-INF/services/)
  6. *
  7. * @return the singleton Parser instance
  8. */
  9. public static Parser getInstance() {
  10. if (instance == null) {
  11. synchronized (Parser.class) {
  12. if (instance == null) {
  13. new Parser();
  14. Iterator<ParsingProvider> parsingProviders =
  15. ServiceLoader.load(ParsingProvider.class).iterator();
  16. while (parsingProviders.hasNext()) {
  17. ParsingProvider parsingProvider = parsingProviders.next();
  18. instance.bindParsingProvider(parsingProvider);
  19. }
  20. instance.active = true;
  21. instance.refreshProviderMap();
  22. }
  23. }
  24. }
  25. return instance;
  26. }

相关文章