Package info.bliki.wiki.namespaces.INamespace

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


   * @return the (normalised) name of the page
   */
  protected static String getFullpagename(String parameter, IWikiModel model) {
    String[] fullPage = getPagenameHelper2(parameter, model);
    if (fullPage != null) {
      INamespaceValue namespace = model.getNamespace().getNamespace(fullPage[0]);
      if (namespace == null) {
        return fullPage[1];
      } else {
        return namespace.makeFullPagename(fullPage[1]);
      }
    } else {
      return "";
    }
  }
View Full Code Here


   * @return the name of the talkpage
   */
  protected static String getSubjectpage(String parameter, IWikiModel model) {
    String[] fullPage = getPagenameHelper2(parameter, model);
    if (fullPage != null) {
      INamespaceValue subjectSpace = model.getNamespace().getContentspace(fullPage[0]);
      if (subjectSpace == null) {
        return fullPage[1];
      } else {
        return subjectSpace.makeFullPagename(fullPage[1]);
      }
    } else {
      return "";
    }
  }
View Full Code Here

   * @return the name of the talkpage
   */
  protected static String getTalkpage(String parameter, IWikiModel model) {
  String[] fullPage = getPagenameHelper2(parameter, model);
    if (fullPage != null) {
        INamespaceValue talkSpace = model.getNamespace().getTalkspace(fullPage[0]);
        if (talkSpace == null) {
          return fullPage[1];
        } else {
          return talkSpace.makeFullPagename(fullPage[1]);
        }
    } else {
      return "";
    }
  }
View Full Code Here

   *            the model being used
   *
   * @return the talkspace
   */
  protected static String getTalkspace(String parameter, IWikiModel model) {
    INamespaceValue namespace = getNamespaceHelper(parameter, model);
    if (namespace != null) {
      return namespace.getTalkspace().toString();
    } else {
      return "";
    }
  }
View Full Code Here

   *            the model being used
   *
   * @return the subjectspace
   */
  protected static String getSubjectSpace(String parameter, IWikiModel model) {
    INamespaceValue namespace = getNamespaceHelper(parameter, model);
    if (namespace != null) {
      return namespace.getContentspace().toString();
    } else {
      return "";
    }
  }
View Full Code Here

   *            the model being used
   *
   * @return the extracted namespace or <tt>""</tt> if the parameter was empty
   */
  protected static String getNamespace(String parameter, IWikiModel model) {
    INamespaceValue namespace = getNamespaceHelper(parameter, model);
    if (namespace != null) {
      return namespace.toString();
    } else {
      return "";
    }
  }
View Full Code Here

    if (result != null) {
      // found magic word template
      return result;
    }
    String articleName = parsedPagename.pagename;
    INamespaceValue namespace = parsedPagename.namespace;
    String name = encodeTitleToUrl(articleName, true);
    if (namespace == null) {
      return db.get(name);
    } else {
      return db.get(namespace + ":" + name);
View Full Code Here

     */
    @Override
    public String getRawWikiContent(ParsedPageName parsedPagename,
            Map<String, String> templateParameters)
            throws WikiModelContentException {
        INamespaceValue namespace = parsedPagename.namespace;
        String templateName = parsedPagename.pagename;
        if (Configuration.RAW_CONTENT) {
            System.out.println("AbstractWikiModel raw: " + " " + namespace
                    + " " + templateName);
        }
View Full Code Here

            return;
        }
        // TODO: we should only allow valid namespaces and probably set pagename
        // and
        // namespace in one go
        INamespaceValue nsVal = fNamespace.getNamespace(namespaceLowercase);
        if (nsVal != null) {
            fNamespaceName = nsVal.getPrimaryText();
        } else {
            fNamespaceName = namespaceLowercase;
        }
    }
View Full Code Here

                } catch (InvalidParameterException ipe) {
                    // nothing to do
                }
            } catch (NumberFormatException nfe) {
                // the given argument could not be parsed as integer number
                INamespaceValue value = namespace.getNamespace(arg0);
                if (value != null) {
                    return value.getPrimaryText();
                }
                return "[[:" + namespace.getTemplate().getPrimaryText() + ":Ns:" + arg0 + "]]";
            }
        }
        return null;
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.