[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/engine ...

Christian Bauer christian at hibernate.org
Fri Aug 17 09:00:32 EDT 2007


  User: cbauer  
  Date: 07/08/17 09:00:32

  Modified:    examples/wiki/src/main/org/jboss/seam/wiki/core/engine  
                        WikiTextParser.java WikiLinkResolver.java
  Log:
  Major refactoring of core data schema and some new features
  
  Revision  Changes    Path
  1.6       +9 -5      jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextParser.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: WikiTextParser.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiTextParser.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- WikiTextParser.java	6 Jul 2007 14:38:39 -0000	1.5
  +++ WikiTextParser.java	17 Aug 2007 13:00:32 -0000	1.6
  @@ -1,12 +1,17 @@
  +/*
  + * JBoss, Home of Professional Open Source
  + *
  + * Distributable under LGPL license.
  + * See terms of license at gnu.org.
  + */
   package org.jboss.seam.wiki.core.engine;
   
   import org.jboss.seam.text.SeamTextParser;
   import org.jboss.seam.text.SeamTextLexer;
   import org.jboss.seam.wiki.core.model.File;
   import org.jboss.seam.wiki.core.model.Document;
  -import org.jboss.seam.wiki.core.model.Directory;
  +import org.jboss.seam.wiki.core.model.Node;
   import org.jboss.seam.wiki.util.WikiUtil;
  -import org.jboss.seam.Component;
   import antlr.ANTLRException;
   
   import java.util.*;
  @@ -31,9 +36,8 @@
   public class WikiTextParser extends SeamTextParser {
   
       private WikiTextRenderer renderer;
  -
       private WikiLinkResolver resolver;
  -    private Directory currentDirectory;
  +    private Node currentDirectory;
       private Document currentDocument;
   
       private Map<String, WikiLink> resolvedLinks = new HashMap<String, WikiLink>();
  @@ -69,7 +73,7 @@
       /*
        * The render/link resolving base
        */
  -    public void setCurrentDirectory(Directory currentDirectory) {
  +    public void setCurrentDirectory(Node currentDirectory) {
           this.currentDirectory = currentDirectory;
       }
   
  
  
  
  1.4       +10 -4     jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: WikiLinkResolver.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/engine/WikiLinkResolver.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- WikiLinkResolver.java	9 Apr 2007 10:57:58 -0000	1.3
  +++ WikiLinkResolver.java	17 Aug 2007 13:00:32 -0000	1.4
  @@ -1,3 +1,9 @@
  +/*
  + * JBoss, Home of Professional Open Source
  + *
  + * Distributable under LGPL license.
  + * See terms of license at gnu.org.
  + */
   package org.jboss.seam.wiki.core.engine;
   
   import java.util.Map;
  @@ -51,8 +57,9 @@
       public static final String REGEX_WIKILINK_CROSSAREA = "^(.+)" + Pattern.quote("|") + "(.*)$";
   
       /**
  -     * Replaces clear text links such as <tt>[=>Target Name]</tt> in <tt>wikiText</tt> with
  -     * <tt>[=>wiki://id]</tt> strings, usually resolves the target name as a unique wiki name in some data store.
  +     * Replaces clear text links such as <tt>[Link description=>Target Name]</tt> in <tt>wikiText</tt> with
  +     * <tt>[Link description=>wiki://id]</tt> strings, usually resolves the target name as a unique wiki name
  +     * in some data store.
        * The <tt>currentAreaNumber</tt> of the current document is supplied and can be used as the namespace for scoped resolving.
        * <p>
        * This method should be called whenever a wiki document is stored, we want to store the permanent
  @@ -98,7 +105,7 @@
        * users can edit the link again in clear text.
        * </p><p>
        * Either parse by hand or use the <tt>REGEX_WIKILINK_REVERSE</tt> pattern, which matches
  -     * <tt>[GROUP1=>wiki://GROUP2]. Replace with <tt>[GROUP1=>Target Name]</tt> or, if the target is not in
  +     * <tt>[GROUP1=>(wiki://GROUP2)]. Replace with <tt>[GROUP1=>Target Name]</tt> or, if the target is not in
        * the same namespace as the given <tt>area</tt> parameter, append the area:
        * <tt>[GROUP1=>Target Area|Target Name]</tt>.
        *
  @@ -108,7 +115,6 @@
        */
       public String convertFromWikiProtocol(Long currentAreaNumber, String wikiText);
   
  -
       /**
        * Resolve the given <tt>linkText</tt> to an instance of <tt>WikiLink</tt> and put it in the <tt>links</tt> map.
        * <p>
  
  
  



More information about the jboss-cvs-commits mailing list