Class DbnaryWikiModel
java.lang.Object
info.bliki.wiki.model.AbstractWikiModel
info.bliki.wiki.model.WikiModel
org.getalp.dbnary.bliki.DbnaryWikiModel
- All Implemented Interfaces:
info.bliki.wiki.model.IConfiguration, info.bliki.wiki.model.IContext, info.bliki.wiki.model.IWikiModel
- Direct Known Subclasses:
BulgarianWikiModel, DefinitionExpanderWikiModel, DefinitionExtractorWikiModel, DefinitionsWikiModel, EnglishLikeModulesPatcherWikiModel, ExpandAllWikiModel, FinnishTranslationExtractorWikiModel, FrenchDefinitionExtractorWikiModel, GermanDBnaryWikiModel, ItalianDefinitionExtractorWikiModel, ItalianExampleExtractorWikiModel, ItalianPronunciationExtractorWikiModel, JapaneseDefinitionExtractorWikiModel, MorphologyWikiModel, PortugueseDefinitionExtractorWikiModel, PortugueseTranslationExtractorWikiModel, RussianDefinitionExtractorWikiModel, RussianMorphoExtractorWikiModel, RussianTranslationExtractorWikiModel, SerboCroatianMorphoExtractorWikiModel, SpanishDefinitionExtractorWikiModel, SpanishHeaderExtractorWikiModel, SpanishTranslationExtractorWikiModel, SwedishWikiModel
public class DbnaryWikiModel
extends info.bliki.wiki.model.WikiModel
-
Nested Class Summary
Nested classes/interfaces inherited from interface info.bliki.wiki.model.IConfiguration
info.bliki.wiki.model.IConfiguration.Casing -
Field Summary
FieldsFields inherited from class info.bliki.wiki.model.WikiModel
categories, includes, links, semanticAttributes, semanticRelations, templatesFields inherited from class info.bliki.wiki.model.AbstractWikiModel
attributes, fExternalLinksCounter, fLocale, fNamespace, fNamespaceName, fNoToc, fPageTitle, fParameterParsingMode, fRecursionLevel, fRedirectLink, fReferenceNames, fReferences, fSectionCounter, fTagStack, fTemplateRecursionCount, fTemplates, fTemplateTopic, fToCSet, logger -
Constructor Summary
ConstructorsConstructorDescriptionDbnaryWikiModel(Locale locale, String imageBaseURL, String linkBaseURL) DbnaryWikiModel(WiktionaryPageSource wi, Locale locale, String imageBaseURL, String linkBaseURL) -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayGlobalTrace(String msg) protected StringexpandWikiCode(String wikicode) protected final StringgetAndPatchModule(info.bliki.wiki.filter.ParsedPageName parsedPagename, Map<String, String> map, Function<String, String>... patchers) Retrieves the content of a module or template and applies patching functions to it.getRawWikiContent(info.bliki.wiki.filter.ParsedPageName parsedPagename, Map<String, String> map) protected StringloadModuleResource(String name) protected final StringApplies a series of patching functions to module content.prepareForTransclusion(String rawWikiText) Methods inherited from class info.bliki.wiki.model.WikiModel
addCategory, addInclude, addLink, addSemanticAttribute, addSemanticRelation, addTemplate, appendInternalLink, appendInternalLink, createImageName, getCategories, getImageBaseURL, getIncludes, getLinks, getNamespace, getSemanticAttributes, getSemanticRelations, getTemplates, getWikiBaseURL, parseInternalImageLink, replaceColon, setUp, toHtml, toHtml, toHtml, toTextMethods inherited from class info.bliki.wiki.model.AbstractWikiModel
addCodeFormatter, addInterwikiLink, addTemplateFunction, addTokenTag, addToReferences, addToTableOfContent, append, appendExternalImageLink, appendExternalLink, appendHead, appendInternalImageLink, appendInterWikiLink, appendISBNLink, appendMailtoLink, appendRawNamespaceLinks, appendRawWikipediaLink, appendRedirectLink, appendSignature, appendStack, buildEditLinkUrl, casing, createNewInstance, createScribuntoEngine, createTableOfContent, decrementRecursionLevel, decrementTemplateRecursionLevel, encodeTitleDotUrl, encodeTitleToUrl, getAttribute, getAttributeRenderer, getCodeFormatterMap, getCurrentTimeStamp, getFrame, getInterwikiMap, getLocale, getMagicWord, getNamespaceName, getNextNumber, getNode, getPageName, getRecursionLevel, getRedirectLink, getReferences, getResourceBundle, getSimpleDateFormat, getTableOfContent, getTemplateCallsCache, getTemplateFunction, getTemplateMap, getTokenMap, getUriSchemeSet, getWikiBaseEditURL, getWikiListener, incrementRecursionLevel, incrementTemplateRecursionLevel, initialize, isCamelCaseEnabled, isEditorMode, isInterWiki, isMathtranRenderer, isNamespace, isNoToc, isParameterParsingMode, isPreviewMode, isSemanticWebActive, isTemplateTopic, isValidUriScheme, isValidUriSchemeSpecificPart, parseBehaviorSwitch, parseEvents, parseTemplates, parseTemplates, peekNode, popNode, pushNode, rawSetAttribute, reduceTokenStack, registerRenderer, render, render, render, render, renderPDF, setAttribute, setAttributeRenderers, setDefaultThumbWidth, setFrame, setNamespaceName, setNoToc, setPageName, setParameterParsingMode, setSemanticWebActive, setTemplateCallsCache, showSyntax, splitNsTitle, stackSize, substituteTemplateCall, swapStack, tearDown
-
Field Details
-
wi
-
trace
-
-
Constructor Details
-
DbnaryWikiModel
-
DbnaryWikiModel
public DbnaryWikiModel(WiktionaryPageSource wi, Locale locale, String imageBaseURL, String linkBaseURL)
-
-
Method Details
-
expandWikiCode
-
displayGlobalTrace
-
getRawWikiContent
public String getRawWikiContent(info.bliki.wiki.filter.ParsedPageName parsedPagename, Map<String, String> map) throws info.bliki.wiki.model.WikiModelContentException- Specified by:
getRawWikiContentin interfaceinfo.bliki.wiki.model.IWikiModel- Overrides:
getRawWikiContentin classinfo.bliki.wiki.model.AbstractWikiModel- Throws:
info.bliki.wiki.model.WikiModelContentException
-
getAndPatchModule
@SafeVarargs protected final String getAndPatchModule(info.bliki.wiki.filter.ParsedPageName parsedPagename, Map<String, String> map, Function<String, throws info.bliki.wiki.model.WikiModelContentExceptionString>... patchers) Retrieves the content of a module or template and applies patching functions to it. This method is useful for fixing known issues in Lua modules before they are processed.- Parameters:
parsedPagename- the parsed page namemap- the parameter mappatchers- variable number of patching functions to apply to the content- Returns:
- the patched content, or null if content cannot be retrieved
- Throws:
info.bliki.wiki.model.WikiModelContentException- if there's an error retrieving the content
-
patchModule
@SafeVarargs protected final String patchModule(String pagename, String content, Function<String, String>... patchers) Applies a series of patching functions to module content. Logs debug information about successful and failed patches.- Parameters:
pagename- the name of the page being patchedcontent- the original contentpatchers- variable number of patching functions- Returns:
- the patched content
-
prepareForTransclusion
-
render
- Specified by:
renderin interfaceinfo.bliki.wiki.model.IWikiModel- Overrides:
renderin classinfo.bliki.wiki.model.AbstractWikiModel- Throws:
IOException
-
loadModuleResource
-