gpt4 book ai didi

org.sweble.wikitext.engine.config.WikiConfig类的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 06:09:05 25 4
gpt4 key购买 nike

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

WikiConfig介绍

暂无

代码示例

代码示例来源:origin: sweble/sweble-wikitext

public WtEngineImpl(WikiConfig wikiConfig)
{
  super();
  this.wikiConfig = wikiConfig;
  this.parserConfig = wikiConfig.getParserConfig();
  this.engineConfig = wikiConfig.getEngineConfig();
}

代码示例来源:origin: sweble/sweble-wikitext

protected HtmlRenderer(
      HtmlRendererCallback callback,
      WikiConfig wikiConfig,
      PageTitle pageTitle,
      Writer w)
  {
    super(w);
    this.callback = callback;
    this.wikiConfig = wikiConfig;
    this.pageTitle = pageTitle;
    this.nf = wikiConfig.getNodeFactory();
    this.tu = wikiConfig.getAstTextUtils();
  }
}

代码示例来源:origin: org.sweble.wikitext/swc-engine

public PageTitle newWithNamespace(Namespace ns)
{
  return new PageTitle(
      config,
      title,
      fragment,
      ns,
      null,
      interwiki,
      initialColon,
      ns.equals(config.getDefaultNamespace()));
}

代码示例来源:origin: kermitt2/entity-fishing

/**
 *  Return true if the given link is a link to a category page
 */
private boolean isCategory(WtInternalLink link) {
  // Use config name!
  String categoryCanonical = "Category";
  String categoryNameSpace = "Category";
  if (config.getNamespace(CATEGORY_KEY) != null) {
    categoryNameSpace = config.getNamespace(14).getName();
    categoryCanonical = config.getNamespace(14).getCanonical();
  }
  return link.getTarget().getAsString().startsWith(categoryNameSpace) || 
      link.getTarget().getAsString().startsWith(categoryCanonical);
}

代码示例来源:origin: org.sweble.wikitext/swc-engine

parser.parse(config.getParserConfig(), target);
  namespace = config.getNamespace(parser.getNamespace());
    namespace = config.getDefaultNamespace();
Interwiki interwiki = config.getInterwiki(parser.getInterwiki());
boolean isDefaultNs = namespace.equals(config.getDefaultNamespace());

代码示例来源:origin: sweble/sweble-wikitext

config.getParserConfig(),

代码示例来源:origin: org.sweble.wikitext/swc-engine

@Override
  public WtNode invoke(
      WtTemplate var,
      ExpansionFrame frame,
      List<? extends WtNode> args)
  {
    return nf().text(frame.getWikiConfig().getContentLanguage());
  }
}

代码示例来源:origin: org.sweble.wikitext/swc-engine

public URL getUrl()
{
  if (this.interwiki != null)
  {
    return this.interwiki.getUrl(this);
  }
  else
  {
    try
    {
      return UrlService.makeUrlToArticle(this.config.getArticlePath(), this);
    }
    catch (MalformedURLException e)
    {
      /* This should not happen: If the URL is correctly formatted, 
       * appending a title must not cause a MalformedURLException. 
       */
      throw new WikiConfigurationException(e);
    }
  }
}

代码示例来源:origin: org.sweble.wikitext/swc-engine

Namespace namespace = preprocessorFrame.getWikiConfig().getNamespace(arg);
if (namespace == null)
  namespace = preprocessorFrame.getWikiConfig().getNamespace(ns);

代码示例来源:origin: sweble/sweble-wikitext

parser.parse(config.getParserConfig(), target);
  namespace = config.getNamespace(parser.getNamespace());
    namespace = config.getDefaultNamespace();
Interwiki interwiki = config.getInterwiki(parser.getInterwiki());
boolean isDefaultNs = namespace.equals(config.getDefaultNamespace());

代码示例来源:origin: sweble/sweble-wikitext

@Override
  public WtNode invoke(
      WtTemplate var,
      ExpansionFrame frame,
      List<? extends WtNode> args)
  {
    return nf().text(frame.getWikiConfig().getContentLanguage());
  }
}

代码示例来源:origin: sweble/sweble-wikitext

public URL getUrl()
{
  if (this.interwiki != null)
  {
    return this.interwiki.getUrl(this);
  }
  else
  {
    try
    {
      return UrlService.makeUrlToArticle(this.config.getArticlePath(), this);
    }
    catch (MalformedURLException e)
    {
      /* This should not happen: If the URL is correctly formatted, 
       * appending a title must not cause a MalformedURLException. 
       */
      throw new WikiConfigurationException(e);
    }
  }
}

代码示例来源:origin: sweble/sweble-wikitext

Namespace namespace = preprocessorFrame.getWikiConfig().getNamespace(arg);
if (namespace == null)
  namespace = preprocessorFrame.getWikiConfig().getNamespace(ns);

代码示例来源:origin: org.sweble.wikitext/swc-engine

protected HtmlRenderer(
      HtmlRendererCallback callback,
      WikiConfig wikiConfig,
      PageTitle pageTitle,
      Writer w)
  {
    super(w);
    this.callback = callback;
    this.wikiConfig = wikiConfig;
    this.pageTitle = pageTitle;
    this.nf = wikiConfig.getNodeFactory();
    this.tu = wikiConfig.getAstTextUtils();
  }
}

代码示例来源:origin: org.sweble.wikitext/swc-engine

public WtEngineImpl(WikiConfig wikiConfig)
{
  super();
  this.wikiConfig = wikiConfig;
  this.parserConfig = wikiConfig.getParserConfig();
  this.engineConfig = wikiConfig.getEngineConfig();
}

代码示例来源:origin: sweble/sweble-wikitext

public PageTitle newWithNamespace(Namespace ns)
{
  return new PageTitle(
      config,
      title,
      fragment,
      ns,
      null,
      interwiki,
      initialColon,
      ns.equals(config.getDefaultNamespace()));
}

代码示例来源:origin: dkpro/dkpro-jwpl

public void visit(WtInternalLink link)
{
  try
  {
    PageTitle page = PageTitle.make(config, link.getTarget().getAsString());
    if (page.getNamespace().equals(config.getNamespace("Category"))) {
      return;
    }else{
      String curLinkTitle="";
      for(AstNode n:link.getTitle()){
        if(n instanceof AstText){
          curLinkTitle = ((AstText)n).getContent().trim();
        }
      }
      if(curLinkTitle.isEmpty()){
        bodyBuilder.append(link.getTarget());
      }else{
        bodyBuilder.append(curLinkTitle);
      }
    }
  }
  catch (LinkTargetException e)
  {
  }
}
public void visit(WtDefinitionList n){

代码示例来源:origin: org.sweble.wikitext/swc-engine

/**
 * For internal use only!
 */
public void setWikiConfig(WikiConfig wikiConfig)
{
  if (wikiConfig == null)
    throw new IllegalArgumentException();
  this.wikiConfig = wikiConfig;
  this.nf = wikiConfig.getNodeFactory();
  this.tu = wikiConfig.getAstTextUtils();
}

代码示例来源:origin: dkpro/dkpro-jwpl

if (page.getNamespace().equals(config.getNamespace("Category"))) {
  return;

代码示例来源:origin: org.sweble.wikitext/swc-engine

/**
 * For internal use only!
 */
public void setWikiConfig(WikiConfig wikiConfig)
{
  if (wikiConfig == null)
    throw new IllegalArgumentException();
  this.wikiConfig = wikiConfig;
  this.nf = wikiConfig.getNodeFactory();
  this.tu = wikiConfig.getAstTextUtils();
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com