Package info.bliki.wiki.namespaces

Examples of info.bliki.wiki.namespaces.INamespace$INamespaceValue


        return new ParsedPageName(namespace, pagename, magicWord, magicWordParameter, true);
    }

    public static String getRedirectedTemplateContent(IWikiModel wikiModel, String redirectedLink,
            Map<String, String> templateParameters) {
        final INamespace namespace = wikiModel.getNamespace();
        ParsedPageName parsedPagename = AbstractParser.parsePageName(wikiModel, redirectedLink, namespace.getMain(), false, false);
        // note: don't just get redirect content if the namespace is the template
        // namespace!
        if (!parsedPagename.valid) {
            return null;
        }
View Full Code Here


    }
   
    if (name.equals(MAGIC_TALK_PAGE_NAME)) {
      String temp = model.getPageName();
      if (temp != null) {
        INamespace ns = model.getNamespace();
        if (parameter.length() > 0) {
          String namespace = parameter;
          int index = namespace.indexOf(':');
          if (index > 0) {
            // {{TALKPAGENAME:Template:Sandbox}}
            String rest = namespace.substring(index + 1);
            namespace = namespace.substring(0, index);
            String talkspace = ns.getTalkspace(namespace);
            if (talkspace != null) {
              return talkspace + ":" + rest;
            }
          }
          return ns.getTalk() + ":" + parameter;
        }
        return ns.getTalk() + temp;
      }
    }

    return name;
  }
View Full Code Here

  }

  public String parseFunction(List<String> list, IWikiModel model, char[] src, int beginIndex, int endIndex) {
    if (list.size() > 0) {
      String arg0 = parse(list.get(0), model);
      INamespace namespace = model.getNamespace();
      try {
        int numberCode = Integer.valueOf(arg0).intValue();
        if (numberCode >= (-2) || numberCode <= 15) {
          return namespace.getNamespaceByNumber(numberCode);
        }
      } catch (NumberFormatException nfe) {
        // the given argument could not be parsed as integer number
        arg0 = arg0.replace(' ', '_');
        String value = namespace.getNamespaceByLowercase(arg0.toLowerCase());
        if (value != null) {
          return value;
        }
        return "[[:Template:Ns:" + arg0 + "]]";
      }
View Full Code Here

TOP

Related Classes of info.bliki.wiki.namespaces.INamespace$INamespaceValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.