Class ExampleExpanderWikiModel
java.lang.Object
info.bliki.wiki.model.AbstractWikiModel
info.bliki.wiki.model.WikiModel
org.getalp.dbnary.bliki.DbnaryWikiModel
org.getalp.dbnary.bliki.ExpandAllWikiModel
org.getalp.dbnary.languages.swe.ExampleExpanderWikiModel
- All Implemented Interfaces:
info.bliki.wiki.model.IConfiguration, info.bliki.wiki.model.IContext, info.bliki.wiki.model.IWikiModel
-
Nested Class Summary
Nested classes/interfaces inherited from interface info.bliki.wiki.model.IConfiguration
info.bliki.wiki.model.IConfiguration.Casing -
Field Summary
Fields inherited from class ExpandAllWikiModel
delegate, templatesFields inherited from class DbnaryWikiModel
trace, wiFields inherited from class info.bliki.wiki.model.WikiModel
categories, includes, links, semanticAttributes, semanticRelationsFields 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
ConstructorsConstructorDescriptionExampleExpanderWikiModel(WiktionaryPageSource wi, WiktionaryDataHandler wdh, Locale locale, String imageBaseURL, String linkBaseURL) -
Method Summary
Modifier and TypeMethodDescriptiongetRawWikiContent(info.bliki.wiki.filter.ParsedPageName parsedPagename, Map<String, String> map) voidorg.apache.jena.rdf.model.ResourceprocessDefinitionLine(String example, org.apache.jena.rdf.model.Resource target) Convert an example wiki code to plain text, while keeping track of all template calls and of context definition (source, etc.).voidprocessExampleTranslation(String translation, org.apache.jena.rdf.model.Resource example) voidsetPageName(String pageTitle) voidsubstituteTemplateCall(String templateName, Map<String, String> parameterMap, Appendable writer) Methods inherited from class ExpandAllWikiModel
expandAllMethods inherited from class DbnaryWikiModel
displayGlobalTrace, expandWikiCode, getAndPatchModule, loadModuleResource, patchModule, prepareForTransclusion, renderMethods 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, setParameterParsingMode, setSemanticWebActive, setTemplateCallsCache, showSyntax, splitNsTitle, stackSize, swapStack, tearDown
-
Constructor Details
-
ExampleExpanderWikiModel
-
ExampleExpanderWikiModel
public ExampleExpanderWikiModel(WiktionaryPageSource wi, WiktionaryDataHandler wdh, Locale locale, String imageBaseURL, String linkBaseURL)
-
-
Method Details
-
setPageName
- Specified by:
setPageNamein interfaceinfo.bliki.wiki.model.IWikiModel- Overrides:
setPageNamein classExpandAllWikiModel
-
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 classExpandAllWikiModel- Throws:
info.bliki.wiki.model.WikiModelContentException
-
processDefinitionLine
public org.apache.jena.rdf.model.Resource processDefinitionLine(String example, org.apache.jena.rdf.model.Resource target) Convert an example wiki code to plain text, while keeping track of all template calls and of context definition (source, etc.).- Parameters:
example- the wiki codetarget- the resource (current Sense or current LexEntry) on which to attach information.- Returns:
- the resource representing the extracted example
-
processExampleTranslation
public void processExampleTranslation(String translation, org.apache.jena.rdf.model.Resource example) -
substituteTemplateCall
public void substituteTemplateCall(String templateName, Map<String, String> parameterMap, Appendable writer) throws IOException- Specified by:
substituteTemplateCallin interfaceinfo.bliki.wiki.model.IWikiModel- Overrides:
substituteTemplateCallin classExpandAllWikiModel- Throws:
IOException
-
logTemplateTracker
public void logTemplateTracker()
-