本文整理汇总了Java中org.sweble.wikitext.engine.utils.SimpleWikiConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java SimpleWikiConfiguration类的具体用法?Java SimpleWikiConfiguration怎么用?Java SimpleWikiConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleWikiConfiguration类属于org.sweble.wikitext.engine.utils包,在下文中一共展示了SimpleWikiConfiguration类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getCompiledPage
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
/**
* Returns CompiledPage produced by the SWEBLE parser using the
* SimpleWikiConfiguration.
*
* @return the parsed page
* @throws WikiApiException
*/
public CompiledPage getCompiledPage() throws WikiApiException
{
CompiledPage cp;
try{
SimpleWikiConfiguration config = new SimpleWikiConfiguration(SWEBLE_CONFIG);
PageTitle pageTitle = PageTitle.make(config, this.getTitle().toString());
PageId pageId = new PageId(pageTitle, -1);
// Compile the retrieved page
Compiler compiler = new Compiler(config);
cp = compiler.postprocess(pageId, this.getText(), null);
}catch(Exception e){
throw new WikiApiException(e);
}
return cp;
}
开发者ID:dkpro,项目名称:dkpro-jwpl,代码行数:25,代码来源:Page.java
示例2: getCompiledPage
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
/**
* Returns CompiledPage produced by the SWEBLE parser using the
* SimpleWikiConfiguration.
*
* @return the parsed page
* @throws LinkTargetException
* @throws CompilerException if the wiki page could not be compiled by the parser
* @throws JAXBException
* @throws FileNotFoundException
*/
private static CompiledPage getCompiledPage(String text, String title, long revision) throws LinkTargetException, CompilerException, FileNotFoundException, JAXBException
{
SimpleWikiConfiguration config = new SimpleWikiConfiguration(SWEBLE_CONFIG);
PageTitle pageTitle = PageTitle.make(config, title);
PageId pageId = new PageId(pageTitle, revision);
// Compile the retrieved page
Compiler compiler = new Compiler(config);
return compiler.postprocess(pageId, text, null);
}
开发者ID:dkpro,项目名称:dkpro-jwpl,代码行数:21,代码来源:ParseUtils.java
示例3: initialValue
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
@Override
protected WikiConfigurationInterface initialValue() {
try {
return new SimpleWikiConfiguration("classpath:/org/sweble/wikitext/engine/SimpleWikiConfiguration.xml");
} catch (FileNotFoundException | JAXBException e) {
throw new RuntimeException(e);
}
}
开发者ID:ArturD,项目名称:holmes,代码行数:9,代码来源:WikiTextFeaturesHelper.java
示例4: SwebleWikipediaTextFilter
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
public SwebleWikipediaTextFilter() {
try {
config = new SimpleWikiConfiguration(
"classpath:/org/languagetool/resource/dev/SimpleWikiConfiguration.xml");
compiler = new Compiler(config);
PageTitle pageTitle = PageTitle.make(config, "fileTitle");
pageId = new PageId(pageTitle, -1);
} catch (Exception e) {
throw new RuntimeException("Could not set up text filter", e);
}
}
开发者ID:languagetool-org,项目名称:languagetool,代码行数:12,代码来源:SwebleWikipediaTextFilter.java
示例5: TextAppender
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
public TextAppender(SimpleWikiConfiguration config, int wrapCol) {
super(config, wrapCol);
sb = new StringBuffer();
}
开发者ID:agibsonccc,项目名称:solrsherlock-maven,代码行数:5,代码来源:TextAppender.java
示例6: TextConverter
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
public TextConverter(SimpleWikiConfiguration config, int wrapCol)
{
this.config = config;
this.wrapCol = wrapCol;
}
开发者ID:agibsonccc,项目名称:solrsherlock-maven,代码行数:6,代码来源:TextConverter.java
示例7: TextConverter
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
public TextConverter(SimpleWikiConfiguration config, int wrapCol) {
this.config = config;
this.wrapCol = wrapCol;
}
开发者ID:languagetool-org,项目名称:languagetool,代码行数:5,代码来源:TextConverter.java
示例8: PlainTextConverter
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
/**
* Creates a new visitor that produces a plain text String representation
* of a parsed Wikipedia article
*
* @param config
* @param enumerateSections true, if sections should be enumerated in the output
* @param wrapCol defines max length of a line. longer lines will be broken.
*/
public PlainTextConverter(SimpleWikiConfiguration config, boolean enumerateSections, int wrapCol)
{
this.config = config;
this.wrapCol = wrapCol;
this.enumerateSections=enumerateSections;
}
开发者ID:dkpro,项目名称:dkpro-jwpl,代码行数:15,代码来源:PlainTextConverter.java
示例9: TemplateNameExtractor
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
/**
* Creates a new visitor that extracts anchors of internal links from a
* parsed Wikipedia article.
*
* @param config the Sweble configuration
*/
public TemplateNameExtractor(SimpleWikiConfiguration config)
{
this.config = config;
}
开发者ID:dkpro,项目名称:dkpro-jwpl,代码行数:11,代码来源:TemplateNameExtractor.java
示例10: SectionExtractor
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
/**
* Creates a new visitor that extracts anchors of internal links from a
* parsed Wikipedia article.
*
* @param config the Sweble configuration
*/
public SectionExtractor(SimpleWikiConfiguration config)
{
this.config = config;
}
开发者ID:dkpro,项目名称:dkpro-jwpl,代码行数:11,代码来源:SectionExtractor.java
示例11: InternalLinkAnchorExtractor
import org.sweble.wikitext.engine.utils.SimpleWikiConfiguration; //导入依赖的package包/类
/**
* Creates a new visitor that extracts anchors of internal links from a
* parsed Wikipedia article.
*
* @param config the Sweble configuration
*/
public InternalLinkAnchorExtractor(SimpleWikiConfiguration config)
{
this.config = config;
}
开发者ID:fauconnier,项目名称:LaToe,代码行数:11,代码来源:InternalLinkAnchorExtractor.java
注:本文中的org.sweble.wikitext.engine.utils.SimpleWikiConfiguration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论